I am attempting, futally, to get tomcat 7 to autostart on boot. I've read several guides online as to methods to accomplish this. In the end I restart and after everything is loaded I can not access localhost:8080. I will include what I know might help as I am in the complete beginners section I am not entirely sure what all to include.
tomcat7 file in /etc/init.d/
Code:
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin
start() {
sh /home/office1/GTS/tomcat/bin/startup.sh
}
stop() {
sh /home/office1/GTS/tomcat/bin/shutdown.sh
}
case $1 in
start|stop) $1;;
restart) stop; start;;
*) echo "Run as $0 <start|stop|restart>"; exit 1;;
esac
Process to add tomcat
Code:
office1@office1:~$ sudo chmod +x /etc/init.d/tomcat7
office1@office1:~$ sudo update-rc.d -f tomcat7 remove
Removing any system startup links for /etc/init.d/tomcat7 ...
/etc/rc0.d/K20tomcat7
/etc/rc1.d/K20tomcat7
/etc/rc2.d/S20tomcat7
/etc/rc3.d/S20tomcat7
/etc/rc4.d/S20tomcat7
/etc/rc5.d/S20tomcat7
/etc/rc6.d/K20tomcat7
office1@office1:~$ sudo update-rc.d -f tomcat7 defaults
update-rc.d: warning: /etc/init.d/tomcat7 missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Adding system startup for /etc/init.d/tomcat7 ...
/etc/rc0.d/K20tomcat7 -> ../init.d/tomcat7
/etc/rc1.d/K20tomcat7 -> ../init.d/tomcat7
/etc/rc6.d/K20tomcat7 -> ../init.d/tomcat7
/etc/rc2.d/S20tomcat7 -> ../init.d/tomcat7
/etc/rc3.d/S20tomcat7 -> ../init.d/tomcat7
/etc/rc4.d/S20tomcat7 -> ../init.d/tomcat7
/etc/rc5.d/S20tomcat7 -> ../init.d/tomcat7
office1@office1:~$ sudo update-rc.d tomcat7 enable
update-rc.d: warning: /etc/init.d/tomcat7 missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Enabling system startup links for /etc/init.d/tomcat7 ...
Removing any system startup links for /etc/init.d/tomcat7 ...
/etc/rc0.d/K20tomcat7
/etc/rc1.d/K20tomcat7
/etc/rc2.d/S20tomcat7
/etc/rc3.d/S20tomcat7
/etc/rc4.d/S20tomcat7
/etc/rc5.d/S20tomcat7
/etc/rc6.d/K20tomcat7
Adding system startup for /etc/init.d/tomcat7 ...
/etc/rc0.d/K20tomcat7 -> ../init.d/tomcat7
/etc/rc1.d/K20tomcat7 -> ../init.d/tomcat7
/etc/rc6.d/K20tomcat7 -> ../init.d/tomcat7
/etc/rc2.d/S20tomcat7 -> ../init.d/tomcat7
/etc/rc3.d/S20tomcat7 -> ../init.d/tomcat7
/etc/rc4.d/S20tomcat7 -> ../init.d/tomcat7
/etc/rc5.d/S20tomcat7 -> ../init.d/tomcat7
Bookmarks