I tried two ways:
Add the following in etc/rc.local:
export JAVA_HOME=/home/phoenies/jdk1.6.0_17
export JRE_HOME=/home/phoenies/jdk1.6.0_17/jre
export CLASSPATH=.:/home/phoenies/jdk1.6.0_17/lib/*
/home/phoenies/scarab-0.21/tomcat/bin/startup.shRun this:
ln -s -t /etc/init.d /home/phoenies/scarab-0.21/tomcat/bin/startup.sh
mv /etc/init.d/startup.sh /etc/init.d/tomcat
update-rc.d tomcat defaults 99
Neither worked. I've made sure all scripts have the permission to run. I've checked with sysv-rc-conf
that rc.local and tomcat would run in runlevels 2-5. And I can startup tomcat manually by double-clicking either of them. Anyone knows why tomcat still doesn't autostart?
My OS is Ubuntu 9.04, Tomcat 4.1 is included in Scarab 0.21 as you can see.
Edit: I've just checked all runlevels in sysv-rc-conf
, and this time it worked! I'm not familiar with the concept runlevel. Would someone kindly explain what runlevel my OS is running on? And what are other runlevels for? Thanks.
Reedit: runlevel
told me the current runlevel is 2. I don't understand... :(