单个tomcat多实例部署shell脚本
步聚
- 下载tomcat,解压安装
2.将tomcat下的webapps,conf,temp等目录分别拷至根目录www下A,B,C目录下
3.新建如下脚本restart_tomcat.sh
4.使用restart_tomcat.sh A/B/C
#!/bin/sh
if
then
echo "\033; then
echo -e "\033 or the is no a directory, please check it...\033; then
echo -e "\033 or the is not a file, please check it...\033; then
echo -e "\033 or the is not a directory, please check it...\033;then
. "${CATALINA_BASE}/setenv.sh"
echo "=========load setenv.sh finshed========"
fi
res=ps aux | grep $1|grep "$JAVA_HOME/bin/java"|egrep -v "grep"|awk '{print $2}'
if ; then
echo -e "\033