Open Source and the Magic LAMP

Tomcat Notes

Apache Tomcat
It is not recommended to use the version of Tomcat that comes with Red Hat. It is out of date.
Install Tomcat
Download the apache-tomcat-[version].zip or .tar.gz: base distribution. from http://tomcat.apache.org to a directory on the server, ie /apps/
extract archive
mv apache-tomcat-[version] /opt/apache-tomcat
Add JAVA_HOME=/usr/java/jdk[version] to the top of /opt/apache-tomcat/bin/catalina.sh (using vi or preferred editor)
run:
/opt/apache-tomcat/bin/catalina.sh
If all goes well you should see the following:
Using CATALINA_BASE: /opt/apache-tomcat
Using CATALINA_HOME: /opt/apache-tomcat
Using CATALINA_TMPDIR: /opt/apache-tomcat/temp
Using JRE_HOME: /usr/java/jdk[version]/
Usage: catalina.sh ( commands … )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina
stop -force Stop Catalina (followed by kill -KILL)
version What version of tomcat are you running?
cd /opt/apache-tomcat/logs to view log files

Leave a comment