Download and untar Jakarta Tomcat 4.1.24 binary release Standard Edition
mkdir -p /usr/local/jakarta-tomcat-4.1.24/src cd /usr/local/jakarta-tomcat-4.1.24/src wget http://www.tux.org/pub/net/apache/dist/jakarta/tomcat-4/binaries/tomcat-4.1.24.tar.gz cd /usr/local tar -xzvf jakarta-tomcat-4.1.24/src/tomcat-4.1.24.tar.gz
Create /etc/profile.d/tomcat.sh to set CATALINA_HOME:
echo '# Jakarta Tomcat initialization script' > /etc/profile.d/tomcat.sh echo 'export CATALINA_HOME=/usr/local/tomcat' >> /etc/profile.d/tomcat.sh echo 'export TOMCAT_HOME=/usr/local/tomcat' >> /etc/profile.d/tomcat.sh
Add chkconfig and environment vars $CATALINA_HOME/bin/catalina.sh according to this patch file. i.e. add these lines:
# # chkconfig: 345 84 16 # description: Start/Stop Script for the CATALINA Server # ... export CATALINA_HOME=/usr/local/tomcat export JAVA_HOME=/usr/local/java/
If needed, change ports use from 80xx to 81xx with revisions to $CATALINA_HOME/conf/server.xml. See the patch file.
Create accounts with access rights to the manager and admin apps. Add lines like this to $CATALINA_HOME/conf/tomcat-users.xml:
<user name="your_username" password="secret!_do_not_tell" roles="standard,manager,admin" />
Then adjust the rights on that file:
chmod 660 $CATALINA_HOME/conf/tomcat-users.xml*
To use these accounts to administer Tomcat via its web interface, restart Tomcat, then see Jakarta Tomcat: Manager App HOW-TO for more info.
Link in this tomcat as default, make catalina start automatically and start it:
rm /usr/local/tomcat ln -s /usr/local/jakarta-tomcat-4.1.24/ /usr/local/tomcat cd /etc/rc.d/init.d ln -s /usr/local/tomcat/bin/catalina.sh catalina chkconfig catalina reset ./catalina start