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.

  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 athttp://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/
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Installing htop

htop is an interactive process viewer for Linux, which is a powerful alternative to the...

Bind Multiple IP Addresses to a Single Network Interface Card (NIC)

This tutorial demonstrates how to bind multiple IP addresses to a single NICI'll be using LAN...

Clear Memory Cache on Linux Server

By default the Linux OS has a very efficient memory management process that should be freeing any...

Set the time on a Linux server

Log into the server via SSHAt the shell prompt run the following command:date MMDDHHmmYYYYFor...

Check your disk usage in Linux

A good way to check your disk usage for folders on your Linux server is via shell.Download...