Setting up Tomcat 5.5.20 on Glue machines


Before your installation, 

Open a browser and point the URL to http://glue.umd.edu:80YX, where YX is the reversed last two digits of your class account.

e.g. My class id is dbclass239, I'd type http://glue.umd.edu:8093

You get: The page cannot be displayed. That's right, you haven't installed it yet.  The page cannot be displayed. That's right, you haven't installed it yet!


1. Get Tomcat

Download tomcat 5.5.20 tar file from here.

Create a new directory called ‘424’ in your home directory.

Copy the ‘tomcat 5.5.20.gz. tar’ file into the ‘424’ directory.


2. unzip and untar the file.

gunzip apache-tomcat-5.5.20 .tar.gz 
tar -xvf apache-tomcat-5.5.20 .tar

 rm apache-tomcat-5.5.20 .tar 


3. Setting Environment Variables

 tap java

This sets the environment variable $JAVA_HOME.

Create a new environment variable called “CATALINA_HOME” and set its value to the directory where tomcat is present:

setenv CATALINA_HOME "/homes/$user/424/apache-tomcat-5.5.20"

You can check if these variables are correctly set by typing
echo $JAVA_HOME
echo $CATALINA_HOME

If either of these fails, do not proceed. Instead repeat step3.


4. Tomcat Configuration 

  1. Edit apache-tomcat-5.5.20 /bin/setclasspath.sh

 We append ":$ORACLE_HOME/jdbc/lib/ojdbc14.jar" to the current CLASSPATH (Line 72)

It should look like:
CLASSPATH="$JAVA_HOME"/lib/tools.jar:$ORACLE_HOME/jdbc/lib/ojdbc14.jar

  1. Edit apache-tomcat-5.5.20 /conf/server.xml
    Search for <Server port="8005" shutdown="SHUTDOWN">, Change it to
    <Server port="80XY" shutdown="SHUTDOWN">, XY is last two digits of your class account. e.g. With class id dbclass239, I change it to <Server port="8039" shutdown="SHUTDOWN">

Search for:

 <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" maxHttpHeaderSize="8192",

Change it to:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="80YX" maxHttpHeaderSize="8192"


e.g. I change it to
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8093" maxHttpHeaderSize="8192"


5. Test Tomcat

To start tomcat, type:
$CATALINA_HOME/bin/startup.sh

Then can use a browser to access page : http://glue.umd.edu:80YX ( In my case it is http://glue.umd.edu:8093)

You should be able to see Tomcat welcome page. At this point, you know the server is running.


6. Shutting Down Tomcat

To stop tomcat, type:
$CATALINA_HOME/bin/shutdown.sh


Additional References:

http://www.cs.umd.edu/~yaowu/ta/install_tomcat_5.htm