Re: How can I start Tomcat as a daemon in Linux?
Friday, May 11, 2001 08:29 AM
unless you need the "status" functionality (that can be added, anyway), you can use 'tomcat.sh' directly for that.
I don't know how that distribution works, but I'm pretty sure that you can link thomcat.sh in init.d
ln -s /usr/loca/tomcat/bin/tomcat.sh /etc/rc.d/init.d/tomcat
Then based on the runleve, you can create the Sxx and Kxx links in the appropriate directory. For example, if your runlevel is 3, put the file in rc3.d:
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc3.d/S63tomcat
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc3.d/K37tomcat
(change S63 and K37 according to your starting sequence).
Note: Remember to manually set TOMCAT_HOME and JAVA_HOME inside tomcat.sh, because I'm not sure that the shell script, if executes from there, will be able to guess the two variables.