tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bussenschutt <>
Subject RE: Tomcat Unix autostart
Date Mon, 11 Dec 2000 23:49:57 GMT
I tried starting tomcat before apache. I see the startupscript
>being executed, but tomcat doesn't start.
>Has anybody working Unix startupscripts for Tomcat?

>Tomcat should start  after Apache during reboot. Also remember to set your 
>classpath in the startup script.

>>I'm trying to start Tomcat whith rebooting a Unix machine.
>>Tomcat seems to start for a moment and then dissappears.
>>I have a startup script in /sbin/rc3.d

My Install on solaris:  (with tomcat installed into /opt/tomcat)

/opt/tomcat/bin/ $@    # run as root
# su nobody -c "/opt/tomcat/bin/ $@"  # or run as nobody

cd /etc/rc2.d/
ln -s ../init.d/tomcat S95tomcat
cd /etc/rc1.d/
ln -s ../init.d/tomcat K25tomcat

Note that if you use the auto-include mod_jk or mod_jserv files in the
apache httpd.conf file, then you should start tomcat BEFORE apache, otherwise
you'll always be reading the old version of the gererated configuration
file, if you don't use the auto-generated one, it doesn't really matter
which order you start them in.

In my case, APACHE is started/stopped with the symbolic links of S99apache
and K25apache, so that (95<99) tomcat always starts first, and (25=25)
always gets stopped at the same time.

Another just as acceptable method would be to just add the tomcat startup
command to the apache start-up script....

edit the /etc/init.d/apache (or equivalent - maybe apache.server or apachectl)

and right after the line:
and right after the line:

In both these cases, the script that eventually gets called is always
/opt/tomcat/bin/ , and you need to make sure that when you run
that script manually (with option of 'start') it doesn't actually gererate
any errors.    To be on the safe side, I added two lines to that script (at
the top before any real code) that defined the TOMCAT_HOME and JAVA_HOME
environment variables:

TOMCAT_HOME=/opt/tomcat ; export TOMCAT_HOME
JAVA_HOME=/usr/java ; export JAVA_HOME

Note that in many cases this isn't really necessary as the script
is fairly good at figuring them out, but I like to play it safe.

Hope this helps someone.


At 10:08 AM 12/11/00 +0100, you wrote:
>>Jan Stevens
>>Software Developer
>>CMG Maastricht B.V. -Telecom Products
>>*       Adelbert van Scharnlaan 170A            *       043 - 6018185
>>         6224 JX Maastricht                                      *
>>- 6018169

David Bussenschutt          Email:
Senior Computing Support Officer & Systems Administrator/Programmer
Location: Griffith University. Information Technology Services
          Brisbane Qld. Aust.  (TEN bldg. rm 1.33) Ph: (07)38757079

View raw message