Tomcat download and install
Go to the Apache
Tomcat download site and download the core distribution that
matches your hosting environment. Extract the tar or zip file into the
directory from which you want to run the Tomcat server. Set the
evironment variable CATALINA_HOME to the extracted directory.
e.g. if you untarred apache-tomcat-5.5.26.tar in /usr/local,
CATALINA_HOME should be set to /usr/local/apache-tomcat-5.5.26.
Tomcat Configuration
Complete Tomcat documentation can be found at Tomcat 5-5
doc. The things you may need to do for OSCARS are itemized below.
$CATALINA_HOME/conf
- server.xml - defines
standalone Tomcat server - service name is
Catalina
- the connector elements define the port(s) on which tomcat
will
listen the protocol (http or https), and the location of the keystore
for
https connectors.
- You should enable Tomcat to run https only, as user passwords
are passed to the browser interface. If http is used the passwords are
passed unencrypted. See SSL-howto
for instructions on how to do this.
- define a dumper valve here
- define remoteAddrValve here if you wish to limit the sites
that can
access the connector
- web.xml - defines
default values for servlets for static
resources, e.g. jsp, We used the sample in the distribution but enabled
the SSI filter to enable server includes on all html files as the
OSCARS documentation html pages use includes.
- context.xml - Uncomment
the line <Manager pathname="" /> to not allow
sessions to be saved between Tomcat restarts.
- logging.properties - can
be edited to change some logging levels (see logging
configuration for more on how to customize Tomcat to use log4j)
- tomcat-users.xml - user
names and passwords for access to the
Tomcat administrative web pages
$CATALINA_HOME/common
Classes and libraries shared by the Tomcat server and all the
webapps.
We added common/classes/log4j.properties and common/lib/log4j.jar and
commons-logging.jar in
order to get Tomcat to do log4j logging. By default it just uses
commons
logging.
$CATALINA_HOME/shared
Contains classes and libraries shared by all the webapps but not the
Tomcat server. This has been where we have put files that can't seem to
be found from the axis2.war or the OSCARS.aar. The ant task setupServer
will populate the classes directory and deploylibs will polulate the
lib directory. Currently the contents
are:
- classes/repo - files that need to be on the classpath as
repo/<filename> These are files used when OSCARS is forwarding a
request, see OSCARS interdomain.
- sec-client.jks
- sec-client.properties - says the keystore file is in
repo/sec-client.jks
- ssl-keystore.jks
- axis2.xml
- modules
- classes/server
- oscars.key
- oscars.properties
- ciscoSetupL2.xml
- ciscoTeardownL2.xml
- juniperSetupL2.xml
- juniperSetupL3.xml
- juniperTeardownL2.xml
- juniperTeardownL3.xml
- test.properties
- perfSONAR-LSQuery.xml
- test.properties
- lib contains the axis2 and rampart jars.
$CATALINA_HOME/webapps
Contains all the user provided war files. In our case this is
OSCARS.war and
axis2.war. When a war file is put in this directory it will be
automatically deployed by the Tomcat server and its contents will be
extracted into a directory with the name of the war.
Every Tomcat webapp has a WEB-INF/web.xml that defines the service name
and methods.
$CATALINA_HOME/bin - startup scripts
- startup.sh - we edited to set OSCARS_HOME
and JAVA_OPTS="-Djava.net.preferIPv4Stack=true" to get around a FreeBSD
6.0 / ipv6/ jdk1.5 bug
- catalina.sh - starts the command with output sent to
$CATALINA_HOME/logs/catalina.out