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:[EMAIL PROTECTED]
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:[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]