I'm wondering if there is easier way to start java application (just tomcat server) after machine has been rebooted?

Possible answers:

  • Add the application as a service and then add it using chkconfig <service> on
  • Link in runlevel 5 (e.g /etc/rc.d/rc5.d ) script that just starts the application server? And make it executable.
  • ?

Edit: I didn't notice that I put it in runlevel 6 - reboot... ;)

  • Runlevel 3 and 5 would be appropriate in most cases. Which tomcat-version, which operating system, which distribution, what version? – Nils Nov 16 '12 at 21:20

When you install the tomcat package, there is already an init script (/etc/init.d/tomcat7), which starts tomcat at boot time.

  • if using the .tar.gz file from tomcat.apache.org (which I prefered), then no /etc/init.d/tomcat exists. the tomcat shipped with distro (CentOS, Fedora) caused too many dependencies to install. – LiuYan 刘研 Nov 15 '12 at 16:03
  • Sorry, seems I imagined you're using Debian or Ubuntu. – Olaf Dietsche Nov 15 '12 at 16:16
  • i'm not the OP. :) – LiuYan 刘研 Nov 15 '12 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.