tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Tomcat does not start automatically on boot
Date Fri, 13 Oct 2000 19:07:28 GMT
Paul Hoepfner-Homme wrote:

> Hi guys, I couldn't find any information about this topic at the Tomcat
> site, including the mailing list archives.  I'm trying to get Tomcat to
> run automatically when the server boots so that if the power goes out or
> an administrator needs to reboot the server, for example, Tomcat will be
> started automatically at the right time (just before Apache).
> I did what somebody on this mailing list suggested:  I put a link in
> /etc/rc.d/rc3.d called S97tomcat to /usr/local/tomcat/bin/
> This link works fine when I try "/etc/rc.d/rc3.d/S97tomcat start" and
> "/etc/rc.d/rc3.d/S97tomcat stop" manually, but I tried rebooting the
> server and Tomcat didn't start up automatically (and I know that the
> system defaults to init level 3 when it boots).

You need to do one additional thing to enable the automatic part of startup:

    cd /etc/rc.d/init.d
    ln -s ../rc3.d/

To do shutdowns, you would normally use a "Kxx" type filename, because those
are the ones that get processed automatically.  So, in your "rc3.d"
directory, link to your file as well, and do:

    cd /etc/rc.d/init.d
    ln -s ../rc3.d/

> I know very little about Linux "init", so maybe I've missed an essential
> step.  I'd rather not set it up so that Apache loads Tomcat.  I want
> Tomcat and Apache to be running independently, and I want Tomcat to
> start before Apache.

The two digits after the "S" or "K", by the way, are used to determine the
order in which the startup scripts are run.  So, to make sure that Tomcat
starts first, set up your auto-start for Apache to have a higher number,
like "S98apache" or something.

None of this is specific to Tomcat, or even to Linux ... most any Unix
system that is derived from "System 5" roots (like Solaris) has an
initialization system that operates in this way.  I would suggest you
consult the sysadmin documentation for your OS for more information on this.

> Sorry if someone has posted this before, but I couldn't find any
> reference to it in the list archives.
> Thanks,
> Paul

Craig McClanahan

See you at ApacheCon Europe <>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat

View raw message