ADDITIONAL LNF NOTES:
=====================
To start or stop Tomcat manually, use the smf(5) commands:
svcadm {enable|disable} tomcat60
Per default, tomcat will be started in runlevel 2, before Apache starts.
It runs as user webservd. Make sure, that the following directories and
files below them are owned by that USER:
@CLIENT_BASEDIR@/tomcat60/conf
@CLIENT_BASEDIR@/tomcat60/logs
@CLIENT_BASEDIR@/tomcat60/webapps
@CLIENT_BASEDIR@/tomcat60/work
@CLIENT_BASEDIR@/tomcat60/temp
/var/log/tomcat60
To speed up the startup/shutdown process and to be sure, that tomcat
uses the JVM you want, it is recommended to set the JAVA_HOME environment
variable explicitly in @CLIENT_BASEDIR@/tomcat60/setenv.sh. Otherwise the
script tries to determine the JAVA_HOME automatically, which might lead
to unwanted or even no results!
Configuration files you should review/adjust:
=============================================
- @CLIENT_BASEDIR@/server/webapps/admin/META-INF/context.xml
@CLIENT_BASEDIR@/server/webapps/manager/META-INF/context.xml
adjust IPs, which are allowed to access tomcat's admin/manager interface
- @CLIENT_BASEDIR@/tomcat60/conf/
jk2.properties
--------------
(adjust porti[/socket]/shm parameters in case you wanna use jk2
e.g. with apache in front of tomcat, jni is not recommended)
server.xml
----------
adjust number of server/threds -> memory/cpu consumption
Server->Service:Catalina->Connector:*
minSpareThreads/maxSpareThreads
for production servers rise them at least to 25/75)
enableLookups
for production servers set this to "false"
tomcat-users.xml
----------------
To be able to use tomcat's admin/manager web interface, you need
to have at least one user with admin and/or manager role. Per
default this file need to contain those entries. E.g. add:
and try http://localhost:8080/manager and http://localhost:8080/admin
- @CLIENT_BASEDIR@/tomcat60/bin
setenv.sh
---------
add addtional parameters, which should be used when launching
tomcat [tools], e.g.
CATALINA_OPTS="-Djava.awt.headless=true \
-Dlog4j.configuration=/etc/log4j.lcf"
- @CLIENT_BASEDIR@/tomcat60/lib/logback.xml
This package ships with slf4j and jcl104-over-slf4j (a drop-in replacement
for apache commons-logging - see http://slf4j.org) as well as logback
(the successor of and drop-in replacement for log4j and nlog4j - see
http://logback.qos.ch/ ).
It automatically picks up the logging configuration from logback.xml (for
more details on that see http://logback.qos.ch/manual/joran.html), which
is similar to the xml file based log configuration for log4j and nlog4j.
If the LoggerFactory is not able to find a log configuration file, the
log level is automatically set to DEBUG and the output ends up per default
in LOGDIR/catalina.out .
NOTE:
This package ships with the tomcat administration interface. However, right
now it doesn't completely reflect the new features of tomcat 6.x, but rather
the ones from tomcat 5.5. So handle with care!
There is also an package named LNFtomcat60-native, which enables tomcat
to use of native Apache Portable Runtime utilities, which may increase the
performance of the servlet container.
To use it, install the package and set in of your conf/server.xml:
protocol="org.apache.coyote.http11.Http11AprProtocol"
If you have not installed the package in a default JVM location like
/usr/jdk/instances/jdk1.5.0/jre you also need to tell tomcat, where to find
the library: In bin/setenv.sh add the following line:
JAVA_OPTS="$JAVA_OPTS -server -d64 -Djava.library.path=tclib_location"
and replace tclib_location with the directory, where libtcnative-1.so lives.
For more information see http://tomcat.apache.org/tomcat-6.0-doc/apr.html