Here's my rc.local script that i used to start the Tomcat and Apache
automatically..... however i did not have any script that startup Apache and
Tomcat both at boot time..... i just added the isStarted and if statement,
and haven't test on it, maybe u would wanna try on it, no success is
guaranteed though :p ..... If anyone else have a better options then u could
use theirs. PS: to use this script u must have the httpd and tomcat4 script
in ur /etc/rc.d/init.d folder, which i think should come with the
installation of the Apache and tomcat4..... u should be able to get these
script from the web if u dun have them......

Hope this helps:

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

service httpd start

isStarted=`ps -ef | grep -i "httpd" | grep -v grep | awk {'print $2'} |
head -1`

if [ $isStarted > "0" ] then

    service tomcat4 start

fi



----- Original Message ----- 
From: "dummy" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>;
<[EMAIL PROTECTED]>
Sent: Wednesday, July 20, 2005 3:19 PM
Subject: RE: tomcat as service under linux how-to


> Do u hv the example script for this ? That's what I mean actually. Sorry
for
> the previous mail.
>
> -----Original Message-----
> From: Foo Shyn [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 20, 2005 11:18 AM
> To: Tomcat Users List
> Subject: Re: tomcat as service under linux how-to
>
> Put a script that starts Apache and Tomcat into the /etc/rc.d/init.d
folder.
> U can modify the rc.local script to run the script when Linux boot.
> U can run a ps -ef | grep command to check whether Tomcat is running
before
> u start running Apache. By the way, y do u need to start Tomcat first
before
> starting Apache? if u wanna do connection between Apache and Tomcat using
> mod_jk, i think that starting Apache first before starting Tomcat is the
> way, just my opinion though.
>
> BTW, Google is your friend.
>
> F.S.
>
> ----- Original Message ----- 
> From: "dummy" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, July 20, 2005 9:29 AM
> Subject: tomcat as service under linux how-to
>
>
> > Hi,
> >
> > I would like to know how to start-up tomcat as services under LINUX and
at
> > the same time start-up apache after tomcat has started.
> > How to check whether tomcat is already started before apache is started
?
> >
> > I don't have this on windows system.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to