欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Tomcat停止与启动shell

程序员文章站 2022-07-12 23:51:03
...

 

#!/bin/sh
export JAVA_HOME=/usr/java/jdk1.6.0_20/
pid=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'`
echo "kill tomcat pid "$pid
kill -9 $pid
sleep 3
echo "==========start tomcat============"
'/usr/local/tomcat/bin/startup.sh'
sleep 3
/usr/local/apache/bin/apachectl restart
echo "=========Apache Restart OK ==========="