标签:bsp oca start XML pre down name tom sed
1 #!/bin/bash 2 #by zhangjia 3 #2019年2月18日20:39:23 4 #shell_name:tomcat_auto_install.sh 5 ###################################3333 6 set -e 7 yum install -y vim wget java-1.8.0-openjdk* 8 #tomcat版本 9 TOMCAT_PACK="apache-tomcat-8.5.38" 10 #tomcat运行端口 11 PORT="1111" 12 cd /usr/src 13 wget -c http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.38/bin/${TOMCAT_PACK}.tar.gz 14 tar -xzvf ${TOMCAT_PACK}.tar.gz 15 mv ${TOMCAT_PACK} tomcat-8 16 #重点 17 #sed -i "s#<Connector port=\"8080\" protocol=\"HTTP/1.1\"#<Connector port=\""${PORT}"\" protocol=\"HTTP/1.1\"#g" /usr/src/tomcat-8/conf/server.xml 18 #[[ /usr/src/tomcat-8/bin/shutdown.sh ]] && echo -e "\033[32m tomcat is down \033[0m" 19 /usr/local/tomcat-8/bin/startup.sh 20 firewall-cmd --zone=public --add-port=${PORT}/tcp --permanent 21 firewall-cmd --reload 22 netstat -natp |grep ${PORT} 23 echo -e "\033[41;32m================\033[0m" 24 ps aut |grep tomcat
标签:bsp oca start XML pre down name tom sed
原文地址:https://www.cnblogs.com/zhj5551/p/11198214.html