Today we will start from the notes of Wed July 22:
http://silo.cs.indiana.edu:44063/
That day we installed Tomcat.
We need two ports for Tomcat, two new ports.
Our Apache ports are 44xxx (mine, for example, is 44063).
Your Tomcat ports are 43xxx and 42xxx (mine: 43063 and 42063).
If you follow(ed) the instructions your Tomcat will be available from
http://silo.cs.indiana.edu:43xxx
Last time we started the servers and created a simple index.html in
$CATALINA_HOME/webapps/ROOT
Let's check if the servers are still up.
Here's what we see for Gang:
-bash-3.2$ ps -ef | grep ggh
root 1317 3861 0 15:40 ? 00:00:00 sshd: gghuang [priv]
gghuang 1320 1317 0 15:40 ? 00:00:00 sshd: gghuang@pts/12
gghuang 1321 1320 0 15:40 pts/12 00:00:00 -bash
dgerman 1879 775 0 15:45 pts/0 00:00:00 grep ggh
gghuang 26214 1 0 Jul22 ? 00:00:31 /l/jdk1.5/bin/java -Djava.util.logging.config.file=/u/gghuang/apache-tomcat-5.5.27/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/u/gghuang/apache-tomcat-5.5.27/common/endorsed -classpath :/u/gghuang/apache-tomcat-5.5.27/bin/bootstrap.jar:/u/gghuang/apache-tomcat-5.5.27/bin/commons-logging-api.jar -Dcatalina.base=/u/gghuang/apache-tomcat-5.5.27 -Dcatalina.home=/u/gghuang/apache-tomcat-5.5.27 -Djava.io.tmpdir=/u/gghuang/apache-tomcat-5.5.27/temp org.apache.catalina.startup.Bootstrap start
-bash-3.2$
Let's stop those servers that are still running.
One option is: run
$CATALINA_HOME/bin/shutdown.sh
But this is not available since the environment variable is not defined.
Why? Because our definitions last time were only temporary.
Let's make them permanent:
pico -w ~/.bash_profile
In it at the end place these lines:
JAVA_HOME=/l/jdk1.5
export JAVA_HOME
CATALINA_HOME=/u/dgerman/apache-tomcat-5.5.27
export CATALINA_HOME
CLASSPATH=.:$CATALINA_HOME/common/lib/servlet-api.jar
export CLASSPATH
In the third line replace dgerman with your actual username.
So I assume that your settings are permanent now and your Tomcat is still running
if you haven't stopped (since you started it, if did you start it at some point).
So you can kill your server (using the process ID) or shutdown.sh
Now bring your servers down and verify that they are down.
I used $CATALINA_HOME/bin/shutdown.sh followed by ps -ef | grep dgerman.
Let's go to $CATALINA_HOME/conf/tomcat-users.xml and add this line: