What you need:
- Apache Tomcat
- This guide was done with CentOS, but should be applicable to other Unix-based distributions
Summary:
This guide will take you through some steps to ensure Tomcat just works. I am trying to be as thorough as possible so some of these steps may not be applicable to you.Here we go....
- First, you have to install Tomcat5. I just use the CentOS repository since that is the nice & easy way to get the latest security patches and fixes. Of course, purists will recommend you build from source. Each to their own; if you choose to do it my way just enter the following into the command-prompt:
sudo yum install tomcat5
- Find out which version of Java you are running (so we can set up our variables)
- Now we need to edit the Tomcat5 configuration file to use our Java implementation. Edit the file /etc/tomcat5/tomcat5.conf with your own values:
# you could also override JAVA_HOME here
# Where your java installation lives
JAVA_HOME="/usr/lib/jvm/jre-1.6.0-openjdk/"
# Time to wait in seconds, before killing process
# Lower this value for testing to stop you waiting ages
SHUTDOWN_WAIT=10
# Connector port is 8080 for this tomcat5 instance
# Need to change this in server.xml as well
CONNECTOR_PORT=8080
- Edit /etc/tomcat5/server.xml file with your desired configuration
- Start Tomcat5 through the following commands:
sudo /etc/init.d/tomcat5 start
#To start tomcat on reboot run the following
sudo chkconfig tomcat5 on --level 2,3,5
/usr/sbin/alternatives --display java
Our system is configured to use /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
References:
- OpenBD guide to running Tomcat (geared to their app)
- David Ghedini's blog offers a great overview of this topic
No comments:
Post a Comment
Thanks for contributing!! Try to keep on topic and please avoid flame wars!!