Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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... ;)

share|improve this question
    
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
add comment

1 Answer

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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