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:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> 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]