Tomcat unable to start automatically on system startup !

kmthien

Senior member
Oct 8, 2002
363
0
0
Hi guys,

I did the following to let Tomcat start automatically when system startup :

cd /etc
cp /usr/local/tomcat/bin/catalina.sh init.d/

I added the followings to the end of catalina.sh
JAVA_HOME="/usr/local/java"
CATALINA_HOME="/usr/local/tomcat"

and comment the following line in catalina.sh also
#CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`

Linking it to init.d s follows:
ln -s init.d/catalina.sh rc2.d/S90tomcat
ln -s init.d/catalina.sh rc3.d/S90tomcat
ln -s init.d/catalina.sh rc4.d/S90tomcat
ln -s init.d/catalina.sh rc5.d/S90tomcat
ln -s init.d/catalina.sh rc0.d/K19tomcat

Restart the server but the Tomcat didn't start and I still have to go to /usr/local/tomcat/bin/ and enter ./startup.sh to startup the tomcat webserver

FYI, I am using a standalone Redhat 7.3 Linux Server !

Pls help, Thanks !
 

manly

Lifer
Jan 25, 2000
13,316
4,091
136
Hint:
Create your symlink from the runlevel directory, and not /etc:

cd /etc/rc3.d/
ln -s ../init.d/catalina.sh S90tomcat

But you might as well rename catalina.sh to tomcat for consistency.

I can't imagine why you'd want to start Tomcat in any runlevel besides 3 and 5.