Tomcat5自启动脚本
vi /etc/init.d/tomcat5
#!/bin/bash
#
# tomcat5 Startup script for the Tomcat JSP Server
#
# chkconfig: - 85 15
# description: Tomcat JSP Server
# processname: tomcat5
# config: /usr/local/tomcat5/conf/server.conf
# pidfile: /var/run/tomcat.pid
export JRE_HOME=/usr/java/jdk1.6.0_02/
case "$1" in
start)
sh /usr/local/tomcat5/bin/startup.sh
;;
stop)
sh /usr/local/tomcat5/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat5/bin/shutdown.sh
sh /usr/local/tomcat5/bin/startup.sh
;;
*)
echo $"Usage: tomcat5 {start|stop|restart}"
exit 1
esac
exit 0
chmod 755 /etc/init.d/tomcat5
chkconfig --add tomcat5
chkconfig --levels 2345 tomcat5 on