Note: This guide is only for Tomcat3.3a, and it may not work for tomcat3.2.x or tomcat4.0
Step One: Install the java 1.3.1 SDK
1) Download the RPM shell script for JAVA1.3.1 SDK
http://java.sun.com/j2se/1.3/download-linux.html
wget ftp://207.240.117.146/pub/j2sdk/1.3.1/oei...ux-i386-rpm.bin
wget ftp://ftp.java.sun.com/pub/j2sdk/1.3.1/oe...ux-i386-rpm.bin
wget ftp://128.11.158.66/pub/j2sdk/1.3.1/oeiqt...ux-i386-rpm.bin
Whichever works. I am just trying to make it simple for you.
2) Follow the instructions on this page to install the java SDK
http://java.sun.com/j2se/1.3/install-linux...tml#install-pkg
chmod a+x j2sdk-1_3_1_02-linux-i386-rpm.bin
./j2sdk-1_3_1_02-linux-i386-rpm.bin
su
rpm -iv jdk-1.3.1_02.i386.rpm
3) Update the PATH enviroment variable, open the file "/etc/profile" and add
these two lines after the line: HISTSIZE:1000
JAVA_HOME=/usr/java/jdk1.3.1_02; export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH
pico /etc/profile
Step Two: install the tomcat 3.3a server
1) Download the tomcat distribution "jakarta-tomcat-3.3a.tar.gz"
wget http://jakarta.apache.org/builds/jakarta-t...cat-3.3a.tar.gz
2) Copy the file "jakarta-tomcat-3.3a.tar.gz" file to /usr/java/
cp /home/admin/jakarta-tomcat-3.3a.tar.gz /usr/java/jakarta-tomcat-3.3a.tar.gz
cd /usr/java/
3) Untar the file, execute the command
tar -xzvf jakarta-tomcat-3.3a.tar.gz
4) a new directory "jakarta-tomcat-3.3a" will be created.
/usr/java/jakarta-tomcat-3.3a will be your tomcat installation directory.
5) Setting the TOMCAT_HOME enviroment variable, add this line to "/etc/profile"
TOMCAT_HOME=/usr/java/jakarta-tomcat-3.3a; export TOMCAT_HOME
Step Three: Configuring Tomcat:
You will need to edit the file
/usr/java/jakarta-tomcat-3.3a/conf/jk/workers.properties
1) search for workers.java_home', and make it point to your java installation directory, example
# workers.java_home=c:jdk1.3
workers.java_home=/usr/java/jdk1.3.1_02
2) setting the path sparator for your OS, search for "ps", and use the one that is for your OS.
# ps=
ps=/
3) tell tomcat which JVM to use. Search for 'worker.inprocess.jvm_lib', and choose the one that is for your OS. Example, if you are using unix/linux, then
# Windows
# worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jv
.dll
# IBM JDK1.3
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)l
bjvm.so
# Unix - Sun VM or blackdown
worker.inprocess.jvm_lib=$(workers. java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(p
s)libjvm.so
Done with the file.
Step Four: Apache-tomcat integration:
1) Download the mod_jk.so module from
http://jakarta.apache.org/builds/jakarta-t...bin/linux/i386/
wget http://jakarta.apache.org/builds/jakarta-t...p13-eapi.so.asc
The one I am using is "mod_jk-3.3-ap13-eapi.so", from the file name, you can see that this module is for integrating tomcat3.3 with apache 1.3.
3) Copy the file "mod_jk-3.3-ap13-eapi.so" to /etc/httpd/modules/ and rename the file to mod_jk.so
cp /home/admin/mod_jk-3.3-ap13-eapi.so /etc/httpd/modules/mod_jk-3.3-ap13-eapi.so
cd /etc/httpd/modules/
cp mod_jk-3.3-ap13-eapi.so mod_jk.so
rm -fr mod_jk-3.3-ap13-eapi.so
4) Edit the httpd.conf, put the line below at the end of your "/etc/httpd/conf/httpd.conf" file
pico /etc/httpd/conf/httpd.conf
Include /usr/java/jakarta-tomcat-3.3a/conf/jk/mod_jk.conf
This will tell apache to include the configuration in mod_jk.conf.
Everytime when you start tomcat, it will generate a file named "mod_jk.conf" under /usr/java/jakarta-tomcat-3.3/conf/auto/.
Then:
pico /usr/java/jakarta-tomcat-3.3/conf/jk/mod_jk.conf
and in the line change the .dll extension to .so
so it should look like this mod_jk.so instead of mod_jk.dll
and put the full path name below:
EX: /usr/java/jakarta-tomcat-3.3/conf/jk/ where it asks for it.
5) Edit the tomcat configuration file. "/usr/java/jakarta-tomcat-3.3a/conf/server.xml"
a) Tell the tomcat to use the mod_jk module for connecting to apache
change the line
to
b) forward only jsp and servlet requests to tomcat, and let the apache to handle static contents
change the line
to
c) comment these lines since you are not using microsoft IIS and Netscape server
Step Five: Configuring virtual hosts
1) To enable a virtual host to use jsp/servlets, you need to create a file with
pattern "apps-mydomain.com.xml" under "/usr/java/jakarta-tomcat-3.3a/conf/"
for that domain. Here is an example:
Explained by wht:
"In the above configuration, a
Here is the corresponding direcotry structure and URL maping for the setting above.
default application:
WEB-INF dir: /home/virtual/site1/fst/var/www/html/WEB-INF
URL: http://www.domain1.com/hello.jsp
app1:
WEB-INF dir: /home/virtual/site1/fst/var/www/html/app1/WEB-INF
URL: http://www.domain1.com/app1/hello.jsp
app2:
WEB-INF dir: /home/virtual/site1/fst/var/www/html/Catalog/WEB-INF
URL: http://www.domain1.com/app2/hello.jsp
app3:
WEB-INF dir: /home/virtual/site1/fst/var/www/html/Catalog/WEB-INF
URL: http://www.domain1.com/app3/hello.jsp
Note that app2 and app3 have the same docBase, this fools the visitor to think app2 is a different directory from app3 in your filesystem.
Another Note: The WEB-INF directory are not automatically created, you will have to create it under the docBase or let the domain owner to do it by himself."
Step Six: Starting the tomcat and apache server:
Make sure you start tomcat before apache.
To start tomcat server, execute
/usr/java/jakarta-tomcat-3.3a/bin/startup.sh
To stop tomcat, execute
/usr/java/jakarta-tomcat-3.3a/bin/shutdown.sh
start apache:
/etc/rc.d/init.d/httpd start
stop apache:
/etc/rc.d/init.d/httpd stop
Additional information:
1. Tomcat 3.3 documentation:
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/
Now if someone could please help me on this:
http://forum.rackshack.net/showthread.php?...=&threadid=4158
That is all I ask in return.