tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Mueller <To...@BristolFarms.com>
Subject RE: Starting Tomcat at bootup.
Date Tue, 14 Nov 2000 23:45:26 GMT
Thanks to all!

This works like a charm. 

Note: I needed to add - 
export JAVA_HOME=/usr/local/jdk1.2.2 
to the script since the tomcat.sh could not find my java.

Hope this helps others

Tony

-----Original Message-----
From: Mike La Budde [mailto:mike.labudde@irista.com]
Sent: Tuesday, November 14, 2000 3:22 PM
To: tomcat-user@jakarta.apache.org
Cc: 'tomcat-user@jakarta.apache.org'
Subject: Re: Starting Tomcat at bootup.


Tony:

If you want full sysv init-style scripts you can put this in
/etc/rc.d/init.d:

#!/bin/sh
#
# Startup script for Tomcat
#
# chkconfig: 345 93 06
# description: start|stop|restart Tomcat (the JSP/Servlet engine)
#

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
   start)
         echo -n "Starting tomcat: "
         /opt/tomcat/bin/startup.sh
         echo
         ;;
   stop)
         echo -n "Shutting down tomcat: "
         /opt/tomcat/bin/shutdown.sh
         ;;
   restart)
         $0 stop
         $0 start
         ;;
   *)
         echo "Usage: $0 {start|stop|restart|reload|status}"
         exit 1
esac

exit 0


Then add it via:

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

This will start tomcat for run levels 3, 4, and 5 and stop tomcat for the 
others.

HTH,

Mike


At 11/14/2000 02:51 PM -0800, Tony Mueller wrote:
>Hi,
>
>Im running RedHat 6.2 and Tomcat 3.1.
>I would like to have Tomcat automatically start up at boot time.
>Does anyone have a way to do this?
>
>Thanks in advance!
>
>Tony Mueller

Mime
View raw message