This page last changed on Oct 30, 2006 by mryall.

If your Unix machine uses init.d to start server processes you can use this script to start Tomcat.

#!/bin/sh
# chkconfig: 3 60 30
# description: Starts and stops Tomcat (running as root)

mode=$1

export TOMCAT_HOME=/usr/local/java/tomcat
export CATALINA_HOME=/usr/local/java/tomcat
export JAVA_HOME=/usr/local/java/jdk1.4

case "$mode" in
   'start')
     # Start daemon
     su -c "$TOMCAT_HOME/bin/catalina.sh $mode" root
     ;;

   'stop')
     # Stop daemon. We use a signal here to avoid having to know the
     # root password.
         $TOMCAT_HOME/bin/catalina.sh $mode
     ;;

   *)
     # usage
     echo "usage: $0 start|stop"
     exit 1
     ;;
esac

You will need to modify TOMCAT_HOME, CATALINA_HOME and JAVA_HOME to match your configuration. CATALINA_HOME and TOMCAT_HOME should be set to the same path – TOMCAT_HOME was the Confluence 2.1 variable, and CATALINA_HOME is for Confluence 2.2.

Related Topics

Start Confluence automatically on system startup

Document generated by Confluence on Oct 10, 2007 18:36