What configuration changes do you make to a new Tomcat installation?

Solution 1:

Usually, I'm just tweaking startup parameters to adjust Heap sizes for better performance.

-server -Xms256m -Xmx1024m

Solution 2:

Here is the simple script I use :

I have the default directoy "Catalina Home' and 'Catalina Base' I put the webapps into 'Catalina base' every time I launch my scripts, war are deployed. I also have some JAVA_OPTS : like run Java in deamon mode, I specify the memory I want to allocate I add the Timezone Also

#!/bin/sh

BIN_DIR=$HOME/bin
TOMCAT_DIR=$HOME/tomcat
CFG_DIR=$TOMCAT_DIR/conf

#export TZ="Europe/Paris"
#export LANG=fr_FR.UTF-8 export CATALINA_PID=$BIN_DIR/tomcat.pid
export CATALINA_BASE=$TOMCAT_DIR
export
CATALINA_HOME=/home/web/bin/apache-tomcat-6.0.16
export
LD_LIBRARY_PATH=$CATALINA_HOME/lib
export
JRE_HOME=/usr/lib/jvm/java-1.5.0-sun
export JAVA_OPTS="-server -Xmx800m
-Djava.awt.headless=true -XX:MaxPermSize=256m"

cd $CATALINA_HOME/bin

case $1 in

    start)
    $CATALINA_HOME/bin/catalina.sh start
-config $TOMCAT_DIR/conf/server.xml "$@"    ;;

    stop)   $CATALINA_HOME/bin/catalina.sh
stop -force -config
$TOMCAT_DIR/conf/server.xml "$@"    ;;

    deploy)     if [ ! -d $HOME/deploy ];
then        mkdir $HOME/deploy      fi  if [
-f $HOME/deploy/*.war ]; then       mv $HOME/deploy/*.war
$HOME/tomcat/webapps/   fi  ;;

    *)  echo "Usage : $0 (start|stop)"
    ;;

esac