Installing Tomcat (Release 3.3.a)

by Jeff Hunter, Sr. Database Administrator

Downloading Tomcat (Binary Version)

The binary version of the Tomcat Server can be downloaded from the Apache web site.

The software is located at:

Simply download the file jakarta-tomcat-3.3a.tar.gz and place it in the directory where you want to install Tomcat. We typically perform the installation and configuration as the 'root' userid and place the archived file in the directory: /u02/app.

Installation Steps

# su -
# cd /u02/app
# gunzip jakarta-tomcat-3.3a.tar.gz
# tar xvf jakarta-tomcat-3.3a.tar
# ln -s jakarta-tomcat-3.3a tomcat
# rm jakarta-tomcat-3.3a.tar

Environment Variables

Ensure that the following environment variables are set for the UNIX userid that will be administering (starting / stopping) the Tomcat servlet engine:

Variable Name Value Description
APACHE_HOME /u02/app/apache This is an optional parameter. It serves no purpose other than documentation in the .profile for the UNIX userid administering the server.
JAVA_HOME /usr/java Ensure that the JAVA_HOME variable is set to the root directory of your JDK hierarchy. This should already be part of the install you did with JDK.
TOMCAT_HOME /u02/app/tomcat You may optionally set the TOMCAT_HOME environment variable. If the supplied shell/batch scripts are executed from "jakarta-tomcat-<version>" or from its "bin" subdirectory, then they will successfully set TOMCAT_HOME for you if not already set. If you wish to execute these shell/batch scripts from other directories, you must set TOMCAT_HOME explicitly.
PATH ${PATH}:$JAVA_HOME/bin This should already be part of the install you did with JDK.
CLASSPATH ${CLASSPATH}: ${TOMCAT_HOME}/lib/common/servlet.jar Needed to compile servlets.

Starting / Stopping / Testing Tomcat

At this point, it is a good time to test the Tomcat Servlet Container installation. Ensure that you test the JSP and Servlet examples. When all testing is complete and you are confident that Tomcat is working properly, shutdown the Tomcat application and continue on the remainder of this section for instructions on how to integrate Tomcat with Apache.


# cd $TOMCAT_HOME/bin
# ./
# cd $TOMCAT_HOME/bin
# ./

Use a browser and navigate to the URL below. Ensure that you test several of the servlet and JSP examples.


Configuring Tomcat (optional)

Located in the $TOMCAT_HOME/conf directory is a file called server.xml. If Tomcat is being installed on a server that already is configured with Oracle8i or higher, you may want to change several of the ports Tomcat uses as its default. In particular, port number 8007 will collide with Oracle's Jserv setup. The following table lists the default port settings for Tomcat as well as alternative ports I commonly use:

Protocol Default Port Alternative Port
HTTP 8080 8080
Ajp12 Interceptor 8007 8027
Ajp13 Interceptor 8009 8029

Last modified on: Saturday, 18-Sep-2010 18:14:01 EDT
Page Count: 1854