注:start.sh
123456 CATALINA_HOME="/data/apache-tomcat-7.0.68"
CATALINA_BASE="/data/site.aaa.com"
export CATALINA_BASE CATALINA_HOME
echo "$CATALINA_HOME"
echo $PATH
$CATALINA_HOME/bin/catalina.sh start
stop.sh
123456 CATALINA_HOME="/data/apache-tomcat-7.0.68"
CATALINA_BASE="/data/site.aaa.com"
export CATALINA_BASE CATALINA_HOME
echo "$CATALINA_HOME"
echo $PATH
$CATALINA_HOME/bin/catalina.sh stop
6.执行同步推送
salt 'test' state.highstate
观察是否全部为success,如果有fail,查看具体失败原因,解决问题后可继续推送。
更多Tomcat相关教程见以下内容:
RedHat Linux 5.5安装JDK+Tomcat并部署Java项目
Linux下使用Xshell查看Tomcat实时日志中文乱码解决方案
CentOS 64-bit下安装JDK和Tomcat并设置Tomcat开机启动操作步骤
Ubuntu 16.04下安装Tomcat 8.5.9