Monday 24 December 2012

How-To: Compile and Install Wine in Ubuntu

In order to compile Wine from source and install it on Ubuntu, you will only need to follow several easy steps I list below:

1. Enable the sources repositories
Make sure you have a line in the /etc/apt/sources.list file which says something like:

deb-src http://archive.

ubuntu.com/ubuntu hardy main restricted universe multiverse

Next, update the packages list:

sudo apt-get update

2. Install the Wine dependencies
This will also install the build-essential meta package if it's not already installed:

sudo apt-get build-dep wine

3. Download the Wine 1.1.4 source tarball, compile and install
Download the source from the official website (direct link here), uncompress it, change the current working directory to wine-1.1.4 and type the command:

./tools/wineinstall

If the configuration goes smooth, you'll be presented with a message similar to the one below:

configure: Finished. Do 'make depend && make' to compile Wine.


We need to install wine as root user, do you want us to build wine,
'su root' and install Wine? Enter 'no' to continue without installing
(yes/no)

Type no, wait for Wine to be compiled, then use:

sudo make install

To install Wine.

4. Run Wine
Run winecfg as normal user in order to configure it, then use it like wine WIN_APP.EXE in order to start Windows applications. You can see where the binary was installed by typing:

whereis wine

And to see the version:

wine --version

This should be all.

Resources
Wine homepage
Wine applications database

 

Wine Installetion




Saturday 22 December 2012

Installing the Flash plugin manually

Go to the Flash Player download page at Adobe.com.
When prompted, save the file (i.e.
install_flash_player_"version"_linux."processor".tar.gz).
At the top of the Firefox window, click on the File menu and select Quit
Open a Terminal window (in Gnome, click on the Applications menu,
select Accessories, and then select Terminal.)

In the Terminal window, change to the directory where you saved
the file you downloaded (e.g. cd /home/user/Downloads).

Extract libflashplayer.so from the file you downloaded with the command

tar -zxvf install_flash_player_"version"_linux."processor".tar.gz.

As the super user, copy the extracted file, libflashplayer.so, to
your Firefox installation directory's plugins sub-directory. For
example, if Firefox is installed in /usr/lib/mozilla, use the command

sudo cp libflashplayer.so /usr/lib/mozilla/plugins

and then enter your super user password when prompted.

Wednesday 12 December 2012

Install Tomcat on a Linux Server

This article walks you through installing Tomcat on your Linux server. This has been tested on a Linux server with Cent OS release 5.5 (Final) and no control panel (e.g., Plesk or cPanel).  These instructions were performed with Tomcat 7.0.10. This only applies to Cloud and Dedicated accounts.  You can view more information about these account types at http://www.hosting.com/services/platform-services.

  1. Obtain a tarball (.tar.gz) of the latest stable release of Tomcat from http://tomcat.apache.org/ and place it in /usr/local/ on your Linux server. For example, you might run something like this at command prompt on your Linux server.

            wget http://www.bizdirusa.com/mirrors/apache/tomcat/tomcat-7/v7.0.10/bin/apache-tomcat-7.0.10.tar.gz

  2. Extract the tarball by running a command similar to the following:

             tar -xvzf apache-tomcat-x.x.x.tar.gz (x.x.x is the version of Tomcat you obtained in step 1 above)

  3. Create a symbolic link.  The LINK NAME will be Tomcat and the TARGET will be the path of the extracted folder you created in step 2. It may look something like this:

             ln -s /usr/local/apache-tomcat-7.0.10 ./tomcat

  4. Run the following command:

            export CATALINA_HOME=/usr/local/tomcat

  5. Add the following lines to your /etc/profile file. It will set the CATALINA_HOME variable automatically if the system restarts.

    profile

  6. Install the latest stable release of the Java JDK. You can obtain this at http://www.oracle.com/technetwork/java/javase/downloads/index.html.This should be placed into /usr/java/jdkx.x.x_xx (the x's will be your version number).

  7. Run the following command:

            export JAVA_HOME=/usr/java/jdk1.6.0_23 (The 1.6.0_23 you should replace with your version of the JDK you installed in Step 6.

  8. Add the following lines to your /etc/profile file. It will set the JAVA_HOME variable automatically if the system restarts. Replace the 1.6.0_02 with your version.

    profile2

  9. Run the following command to start the Tomcat server:
    $CATALINA_HOME/bin/startup.sh

  10. If you obtained any errors on the starting of Tomcat, please review the _ log to resolve those issues. Once those issues are resolved, proceed to step 11.

  11. Verify that the Tomcat server is running by browsing to http://Your_IP_Here:8080/





How to install Tomcat 6 on Ubuntu

Apache Tomcat is a free and open source software implementation for JavaServlets, providing support for Java Server Pages (JSP). Many popular web-based applications use servlets. You may choose to run Tomcat with either Sun's Java implementation or the OpenJDK implementation of Java.

Because Tomcat version 6 was included in Ubuntu installing a working Tomcat server is reasonably straightforward. However, before we can start installing Tomcat itself, we must first install Java.

First Install Sun Java in ubuntu 9.04 using this tutorial

Install tomcat 6 in ubuntu 9.04

sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

This command downloads and install the following packages

tomcat6 : Servlet and JSP engine

tomcat6-admin : Admin web applications

tomcat6-common : Common files

tomcat6-user : Tools to create user instances

tomcat6-docs : Example web applications

tomcat6-examples : Example web applications

To start, stop,  restart and get the server status

Start tomcat server

sudo /etc/init.d/tomcat6 start

Stop tomcat server

sudo /etc/init.d/tomcat6 stop

Restart tomcat server

sudo /etc/init.d/tomcat6 restart

Get tomcat server status

sudo /etc/init.d/tomcat6 status

After installation type http://localhost:8080  or http://serverip:8080/examples/servlets/ in your browser.Now you should see tomcat welcome page

* To enable admin web based features add the following lines to your /etc/tomcat6/tomcat-user.xml

<role rolename="manager"/>
<role rolename="admin"/>
<user name="admin" password="secret_password" roles="manager,admin"/>

* you should be able to see your manage page here http://your_ip_goes_here:8080/manager/html

* log in with the name and password you just set in /etc/tomcat6/tomcat-users.xml

* ls /var/lib/tomcat6 directory.

* you should see these directories conf, logs, webapps, work

* webapps is where your servlets will go ( or at least a xml file that points to them )

* as a test download this war file http://simple.souther.us/SimpleServlet.war

* then use the tomcat management page and select war file to deploy ( in teh deploy section) to upload this file to your server

* optionally just wget http://simple.souther.us/SimpleServlet.war directly to the webapps folder

* tomcat should recognize the war file and expand it with everything you need

* browse to http://serverip:8080/SimpleServlet/

Change tomcat server to run on port 80

If you want to Change tomcat server to run on port 80 follow this procedure

You need to edit the /etc/tomcat6/server.xml file

nano /etc/tomcat6/server.xml

Now replace the part that says Connector port=”8080? with Connector port=”80?

Save and exit the file

Restart tomcat server with the following command

sudo /etc/init.d/tomcat6 restart

Disable Apport Error Report Dialog in Ubuntu 12.04

In fresh Ubuntu 12.04 installation, it keeps popping up annoying apport on every log-in even after sending the . This simple tutorial will show you how to disable this dialog in Ubuntu.

Open up terminal from the dash home or press Ctrl+Alt+T, edit “/etc/default/apport” file with this command:

sudo gedit /etc/default/apport  

Set enable=0:

enable=0  

Save the file, and done!