tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mário Gamito <li...@tuxdoit.com>
Subject Start Tomcat as a Linux daemon
Date Wed, 07 Dec 2005 12:35:44 GMT
Hi,

I'm trying to start Tomcat as a linux daemon at server boot, but i don't
have jsvc (although i've installed package admin), like explained in
Tomcat's page.

An year ago or so, i had this ctl script that worked, but now again, i
don't have jsvc.

Any help would be apreciated.

Warm Regards,
Mário Gamito
--
JAVA_HOME=/usr/local/java
CATALINA_HOME=/usr/local/jakarta-tomcat/bin
DAEMON_HOME=/usr/local/jakarta-tomcat/bin
TOMCAT_USER=root
TMP_DIR=/var/tmp
CATALINA_OPTS=
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
;;

stop)
#
# Stop Tomcat
#
PID=`cat /var/run/jsvc.pid`
kill $PID
;;

*)
echo "Usage tomcat.sh start/stop"
exit 1;;
esac

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message