tomcat单机多实例 supervisord管理 脚本
#!/bin/bash systemctl stop firewalld setenforce 0 setenforce 0 yum -y install epel-release yum -y install supervisor touch /etc/supervisord.d/tomcat.ini echo > /etc/supervisord.d/tomcat.ini java -version > /dev/null if [ $? -ne 0 ];then cd /opt/ rpm -ivh jdk-8u131-linux-x64_.rpm fi mkdir /opt/tomcat for i in `seq 1 3` do c8009=`expr 8009 + $i ` c8005=`expr 8005 + $i ` c8080=`expr 8080 + $i ` mkdir /opt/tomcat/tomcat$i cd /opt/ tar -zxvf apache-tomcat-8.5.35.tar.gz mv apache-tomcat-8.5.35 /opt/tomcat/tomcat$i/apache-tomcat-8.5.35 cd /opt/tomcat/tomcat$i/apache-tomcat-8.5.35/conf sed -i "s#8009#$c8009#g" server.xml sed -i "s#8080#$c8080#g" server.xml sed -i "s#8005#$c8085#g" server.xml cat >>/etc/supervisord.d/tomcat.ini<<EOF [program:tomcat$i] command=/opt/tomcat/tomcat$i/apache-tomcat-8.5.35/bin/catalina.sh run EOF done supervisord -n
相关推荐
liwf 2020-06-10
ooouuuooouuu 2020-05-09
wintelx 2020-04-30
CoderBoom 2015-07-07
liusarazhang 2019-11-03
ningningmingming 2019-07-10
88991030 2019-06-02
86133550 2019-09-05
七夕小子 2019-09-05
fhxyxzw 2019-08-19
热爱技术热爱生活 2015-09-24
projectharbor 2019-07-01
sevenpolaris 2015-07-14
vitavae 2019-06-30
周小董 2015-07-07