Getting, Installing, and Running Tomcat

Binary Installation

Download the binary for your system from http://jakarta.apache.org/builds/jakarta-tomcat/release

The default is usually to install everything in /usr/local/

Uncompress the archive, replace the tomcat_3.2.x.tar.gz with the gzip'd file you downloaded

tar  xvzf  tomcat_3.2.x.tar.gz

You will end up with a tomcat_3.2.x directory, with x being the particular sub-version of Tomcat you downloaded. Move to that directory.

cd  tomcat_3.2.x

Two environment variables -- TOMCAT_HOME and JAVA_HOME have to be set in order to run Tomcat. TOMCAT_HOME is to point to the root directory of your tomcat hierarchy.

1. On Unix/Linux to set TOMCAT_HOME you should type:

Set the environment variable JAVA_HOME to point to the root directory of your JDK hierarchy, then add the Java interpreter to your PATH environment variable.

2. On Unix/Linux to set JAVA_HOME you should type:

To add Java interpreter to your path you should type:

Starting and Stopping Tomcat

You start and stop Tomcat using scripts in the bin directory. Make sure TOMCAT_HOME and JAVA_HOME environment variables are set before starting Tomcat!

To start: bin/startup.sh

To stop: bin/shutdown.sh