# cd /etc/init.d
# vi tomcat
#!/bin/sh
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
#JAVA_HOME=/usr/local/java/jdk
#export JAVA_HOME
#PATH=$JAVA_HOME/bin:$PATH
#export PATH
#Source function library.
. /etc/rc.d/init.d/functions
source /etc/profile
export TOMCAT_HOME=/usr/local/tomcat
# See how we were called.
case "$1" in
start)
echo -n "Starting tomcat EXPERIMENTAL: "
daemon $TOMCAT_HOME/bin/startup.sh
echo
;;
stop)
echo -n "Shutting down tomcat EXPERIMENTAL: "
daemon $TOMCAT_HOME/bin/shutdown.sh
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
#JAVA_HOME=/usr/local/java/jdk
#export JAVA_HOME
#PATH=$JAVA_HOME/bin:$PATH
#export PATH
#Source function library.
. /etc/rc.d/init.d/functions
source /etc/profile
export TOMCAT_HOME=/usr/local/tomcat
# See how we were called.
case "$1" in
start)
echo -n "Starting tomcat EXPERIMENTAL: "
daemon $TOMCAT_HOME/bin/startup.sh
echo
;;
stop)
echo -n "Shutting down tomcat EXPERIMENTAL: "
daemon $TOMCAT_HOME/bin/shutdown.sh
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
# chmod 755 tomcat
# chkconfig --add tomcat
# chkconfig --level 234 tomcat on
# chkconfig --list tomcat
댓글 없음:
댓글 쓰기