首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux停tomcat快速启动

2013-11-02 
linux下tomcat快速启动#!/bin/shtomcatpath/qn/sys_tomcatcase $1 instop)cd $tomcatpath/bin./shutdown.

linux下tomcat快速启动
#!/bin/sh
tomcatpath=/qn/sys_tomcat
case $1 in
         stop)
           cd $tomcatpath/bin
           ./shutdown.sh
           sleep 3
          # SER=`netstat -nlp | grep :9090 | awk '{print $7}'|cut -d'/' -f1`
           SER=`ps -ef|grep /qn/sys_tomcat|grep -v grep|awk '{print $2}'|cut -d'/' -f1`
           echo $SER
           kill -9 $SER
           echo "tomcat stop"
           ;;
        start)
             cd /qn/servers
             cp -f qq.war $tomcatpath/webapps
            
             cd $tomcatpath/webapps
             rm -rf qq
          
             cd $tomcatpath/bin
             ./startup.sh
              echo "sleet start"
              sleep 3
              echo "sleep end"
             cp -r /qn/qqlib/ $tomcatpath/webapps/qq/WEB-INF/lib
            
        
            SER=`ps -ef|grep /qn/sys_tomcat|grep -v grep|awk '{print $2}'|cut -d'/' -f1`
             echo $SER
             kill -9 $SER
             nohup ./startup.sh &
             ;;
       restart)
            cd $tomcatpath/bin
           ./shutdown.sh
            sleep 3
           # SER=`netstat -nlp | grep :9090 | awk '{print $7}'|cut -d'/' -f1`
           SER=`ps -ef|grep /qn/sys_tomcat|grep -v grep|awk '{print $2}'|cut -d'/' -f1`
           echo $SER
            kill -9 $SER
            
            nohup ./startup.sh &
            ;;
       *)
          echo error param
       ;;
       esac

热点排行