You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stuart Stephen <st...@talkics.com> on 2003/08/20 10:19:55 UTC

Installing Tomcat as a Service

Hi all,

How might I go about installing Tomcat as a service in RedHat 9.0. I've
never installed a service under linux manually before and I'm not sure what
to do. I can't find the appropriate documentation in the manuals for either
Tomcat or RedHat. I must be looking in the wrong places :O(

UNRELATED: Also, If I wanted to install a java program as a service, how
might I do this? Is this a similar process?

Regards,
Stuart



Re: Installing Tomcat as a Service

Posted by John Turner <to...@johnturner.com>.
Here you go:

Oscar's page should be all you need:

http://daydream.stanford.edu/tomcat/install_web_services.html

Check the bottom of the page for his tomcatd script.  Then use

/sbin/chkconfig --add tomcatd

to install it.

John

Stuart Stephen wrote:

> I already have done the hard work of intergrating apache and tomcat together
> in the desired way. I now need to install the services. Going to the RPM is
> a backward step for me now. Ideally i'd like to understand how the services
> are installed under the linux os now.
> 
> I'll still have to research it to get the Java applications started as
> services.
> 
> -----Original Message-----
> From: Manolo Ramirez T. [mailto:manolo@handsoftware.net]
> Sent: 20 August 2003 15:02
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> Hi,
> 
> Check this:
> 
> http://www.jpackage.org
> 
> They have the rpm version of tomcat, that will make all the hard work
> for you.
> 
> Regards.
> 
> ____________
> Manolo Ramirez T.
> 
> Stuart Stephen wrote:
> 
>>Hi all,
>>
>>How might I go about installing Tomcat as a service in RedHat 9.0. I've
>>never installed a service under linux manually before and I'm not sure
> 
> what
> 
>>to do. I can't find the appropriate documentation in the manuals for
> 
> either
> 
>>Tomcat or RedHat. I must be looking in the wrong places :O(
>>
>>UNRELATED: Also, If I wanted to install a java program as a service, how
>>might I do this? Is this a similar process?
>>
>>Regards,
>>Stuart
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 



Re: Installing Tomcat as a Service

Posted by John Turner <to...@johnturner.com>.
Here you go:

Oscar's page should be all you need:

http://daydream.stanford.edu/tomcat/install_web_services.html

Check the bottom of the page for his tomcatd script.  Then use

/sbin/chkconfig --add tomcatd

to install it.

John

Stuart Stephen wrote:

> I already have done the hard work of intergrating apache and tomcat together
> in the desired way. I now need to install the services. Going to the RPM is
> a backward step for me now. Ideally i'd like to understand how the services
> are installed under the linux os now.
> 
> I'll still have to research it to get the Java applications started as
> services.
> 
> -----Original Message-----
> From: Manolo Ramirez T. [mailto:manolo@handsoftware.net]
> Sent: 20 August 2003 15:02
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> Hi,
> 
> Check this:
> 
> http://www.jpackage.org
> 
> They have the rpm version of tomcat, that will make all the hard work
> for you.
> 
> Regards.
> 
> ____________
> Manolo Ramirez T.
> 
> Stuart Stephen wrote:
> 
>>Hi all,
>>
>>How might I go about installing Tomcat as a service in RedHat 9.0. I've
>>never installed a service under linux manually before and I'm not sure
> 
> what
> 
>>to do. I can't find the appropriate documentation in the manuals for
> 
> either
> 
>>Tomcat or RedHat. I must be looking in the wrong places :O(
>>
>>UNRELATED: Also, If I wanted to install a java program as a service, how
>>might I do this? Is this a similar process?
>>
>>Regards,
>>Stuart
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Installing Tomcat as a Service

Posted by James Harman <ha...@yahoo.com>.
Stuart,

You basically need to write a wrapper .sh script to
tart tomcat and put it into the init.d directory. The
init.d directory varies with the linux distro but
common places a /etc/init.d and /etc/rc.d/init.d. 
Then you need to create sym links to start/stop it on
the various run levels.  I refer you to your
documention on services under RedHat.

I believe that somebody mentioned that there is a
catalin.sh script that works as a service, so you may
not need to write one.

In most of the RedHat distros that I have used, there
is a script in the init.d directory named httpd that
takes care of stopping and starting apache as a
service.

I would look at the other scripts in init.d for
information on how to write one.

James

--- Stuart Stephen <st...@talkics.com> wrote:
> I already have done the hard work of intergrating
> apache and tomcat together
> in the desired way. I now need to install the
> services. Going to the RPM is
> a backward step for me now. Ideally i'd like to
> understand how the services
> are installed under the linux os now.
> 
> I'll still have to research it to get the Java
> applications started as
> services.
> 
> -----Original Message-----
> From: Manolo Ramirez T.
> [mailto:manolo@handsoftware.net]
> Sent: 20 August 2003 15:02
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> Hi,
> 
> Check this:
> 
> http://www.jpackage.org
> 
> They have the rpm version of tomcat, that will make
> all the hard work
> for you.
> 
> Regards.
> 
> ____________
> Manolo Ramirez T.
> 
> Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a
> service in RedHat 9.0. I've
> > never installed a service under linux manually
> before and I'm not sure
> what
> > to do. I can't find the appropriate documentation
> in the manuals for
> either
> > Tomcat or RedHat. I must be looking in the wrong
> places :O(
> >
> > UNRELATED: Also, If I wanted to install a java
> program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> >
> >
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


=====
Choose the Sprite when the Coke is placed before you...

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Installing Tomcat as a Service

Posted by James Harman <ha...@yahoo.com>.
Stuart,

You basically need to write a wrapper .sh script to
tart tomcat and put it into the init.d directory. The
init.d directory varies with the linux distro but
common places a /etc/init.d and /etc/rc.d/init.d. 
Then you need to create sym links to start/stop it on
the various run levels.  I refer you to your
documention on services under RedHat.

I believe that somebody mentioned that there is a
catalin.sh script that works as a service, so you may
not need to write one.

In most of the RedHat distros that I have used, there
is a script in the init.d directory named httpd that
takes care of stopping and starting apache as a
service.

I would look at the other scripts in init.d for
information on how to write one.

James

--- Stuart Stephen <st...@talkics.com> wrote:
> I already have done the hard work of intergrating
> apache and tomcat together
> in the desired way. I now need to install the
> services. Going to the RPM is
> a backward step for me now. Ideally i'd like to
> understand how the services
> are installed under the linux os now.
> 
> I'll still have to research it to get the Java
> applications started as
> services.
> 
> -----Original Message-----
> From: Manolo Ramirez T.
> [mailto:manolo@handsoftware.net]
> Sent: 20 August 2003 15:02
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> Hi,
> 
> Check this:
> 
> http://www.jpackage.org
> 
> They have the rpm version of tomcat, that will make
> all the hard work
> for you.
> 
> Regards.
> 
> ____________
> Manolo Ramirez T.
> 
> Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a
> service in RedHat 9.0. I've
> > never installed a service under linux manually
> before and I'm not sure
> what
> > to do. I can't find the appropriate documentation
> in the manuals for
> either
> > Tomcat or RedHat. I must be looking in the wrong
> places :O(
> >
> > UNRELATED: Also, If I wanted to install a java
> program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> >
> >
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


=====
Choose the Sprite when the Coke is placed before you...

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

RE: Installing Tomcat as a Service

Posted by Stuart Stephen <st...@talkics.com>.
I already have done the hard work of intergrating apache and tomcat together
in the desired way. I now need to install the services. Going to the RPM is
a backward step for me now. Ideally i'd like to understand how the services
are installed under the linux os now.

I'll still have to research it to get the Java applications started as
services.

-----Original Message-----
From: Manolo Ramirez T. [mailto:manolo@handsoftware.net]
Sent: 20 August 2003 15:02
To: Tomcat Users List
Subject: Re: Installing Tomcat as a Service


Hi,

Check this:

http://www.jpackage.org

They have the rpm version of tomcat, that will make all the hard work
for you.

Regards.

____________
Manolo Ramirez T.

Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure
what
> to do. I can't find the appropriate documentation in the manuals for
either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Installing Tomcat as a Service

Posted by Stuart Stephen <st...@talkics.com>.
I already have done the hard work of intergrating apache and tomcat together
in the desired way. I now need to install the services. Going to the RPM is
a backward step for me now. Ideally i'd like to understand how the services
are installed under the linux os now.

I'll still have to research it to get the Java applications started as
services.

-----Original Message-----
From: Manolo Ramirez T. [mailto:manolo@handsoftware.net]
Sent: 20 August 2003 15:02
To: Tomcat Users List
Subject: Re: Installing Tomcat as a Service


Hi,

Check this:

http://www.jpackage.org

They have the rpm version of tomcat, that will make all the hard work
for you.

Regards.

____________
Manolo Ramirez T.

Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure
what
> to do. I can't find the appropriate documentation in the manuals for
either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




Re: Installing Tomcat as a Service

Posted by "Manolo Ramirez T." <ma...@handsoftware.net>.
Hi,

Check this:

http://www.jpackage.org

They have the rpm version of tomcat, that will make all the hard work 
for you.

Regards.

____________
Manolo Ramirez T.

Stuart Stephen wrote:
> Hi all,
> 
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure what
> to do. I can't find the appropriate documentation in the manuals for either
> Tomcat or RedHat. I must be looking in the wrong places :O(
> 
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
> 
> Regards,
> Stuart
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Installing Tomcat as a Service

Posted by Paul Yunusov <py...@rogers.com>.
On August 20, 2003 10:56 am, Stuart Stephen wrote:
> Thanks for the reply, I've tried creating a script in the /etc/init.d
> directory and then running the chkconfig --add script-name and this hasn't
> worked for me.
>
> I'm getting an error saying that:
> service service-name does not support chkconfig
>
> I must still be doing something wrong?
>
> The script has the same permissions showing in the ls -l list?
>

It's not about permissions, it's about the format of the script. From the 
chkconfig man page:
-----------------
RUNLEVEL FILES
       Each  service which should be manageable by chkconfig needs two or more 
commented lines added to its init.d
       script. The first line tells chkconfig what runlevels the service 
should be started in by default, as  well
       as  the start and stop priority levels. If the service should not, by 
default, be started in any runlevels,
       a - should be used in place of the runlevels list.  The second line 
contains a description for the service,
       and may be extended across multiple lines with backslash continuation.

       For example, random.init has these three lines:
       # chkconfig: 2345 20 80
       # description: Saves and restores system entropy pool for \
       #              higher quality random number generation.
       This says that the random script should be started in levels 2, 3, 4, 
and 5, that its start priority should
       be 20, and that its stop priority should be 80.  You should be able to  
figure  out  what  the  description
       says; the \ causes the line to be continued.  The extra space in front 
of the line is ignored.
-----------------

Make sure your script has this line and ALL three numbers are present (read 
above to figure out what they are):
# chkconfig: 2345 20 80


Paul


> -----Original Message-----
> From: Paul Yunusov [mailto:pyunusov@rogers.com]
> Sent: 20 August 2003 13:24
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
>
> On August 20, 2003 04:19 am, Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a service in RedHat 9.0. I've
> > never installed a service under linux manually before and I'm not sure
>
> what
>
> > to do. I can't find the appropriate documentation in the manuals for
>
> either
>
> > Tomcat or RedHat. I must be looking in the wrong places :O(
> >
> > UNRELATED: Also, If I wanted to install a java program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
>
> man chkconfig
> man serviceconf
> man init
>
> For a Java program, write a wrapper shell script like Tomcat authors did
> with
> catalina.sh.
>
> Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Installing Tomcat as a Service

Posted by Paul Yunusov <py...@rogers.com>.
On August 20, 2003 10:56 am, Stuart Stephen wrote:
> Thanks for the reply, I've tried creating a script in the /etc/init.d
> directory and then running the chkconfig --add script-name and this hasn't
> worked for me.
>
> I'm getting an error saying that:
> service service-name does not support chkconfig
>
> I must still be doing something wrong?
>
> The script has the same permissions showing in the ls -l list?
>

It's not about permissions, it's about the format of the script. From the 
chkconfig man page:
-----------------
RUNLEVEL FILES
       Each  service which should be manageable by chkconfig needs two or more 
commented lines added to its init.d
       script. The first line tells chkconfig what runlevels the service 
should be started in by default, as  well
       as  the start and stop priority levels. If the service should not, by 
default, be started in any runlevels,
       a - should be used in place of the runlevels list.  The second line 
contains a description for the service,
       and may be extended across multiple lines with backslash continuation.

       For example, random.init has these three lines:
       # chkconfig: 2345 20 80
       # description: Saves and restores system entropy pool for \
       #              higher quality random number generation.
       This says that the random script should be started in levels 2, 3, 4, 
and 5, that its start priority should
       be 20, and that its stop priority should be 80.  You should be able to  
figure  out  what  the  description
       says; the \ causes the line to be continued.  The extra space in front 
of the line is ignored.
-----------------

Make sure your script has this line and ALL three numbers are present (read 
above to figure out what they are):
# chkconfig: 2345 20 80


Paul


> -----Original Message-----
> From: Paul Yunusov [mailto:pyunusov@rogers.com]
> Sent: 20 August 2003 13:24
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
>
> On August 20, 2003 04:19 am, Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a service in RedHat 9.0. I've
> > never installed a service under linux manually before and I'm not sure
>
> what
>
> > to do. I can't find the appropriate documentation in the manuals for
>
> either
>
> > Tomcat or RedHat. I must be looking in the wrong places :O(
> >
> > UNRELATED: Also, If I wanted to install a java program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
>
> man chkconfig
> man serviceconf
> man init
>
> For a Java program, write a wrapper shell script like Tomcat authors did
> with
> catalina.sh.
>
> Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Installing Tomcat as a Service

Posted by Steph Richardson <st...@kvasar.com>.
Sounds like your problem can be easily solved by reading the manpage, as the previous email from Paul suggests.
man chkconfig
will tell you exactly why "service service-name does not support chkconfig"
you need specially formatted comments starting with something like "# chkconfig : 2345 80 20"




> -----Original Message-----
> From: Stuart Stephen [mailto:stuart.stephen@talkics.com]
> Sent: Wednesday, August 20, 2003 10:57 AM
> To: Tomcat Users List
> Subject: RE: Installing Tomcat as a Service
> 
> 
> Thanks for the reply, I've tried creating a script in the /etc/init.d
> directory and then running the chkconfig --add script-name and this hasn't
> worked for me.
> 
> I'm getting an error saying that:
> service service-name does not support chkconfig
> 
> I must still be doing something wrong?
> 
> The script has the same permissions showing in the ls -l list?
> 
> -----Original Message-----
> From: Paul Yunusov [mailto:pyunusov@rogers.com]
> Sent: 20 August 2003 13:24
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> On August 20, 2003 04:19 am, Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a service in RedHat 9.0. I've
> > never installed a service under linux manually before and I'm not sure
> what
> > to do. I can't find the appropriate documentation in the manuals for
> either
> > Tomcat or RedHat. I must be looking in the wrong places :O(
> >
> > UNRELATED: Also, If I wanted to install a java program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
> 
> man chkconfig
> man serviceconf
> man init
> 
> For a Java program, write a wrapper shell script like Tomcat authors did
> with
> catalina.sh.
> 
> Paul
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Installing Tomcat as a Service

Posted by "Mike Cherichetti (Renegade Internet)" <mi...@renegadeinternet.com>.
I use the following script on RedHat 7.3 (I save this as
/etc/rc.d/init.d/tomcat):

#!/bin/bash
#
# Startup script for the Tomcat Web Server
#
# chkconfig: 345 84 16
# description: Tomcat is a World Wide Web server.  It is used to serve \
#              HTML, JSP, and servlets, and CGI if needed.
# processname: java

case "$1" in
  start)
        $CATALINA_HOME/bin/startup.sh
        ;;
  stop)
        $CATALINA_HOME/bin/shutdown.sh
        ;;
  *)
        echo $"Usage: tomcat {start|stop}"
        exit 1
esac

exit 0

I then do the following with chkconfig:

chkconfig --add tomcat
chkconfig --level 345 tomcat on
chkconfig --list tomcat

If that still doesn't work, ensure that you've set CATALINA_HOME and
JAVA_HOME in /etc/profile.

Hope that helps,
Mike

-----Original Message-----
From: Stuart Stephen [mailto:stuart.stephen@talkics.com]
Sent: Wednesday, August 20, 2003 10:57 AM
To: Tomcat Users List
Subject: RE: Installing Tomcat as a Service


Thanks for the reply, I've tried creating a script in the /etc/init.d
directory and then running the chkconfig --add script-name and this hasn't
worked for me.

I'm getting an error saying that:
service service-name does not support chkconfig

I must still be doing something wrong?

The script has the same permissions showing in the ls -l list?

-----Original Message-----
From: Paul Yunusov [mailto:pyunusov@rogers.com]
Sent: 20 August 2003 13:24
To: Tomcat Users List
Subject: Re: Installing Tomcat as a Service


On August 20, 2003 04:19 am, Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure
what
> to do. I can't find the appropriate documentation in the manuals for
either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart

man chkconfig
man serviceconf
man init

For a Java program, write a wrapper shell script like Tomcat authors did
with
catalina.sh.

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org






RE: Installing Tomcat as a Service

Posted by Steph Richardson <st...@kvasar.com>.
Sounds like your problem can be easily solved by reading the manpage, as the previous email from Paul suggests.
man chkconfig
will tell you exactly why "service service-name does not support chkconfig"
you need specially formatted comments starting with something like "# chkconfig : 2345 80 20"




> -----Original Message-----
> From: Stuart Stephen [mailto:stuart.stephen@talkics.com]
> Sent: Wednesday, August 20, 2003 10:57 AM
> To: Tomcat Users List
> Subject: RE: Installing Tomcat as a Service
> 
> 
> Thanks for the reply, I've tried creating a script in the /etc/init.d
> directory and then running the chkconfig --add script-name and this hasn't
> worked for me.
> 
> I'm getting an error saying that:
> service service-name does not support chkconfig
> 
> I must still be doing something wrong?
> 
> The script has the same permissions showing in the ls -l list?
> 
> -----Original Message-----
> From: Paul Yunusov [mailto:pyunusov@rogers.com]
> Sent: 20 August 2003 13:24
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> On August 20, 2003 04:19 am, Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a service in RedHat 9.0. I've
> > never installed a service under linux manually before and I'm not sure
> what
> > to do. I can't find the appropriate documentation in the manuals for
> either
> > Tomcat or RedHat. I must be looking in the wrong places :O(
> >
> > UNRELATED: Also, If I wanted to install a java program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
> 
> man chkconfig
> man serviceconf
> man init
> 
> For a Java program, write a wrapper shell script like Tomcat authors did
> with
> catalina.sh.
> 
> Paul
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 

RE: Installing Tomcat as a Service

Posted by "Mike Cherichetti (Renegade Internet)" <mi...@renegadeinternet.com>.
I use the following script on RedHat 7.3 (I save this as
/etc/rc.d/init.d/tomcat):

#!/bin/bash
#
# Startup script for the Tomcat Web Server
#
# chkconfig: 345 84 16
# description: Tomcat is a World Wide Web server.  It is used to serve \
#              HTML, JSP, and servlets, and CGI if needed.
# processname: java

case "$1" in
  start)
        $CATALINA_HOME/bin/startup.sh
        ;;
  stop)
        $CATALINA_HOME/bin/shutdown.sh
        ;;
  *)
        echo $"Usage: tomcat {start|stop}"
        exit 1
esac

exit 0

I then do the following with chkconfig:

chkconfig --add tomcat
chkconfig --level 345 tomcat on
chkconfig --list tomcat

If that still doesn't work, ensure that you've set CATALINA_HOME and
JAVA_HOME in /etc/profile.

Hope that helps,
Mike

-----Original Message-----
From: Stuart Stephen [mailto:stuart.stephen@talkics.com]
Sent: Wednesday, August 20, 2003 10:57 AM
To: Tomcat Users List
Subject: RE: Installing Tomcat as a Service


Thanks for the reply, I've tried creating a script in the /etc/init.d
directory and then running the chkconfig --add script-name and this hasn't
worked for me.

I'm getting an error saying that:
service service-name does not support chkconfig

I must still be doing something wrong?

The script has the same permissions showing in the ls -l list?

-----Original Message-----
From: Paul Yunusov [mailto:pyunusov@rogers.com]
Sent: 20 August 2003 13:24
To: Tomcat Users List
Subject: Re: Installing Tomcat as a Service


On August 20, 2003 04:19 am, Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure
what
> to do. I can't find the appropriate documentation in the manuals for
either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart

man chkconfig
man serviceconf
man init

For a Java program, write a wrapper shell script like Tomcat authors did
with
catalina.sh.

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Installing Tomcat as a Service

Posted by Stuart Stephen <st...@talkics.com>.
Thanks for the reply, I've tried creating a script in the /etc/init.d
directory and then running the chkconfig --add script-name and this hasn't
worked for me.

I'm getting an error saying that:
service service-name does not support chkconfig

I must still be doing something wrong?

The script has the same permissions showing in the ls -l list?

-----Original Message-----
From: Paul Yunusov [mailto:pyunusov@rogers.com]
Sent: 20 August 2003 13:24
To: Tomcat Users List
Subject: Re: Installing Tomcat as a Service


On August 20, 2003 04:19 am, Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure
what
> to do. I can't find the appropriate documentation in the manuals for
either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart

man chkconfig
man serviceconf
man init

For a Java program, write a wrapper shell script like Tomcat authors did
with
catalina.sh.

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




RE: Installing Tomcat as a Service

Posted by Stuart Stephen <st...@talkics.com>.
Thanks for the reply, I've tried creating a script in the /etc/init.d
directory and then running the chkconfig --add script-name and this hasn't
worked for me.

I'm getting an error saying that:
service service-name does not support chkconfig

I must still be doing something wrong?

The script has the same permissions showing in the ls -l list?

-----Original Message-----
From: Paul Yunusov [mailto:pyunusov@rogers.com]
Sent: 20 August 2003 13:24
To: Tomcat Users List
Subject: Re: Installing Tomcat as a Service


On August 20, 2003 04:19 am, Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure
what
> to do. I can't find the appropriate documentation in the manuals for
either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart

man chkconfig
man serviceconf
man init

For a Java program, write a wrapper shell script like Tomcat authors did
with
catalina.sh.

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Installing Tomcat as a Service

Posted by Paul Yunusov <py...@rogers.com>.
On August 20, 2003 04:19 am, Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure what
> to do. I can't find the appropriate documentation in the manuals for either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart

man chkconfig
man serviceconf
man init

For a Java program, write a wrapper shell script like Tomcat authors did with 
catalina.sh.

Paul


Re: Installing Tomcat as a Service

Posted by Paul Yunusov <py...@rogers.com>.
On August 20, 2003 04:19 am, Stuart Stephen wrote:
> Hi all,
>
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure what
> to do. I can't find the appropriate documentation in the manuals for either
> Tomcat or RedHat. I must be looking in the wrong places :O(
>
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
>
> Regards,
> Stuart

man chkconfig
man serviceconf
man init

For a Java program, write a wrapper shell script like Tomcat authors did with 
catalina.sh.

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Installing Tomcat as a Service

Posted by "Manolo Ramirez T." <ma...@handsoftware.net>.
Hi,

Check this:

http://www.jpackage.org

They have the rpm version of tomcat, that will make all the hard work 
for you.

Regards.

____________
Manolo Ramirez T.

Stuart Stephen wrote:
> Hi all,
> 
> How might I go about installing Tomcat as a service in RedHat 9.0. I've
> never installed a service under linux manually before and I'm not sure what
> to do. I can't find the appropriate documentation in the manuals for either
> Tomcat or RedHat. I must be looking in the wrong places :O(
> 
> UNRELATED: Also, If I wanted to install a java program as a service, how
> might I do this? Is this a similar process?
> 
> Regards,
> Stuart
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
>