반응형
JAVA_HOME 경로랑 TOMCAT_HOME 경로만 시스템에 맞게 수정해서 사용하면 잘 동작할 것 같다.

퍼옴 : http://toplogical.blogspot.kr/2014/03/centos-64-tomcat.html

$ 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



$ chmod 755 tomcat
$ chkconfig --add tomcat
$ chkconfig --level 234 tomcat on
$ chkconfig --list tomcat


반응형
,