Reputation: 83
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.sh
Run 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... :(
Upvotes: 1
Views: 1861
Reputation: 96109
Runlevels are to start different things at different points in the start sequence.
You can also use them as a sort of partial reboot.
Tradiationally they are:
and 0 = halt (but SO's list wont do 0 because Jeff doesn't know 'C' )
For ubuntu/debian based Linux they aren't used as much, the system always runs in 2. the startup is handled by a program called 'startup'
Upvotes: 0
Reputation: 17577
Most likely, startup.sh
doesn't have executable bit set.
chmod +x startup.sh
I have seen this issue with at least couple of software packages which bundle Tomcat.
Upvotes: 1