tomcat开机启动脚本-创新互联
1、桂林网站制作公司哪家好,找创新互联公司!从网页设计、网站建设、微信开发、APP开发、自适应网站建设等网站项目制作,到程序开发,运营维护。创新互联公司从2013年成立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联公司。
tomcat启动脚本有两个不同的版本:
#!/bin/sh
#chmod +x
#chkconfig --add
# tomcat-amazon
#
# chkconfig: - 98 02
#
export JAVA_HOME=/usr/local/java/jdk1.6.0_45
suffix=amazon
prog=tomcat-$suffix
TOMCAT_HOME=/usr/local/tomcat-7.0.54Ajob
export $JAVA_HOME
start_tomcat=$TOMCAT_HOME/bin/startup.sh
stop_tomcat=$TOMCAT_HOME/bin/shutdown.sh
lockfile=/var/lock/subsys/$prog
start() {
echo -n "Starting tomcat-amazon: "
${start_tomcat}
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n "Shutdown tomcat-amazon"
${stop_tomcat}
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
sleep 1
start
}
reload() {
restart
}
#how we were called
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 2
esac
exit 0
新闻标题:tomcat开机启动脚本-创新互联
网页网址:http://myzitong.com/article/deeghg.html
tomcat启动脚本有两个不同的版本:
#!/bin/sh
#chmod +x
#chkconfig --add
# tomcat-amazon
#
# chkconfig: - 98 02
#
export JAVA_HOME=/usr/local/java/jdk1.6.0_45
suffix=amazon
prog=tomcat-$suffix
TOMCAT_HOME=/usr/local/tomcat-7.0.54Ajob
export $JAVA_HOME
start_tomcat=$TOMCAT_HOME/bin/startup.sh
stop_tomcat=$TOMCAT_HOME/bin/shutdown.sh
lockfile=/var/lock/subsys/$prog
start() {
echo -n "Starting tomcat-amazon: "
${start_tomcat}
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n "Shutdown tomcat-amazon"
${stop_tomcat}
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
sleep 1
start
}
reload() {
restart
}
#how we were called
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 2
esac
exit 0
新闻标题:tomcat开机启动脚本-创新互联
网页网址:http://myzitong.com/article/deeghg.html