日期:2014-05-16  浏览次数:20781 次

在linux下重启tomcat的脚本

第一种脚本:?

Java代码??收藏代码
  1. #/bin/sh??
  2. java=$(ps?-aux?|grep?java?|sed?-n??'1p'?|awk?'{print?$2}');??
  3. kill?-9?$java;??
  4. rm?/usr/local/tomcat-5.0.28/logs/catalina.*?-rf??
  5. rm?/usr/local/tomcat-5.0.28/work/Catalina/?-rf??
  6. sh?/usr/local/tomcat-5.0.28/bin/startup.sh??
  7. tail?-f?/usr/local/tomcat-5.0.28/logs/catalina.*??

第二种脚本(这种功能比较厉害一点,不是很懂这种启动):?
#!/bin/sh?
# -----------------------------------------?
# Start Script for the CATALINA Server?