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 |
|
JDK (Fallback) |
1.5.0_16 |
|
APR |
1.3.3 |
|
Tomcat Native |
1.1.15 |
|
Commons Daemon |
1.0.1 |
|
Tomcat |
6.0.18 |
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
- Grab
jdk-6u10-solaris-sparc.sh
from the Sun Java site. cd $PREFIX
- Execute it
sh jdk-6u10-solaris-sparc.sh
- Accept license, etc.
- Set
JAVA_HOME
to$PREFIX/jdk1.6.0_10
- Make
$JAVA_HOME/bin
first inPATH
APR Installation
- Grab
apr-1.3.3.tar.bz2
from the Apache APR site. - Untar it
bunzip2 -c apr-1.3.3.tar.bz2 | tar xvf -
cd apr-1.3.3
- Configure it, setting installation path to $PREFIX
./configure --prefix=$PREFIX
gmake
gmake install
TC-Native Installation
- Grab
tomcat-native-1.1.15-src.tar.gz
from the Apache Tomcat site. - Untar it
gunzip -c tomcat-native-1.1.15-src.tar.gz | tar xvf -
cd tomcat-native-1.1.15-src/jni/native
- 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
gmake
gmake install
- Add
$PREFIX/lib
toLD_LIBRARY_PATH
Commons Daemon Installation (jsvc)
- Grab
commons-daemon-1.0.1.tar.gz
from the Apache Commons Daemon site. - Untar it
gunzip -c commons-daemon-1.0.1.tar.gz | tar xvf -
cd commons-daemon-1.0.1/bin
- Untar the jsvc source
gunzip -c jsvc.tar.gz | tar xvf -
cd jsvc-src
- Ensure
JAVA_HOME
is correct and then configure jsvcsh configure
gmake
cp jsvc $PREFIX/bin
Tomcat Installation
- Grab
apache-tomcat-6.0.18.tar.gz
from the Apache Tomcat site. - Untar it
gunzip -c apache-tomcat-6.0.18.tar.gz | tar xvf -
- Rename it to something less generic, e.g.
mv apache-tomcat-6.0.18 portal-tomcat
cd portal-tomcat
- Ensure JAVA_HOME and LD_LIBRARY_PATH are correct, then run Tomcat in the foreground and confirm that it is using APR:
should yield the following output:
bin/catalina.sh run
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
- Hit CTRL-C and configure Tomcat as normal.