tksysv, ntsysv, chkconfig, Tomcat, and Ubuntu :-)
Behrang Saeedzadeh
behrangsa at gmail.com
Fri Feb 25 13:04:34 UTC 2005
Hi all
I've found the following instructions for how to start up Tomcat (see
jakarta.apache.org for more info) when the system starts up. However
it needs one of tksysv, ntsysv, or chkconfig that I can see none of
them is available on my system. Now that neither of these tools are
available on my system, how can I set Tomcat to startup automatically
when my system starts up?
Also it asks to save the init script in /etc/rc.d/init.d but I think
in Ubuntu I've to save it in /etc/init.d am I right?
Best regards and thanks in advance,
Behrang S.
#!/bin/sh
# Tomcat init script for Linux.
#
# chkconfig: 345 63 37
# description: Tomcat Automatic Startup/Shutdown on Linux
JAVA_HOME=/usr/java/j2sdk1.4.1
CATALINA_HOME=/usr/local/jakarta-tomcat-4.1.24
export JAVA_HOME CATALINA_HOME
exec $CATALINA_HOME/bin/catalina.sh $*
Save this script in a file named tomcat4, change the file ownership and group to
root, and then chmod it to 755:
# chown root.root tomcat4
# chmod 755 tomcat4
Copy the script to the /etc/rc.d/init.d directory after modifying the JAVA_HOME
CATALINA_HOME environment variables to fit your system. Then, set the new
tomcat4 service to start and stop automatically by using tksysv, ntsysv, or
chkconfig as shown earlier in this section.
--
Behrang Saeedzadeh
http://www.jroller.com/page/behrangsa
More information about the ubuntu-users
mailing list