CalPoly Tomcat Installation

These are the Tomcat Installation notes from the CalPoly team's wiki. Many of the instructions are specific to our systems but I hope they'll help other people in configuring Tomcat for a production environment.

Tomcat Installation for uPortal 3 deployment

Versions

Package

Version

Site

JDK

1.6.0_10

http://java.sun.com/

JDK (Fallback)

1.5.0_16

http://java.sun.com/

APR

1.3.3

http://apr.apache.org/

Tomcat Native

1.1.15

http://tomcat.apache.org/

Commons Daemon

1.0.1

http://commons.apache.org/daemon/

Tomcat

6.0.18

http://tomcat.apache.org/

User

The user performing the install is assumed to be wasadmin. It will, of course, work for anyone else since the procedure is relatively self-contained. (Installations can be done into the home directory.)

Paths

All installation paths are preliminary. Aside from the actual Tomcat installation, all other packages (JDK, APR, TC-Native, jsvc) can actually be shared across many Tomcat installations or even many users.
For now, assume $PREFIX is /usr/local/AppServers

JDK Installation

  1. Grab jdk-6u10-solaris-sparc.sh from the Sun Java site.
  2. cd $PREFIX
  3. Execute it
    sh jdk-6u10-solaris-sparc.sh
    
  4. Accept license, etc.
  5. Set JAVA_HOME to $PREFIX/jdk1.6.0_10
  6. Make $JAVA_HOME/bin first in PATH

APR Installation

  1. Grab apr-1.3.3.tar.bz2 from the Apache APR site.
  2. Untar it
    bunzip2 -c apr-1.3.3.tar.bz2 | tar xvf -
    
  3. cd apr-1.3.3
  4. Configure it, setting installation path to $PREFIX
    ./configure --prefix=$PREFIX
    
  5. gmake
  6. gmake install

TC-Native Installation

  1. Grab tomcat-native-1.1.15-src.tar.gz from the Apache Tomcat site.
  2. Untar it
    gunzip -c tomcat-native-1.1.15-src.tar.gz | tar xvf -
    
  3. cd tomcat-native-1.1.15-src/jni/native
  4. Configure it, pointing it to our built APR and setting the installation path to $PREFIX
    ./configure --prefix=$PREFIX --with-apr=$PREFIX/bin/apr-1-config --with-ssl=/opt/csw
    
  5. gmake
  6. gmake install
  7. Add $PREFIX/lib to LD_LIBRARY_PATH

Commons Daemon Installation (jsvc)

  1. Grab commons-daemon-1.0.1.tar.gz from the Apache Commons Daemon site.
  2. Untar it
    gunzip -c commons-daemon-1.0.1.tar.gz | tar xvf -
    
  3. cd commons-daemon-1.0.1/bin
  4. Untar the jsvc source
    gunzip -c jsvc.tar.gz | tar xvf -
    
  5. cd jsvc-src
  6. Ensure JAVA_HOME is correct and then configure jsvc
    sh configure
    
  7. gmake
  8. cp jsvc $PREFIX/bin

Tomcat Installation

  1. Grab apache-tomcat-6.0.18.tar.gz from the Apache Tomcat site.
  2. Untar it
    gunzip -c apache-tomcat-6.0.18.tar.gz | tar xvf -
    
  3. Rename it to something less generic, e.g.
    mv apache-tomcat-6.0.18 portal-tomcat
    
  4. cd portal-tomcat
  5. Ensure JAVA_HOME and LD_LIBRARY_PATH are correct, then run Tomcat in the foreground and confirm that it is using APR:
    bin/catalina.sh run
    
    should yield the following output:
    Using CATALINA_BASE:   /usr/local/home/wasadmin/portal-tomcat
    Using CATALINA_HOME:   /usr/local/home/wasadmin/portal-tomcat
    Using CATALINA_TMPDIR: /usr/local/home/wasadmin/portal-tomcat/temp
    Using JRE_HOME:       /usr/local/home/wasadmin/jdk1.6.0_10
    Oct 20, 2008 2:51:49 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: Loaded APR based Apache Tomcat Native library 1.1.15.
    Oct 20, 2008 2:51:49 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
    ...
    INFO: Server startup in 2056 ms
    
  6. Hit CTRL-C and configure Tomcat as normal.