歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Tomcat 6在Ubuntu8.04上設置自啟動腳本分享

Tomcat 6在Ubuntu8.04上設置自啟動腳本分享

日期:2017/2/28 17:04:19   编辑:Linux教程

其它的都跟coldfusion那篇差不多,就直接獻上Tomcat 6在Ubuntu8.04上設置自啟動腳本 吧:

/etc/init.d/tomcat

#!/bin/sh
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid

export JAVA_HOME=/usr/lib/jvm/java-6-sun

case $1 in
start)
sh /opt/apache-tomcat-6.0.16/bin/startup.sh
;;
stop)
sh /opt/apache-tomcat-6.0.16/bin/shutdown.sh
;;
restart)
sh /opt/apache-tomcat-6.0.16/bin/shutdown.sh
sh /opt/apache-tomcat-6.0.16/bin/startup.sh
;;
*)
echo 'Usage:tomcat start|stop|restart'
;;
esac

exit 0

Copyright © Linux教程網 All Rights Reserved