#!/bin/ bash # description: Tomcat7 Start Stop Restart # processname: tomcat7 # chkconfig: 234 20 80 JAVA_HOME =/usr/ local /jdk1. 7 .0_17 export JAVA_HOME PATH =$JAVA_HOME/ bin:$PATH export PATH #CATALINA_HOME=/u01/ tomcat case $ 1 in start) sh $CATALINA_HOME /bin/ startup.sh ;; stop) sh $CATALINA_HOME /bin/ shutdown.sh ;; restart) sh $CATALINA_HOME /bin/ shutdown.sh sh $CATALINA_HOME /bin/ startup.sh ;; esac exit 0
可以使用如下命令启动和停止Tomcat
/etc/init.d/tomcat restart