Procedure to install Tomcat on a Cobalt RaQ3

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 Edward de la Cruz <edward.cruz@melior.com> to the Cobalt Developers list

  1. Install the Java SDK version 1.2.2 from Sun's Javasoft Site. Version 1.3 should work as well, but I have not tested it.
    Following instructions summarized from Sun's JSDK 1.2 Installation Instructions
    1. cd to /usr/local
    2. execute tar xzvf <location of downloaded JSDK.tar.gz file>
    3. if desired, remove the tar.gz file you downloaded.
  2. Download the Tomcat 3.1 binary from the The Jakarta Project at Apache.org.
  3. cd to /usr/local
  4. execute tar xzvf <location of downloaded jakarta-tomcat.tar.gz file>
  5. if desired, remove the tar.gz file you downloaded.
  6. 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
    
  7. Source the new .profile, by
     . ~/.profile 
  8. 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 source code.
  9. cd /usr/local/src
  10. execute tar xzvf <location of downloaded jakarta-tomcat.tar.gz file>
  11. 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
    
  12. 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
    
  13. If desired, remove the /usr/local/src/jakarta-tomcat directory.
  14. 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
    
  15. 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.
  16. Now for the trickey bits... We would like to have apache send any jsp or servlet requests to Tomcat.
  17. 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
    
  18. 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.
  19. 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 This Document