Welcome 微信登录

首页 / 操作系统 / Linux / Tomcat在Linux下的启动与停止Shell

#!/bin/shsto(){echo "stop.........."/bin/kill -9 `exec ps ax|grep java|grep -v grep|awk "{print $1}"`}sta(){echo "start........."/opt/tomcat-5.5.16/bin/startup.sh}case $1 in        start)  sta;;        stop)   sto;;        restart)        sto;echo "restart....";sleep 3;sta;;        *)      sto;sleep 2;sta;;esac