Install Tomcat 5.5.15 on Glue machine


0. 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.


1. Get Tomcat

 Download tomcat 5.5.15 tar ball from tomcat.apache.org or just click here. Put it in a directory where you want to install tomcat.

Sample run:

y:~/424: pwd
/homes/yaowu/424

y:~/424: ls
apache-tomcat-5.5.15.tar.gz


2. unzip and untar the file.

y:~/424: gunzip apache-tomcat-5.5.15.tar.gz 
y:~/424: tar -xvf apache-tomcat-5.5.15.tar

y:~/424: rm apache-tomcat-5.5.15.tar 


3. Edit  .startup.X and .startup.tty in your home directory

at the end of file, add these lines:
tap java
tap oraclient

Then logout and login again.

Edit .environment in your home directory, add this line:

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

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


4. Tomcat Configuration 

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

     we append ":$ORACLE_HOME/jdbc/lib/ojdbc14.jar" to the current CLASSPATH

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

    After you run "tap oraclient", $ORACLE_HOME has been set to 
    /afs/glue.umd.edu/software/oracle/current/sys

  1. Edit apache-tomcat-5.5.15/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, for my case, it's http://glue.umd.edu:8093 
You should be able to see Tomcat welcome page. At this point, you know the server is running.

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


Additional References you can also look at:

http://www.cs.umd.edu/%7Ewalid/fall_2004/cmsc424_0101/project/tomcat_5.htm
http://www.cs.umd.edu/%7Ewalid/fall_2004/cmsc424_0101/project/tomcat_hints.html
http://jmvidal.cse.sc.edu/csce590/Installtomcat.htm
http://www.linux-sxs.org/internet_serving/c140.html (excellent, for unix)
http://www.coreservlets.com/Apache-Tomcat-Tutorial/ (excellent, for windows)

Web Accessibility