Environment: Cobalt RaQ3, apache 1.3.6 with mod_so
Installation includes: Java SDK 1.2.2, Tomcat 3.1
Expanded and clarified from instructions posted
originally by
to the
- Install the from Sun's . Version 1.3 should work as
well, but I have not tested it.
Following instructions summarized from
- cd to /usr/local
- execute tar xzvf <location of downloaded
JSDK.tar.gz file>
- if desired, remove the tar.gz file you downloaded.
- Download the from the at .
- cd to /usr/local
- execute tar xzvf <location of downloaded
jakarta-tomcat.tar.gz file>
- if desired, remove the tar.gz file you downloaded.
- add the folllowing lines to root's .profile:
CLASSPATH=/usr/local/jdk1.2.2/lib/tools.jar
JAVA_HOME=/usr/local/jdk1.2.2/
TOMCAT_HOME=/usr/local/jakarta-tomcat
export CLASSPATH JAVA_HOME TOMCAT_HOME
- Source the new .profile, by
. ~/.profile
- Next, in order to use tomcat with apache, it is necessary to retrieve
the source code of tomcat, and compile the mod_jserv.so module. Download
the .
- cd /usr/local/src
- execute tar xzvf <location of downloaded
jakarta-tomcat.tar.gz file>
- Execute for following commands to compile and install mod_jserv.so:
cd jakarta-tomcat/src/native/apache/jserv
/usr/sbin/apxs -c mod_jserv.c jserv*.c
/usr/sbin/apxs -i -a -n jserv mod_jserv.so
- In the /etc/httpd/conf/httpd.conf file, change the line just added from
LoadModule jserv_module lib/apache/mod_jserv.so
to
LoadModule jserv_module /usr/lib/apache/mod_jserv.so
- If desired, remove the /usr/local/src/jakarta-tomcat directory.
- Congratulations, at this point you can try out tomcat. First,
we start it up by going to /usr/local/jakarta-tomcat/bin and executing
./startup.sh
- Test out Tomcat by opening a browser to port 8080 on your server, i.e.
http://your.host.com:8080/
You should see the default Tomcat home page.
- Now for the trickey bits... We would like to have apache send any jsp or
servlet requests to Tomcat.
- Append the following lines to your /etc/httpd/conf/httpd.conf file:
Include /usr/local/jakarta-tomcat/conf/tomcat-apache.conf
ApJServLogFile /var/log/httpd/mod_jserv.log
- Restart http by executing
/etc/rc.d/init.d/httpd restart
Verify that httpd has restarted. If it hasn't, check the /var/log/httpd/error
file and correct any problems encountered.
- You should now be able to go to http://your.host.com/examples and access
jserv and jsp examples. For more information on configuration and
settings for Tomcat, I recommend