标签:syntax height stream yum visible imp sof server image
#!/bin/bashrpm -ivh jdk-8u131-linux-x64_.rpm[ `grep JAVA_HOME /etc/profile | wc -l` -ne 4 ];thenecho -e ‘export JAVA_HOME=/usr/java/jdk1.8.0_131\nexport JAVA_BIN=/usr/javak1.8.0_131/bin\nexport PATH=$PATH:$JAVA_HOME/bin\nexport CLASSPATH=.:$JAVA_HOMEb/dt.jar:$JAVA_HOMEb/tools.jar\nexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH‘ >> /etc/profilefisource /etc/profiletar xfz apache-tomcat-7.0.47.tar.gzmv apache-tomcat-7.0.47 /opt/tomcat1tar xfz apache-tomcat-7.0.47.tar.gzmv apache-tomcat-7.0.47 /opt/tomcat2sed -i ‘s/8009/18009/‘ /opt/tomcat2/conf/server.xmlsed -i ‘s/8005/18005/‘ /opt/tomcat2/conf/server.xmlsed -i ‘s/8080/18080/‘ /opt/tomcat2/conf/server.xmlyum -y install supervisorsystemctl start supervisordtouch /etc/supervisord.d/tomcat1.initouch /etc/supervisord.d/tomcat2.iniecho -e ‘[program:tomcat1]command=/opt/tomcat1/bin/catalina.sh run‘ >> /etc/supervisord.d/tomcat1.iniecho -e ‘[program:tomcat2]command=/opt/tomcat2/bin/catalina.sh run‘ >> /etc/supervisord.d/tomcat2.inisystemctl restart supervisordyum -y install gcc gcc-c++ pcre-devel zlib-develtar xfz nginx-1.12.0.tar.gzcd nginx-1.12.0 && ./configure && make && make installsed -i ‘/#gzip on;/aupstream tomcat{‘ /usr/local/nginx/conf/nginx.confsed -i ‘/upstream tomcat{/aserver 10.0.0.41:8080;‘ /usr/local/nginx/conf/nginx.confsed -i ‘/server 10.0.0.41:8080;/aserver 10.0.0.41:18080;‘ /usr/local/nginx/conf/nginx.confsed -i ‘/server 10.0.0.41:18080;/a\}‘ /usr/local/nginx/conf/nginx.confsed -i ‘s/index.htm;$/index.jsp;/‘ /usr/local/nginx/conf/nginx.confsed -i ‘/404.html;/alocation ~ \.jsp$ {‘ /usr/local/nginx/conf/nginx.confsed -i ‘/location ~ \.jsp$ {/aproxy_pass http://tomcat;‘ /usr/local/nginx/conf/nginx.confsed -i ‘/proxy_pass http:\/\/tomcat;/a\}‘ /usr/local/nginx/conf/nginx.conf/usr/local/nginx/sbin/nginx|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bashrpm -ivh jdk-8u131-linux-x64_.rpmif [ `grep JAVA_HOME /etc/profile | wc -l` -ne 4 ];thenecho -e ‘export JAVA_HOME=/usr/java/jdk1.8.0_131\nexport JAVA_BIN=/usr/javak1.8.0_131/bin\nexport PATH=$PATH:$JAVA_HOME/bin\nexport CLASSPATH=.:$JAVA_HOMEb/dt.jar:$JAVA_HOMEb/tools.jar\nexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH‘ >> /etc/profilefisource /etc/profiletar xfz apache-tomcat-7.0.47.tar.gzmv apache-tomcat-7.0.47 /opt/tomcat1tar xfz apache-tomcat-7.0.47.tar.gzmv apache-tomcat-7.0.47 /opt/tomcat2sed -i ‘s/8009/18009/‘ /opt/tomcat2/conf/server.xmlsed -i ‘s/8005/18005/‘ /opt/tomcat2/conf/server.xmlsed -i ‘s/8080/18080/‘ /opt/tomcat2/conf/server.xmlyum -y install supervisorsystemctl start supervisordtouch /etc/supervisord.d/tomcat1.initouch /etc/supervisord.d/tomcat2.iniecho -e ‘[program:tomcat1]command=/opt/tomcat1/bin/catalina.sh run‘ >> /etc/supervisord.d/tomcat1.iniecho -e ‘[program:tomcat2]command=/opt/tomcat2/bin/catalina.sh run‘ >> /etc/supervisord.d/tomcat2.inisystemctl restart supervisordyum -y install gcc gcc-c++ pcre-devel zlib-develtar xfz nginx-1.12.0.tar.gzcd nginx-1.12.0 && ./configure && make && make installsed -i ‘/#gzip on;/aupstream tomcat{‘ /usr/local/nginx/conf/nginx.confsed -i ‘/upstream tomcat{/aserver 10.0.0.41:8080;‘ /usr/local/nginx/conf/nginx.confsed -i ‘/server 10.0.0.41:8080;/aserver 10.0.0.41:18080;‘ /usr/local/nginx/conf/nginx.confsed -i ‘/server 10.0.0.41:18080;/a\}‘ /usr/local/nginx/conf/nginx.confsed -i ‘s/index.htm;$/index.jsp;/‘ /usr/local/nginx/conf/nginx.confsed -i ‘/404.html;/alocation ~ \.jsp$ {‘ /usr/local/nginx/conf/nginx.confsed -i ‘/location ~ \.jsp$ {/aproxy_pass http://tomcat;‘ /usr/local/nginx/conf/nginx.confsed -i ‘/proxy_pass http:\/\/tomcat;/a\}‘ /usr/local/nginx/conf/nginx.conf/usr/local/nginx/sbin/nginx |
标签:syntax height stream yum visible imp sof server image
原文地址:https://www.cnblogs.com/wanglinyan/p/12752575.html