Installing Tomcat 3.2
[The Jakarata group is now releasing up-to-date RPMs on a regular basis. You might want to check there first.]
This installation guide is not a replacement for reading the Tomcat user guide, but hopefully will help someone avoid some of the problems I had to circumvent.
Finding a Package
(ncftpget is a component of ncftp, my favorite ftp client. You may use any other the ftp client of your choice.)
I wasn't sure I wanted to install the RPM, but I figured I might learn something by looking at its content:
rpm -qpl tomcat-3.1-4.i386.rpm | more
I did learn a few things:
- A /etc/rc.d/init.d/tomcat file is enclosed
- Everything is installed in /opt/tomcat
- The documentation goes into /usr/doc/tomcat-3.1
I decided to install the RPM as it would give me a good base to start from:
rpm -ivh tomcat-3.1-4.i386.rpm
Now, I just had to upgrade Tomcat 3.1 to version 3.2.1.
Upgrading to Tomcat 3.2.1
First, I used lynx to get the Tomcat 3.2.1 tarball:
(You will be prompted to download and then save the file to disk.)
tar -zxvf jakarta-tomcat-3.2.1.tar.gz
Remove the old Tomcat 3.1 /opt/tomcat directory:
rm -fr /opt/tomcat
Moved the new /opt/tomcat directory in its place:
mv jakarta-tomcat-3.2.1 tomcat
mv tomcat /opt
Created a symbolic link for the Tomcat 3.2.1 documentation in /usr/doc:
ln -s /opt/tomcat/doc /usr/doc/tomcat-3.2.1
Tomcat 3.2.1 is now installed!
After reading some more of the documentation I realized I also had to install mod_jk, a plugin which handles communication between Tomcat and Apache.
I could not find a mod_jk binary for Red Hat Linux and had to build it manually.
I used lynx, again, to get the Tomcat 3.2.1 source tarball:
tar -zxvf jakarta-tomcat-3.2.1-src.tar.gz
The make file is located in the /src/native/apache1.3/ directory:
Build the plugin with make:
make -f Makefile.linux all
Created the libexec directory in /etc/httpd:
Moved the plugin to the libexec directory:
mv mod_jk.so /etc/httpd/libexec
The mod_jk plugin is installed!
Mommy told me to always clean up after myself:
rm -rf tomcat-install
In order for the mod_jk plugin to work properly its configuration file must be included within Apache's. This is accomplished by appending:
Additionally, the tomcat service configuration file must be updated with the current Java VM and Tomcat home locations: Change:
(JAVA_HOME should point to the location of your Java VM.)
For all of the configuration changes to take place, you must restart Tomcat and Apache:
Although not really needed, I've also added the following:
setenv JAVA_HOME "/usr/java/jdk1.3.0_01";
setenv TOMCAT_HOME "/opt/tomcat";
to my .login file:
I use tcsh for my shell, if you use another type of shell you might have to use:
export JAVA_HOME TOMCAT_HOME
In case of problems, do like I did, RTFM.