05 Tomcat多实例
主要作用,尽可能利用系统资源,
[root@centos7 jpress]# cd /tools/ [root@centos7 tools]# ls apache-tomcat-9.0.11.tar.gz [root@centos7 tools]# tar xf apache-tomcat-9.0.11.tar.gz [root@centos7 tools]# cp -a apache-tomcat-9.0.11 tomcat-9-1 [root@centos7 tools]# cp -a apache-tomcat-9.0.11 tomcat-9-2 [root@centos7 tools]# ls apache-tomcat-9.0.11 tomcat-9-1 apache-tomcat-9.0.11.tar.gz tomcat-9-2 [root@centos7 tools]# chown tomcat. tomcat-9-1/ [root@centos7 tools]# chown tomcat. tomcat-9-2 [root@centos7 tools]# sed -i 's#8005#8011#;s#8080#8081#' tomcat-9-1/conf/server.xml [root@centos7 tools]# sed -i 's#8005#8012#;s#8080#8082#' tomcat-9-2/conf/server.xml [root@centos7 tools]# mv tomcat-9-1 tomcat-9-2 /usr/local/ [root@centos7 tools]# /usr/local/tomcat-9-1/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat-9-1 Using CATALINA_HOME: /usr/local/tomcat-9-1 Using CATALINA_TMPDIR: /usr/local/tomcat-9-1/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat-9-1/bin/bootstrap.jar:/usr/local/tomcat-9-1/bin/tomcat-juli.jar Tomcat started. [root@centos7 tools]# /usr/local/tomcat-9-2/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat-9-2 Using CATALINA_HOME: /usr/local/tomcat-9-2 Using CATALINA_TMPDIR: /usr/local/tomcat-9-2/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat-9-2/bin/bootstrap.jar:/usr/local/tomcat-9-2/bin/tomcat-juli.jar Tomcat started. [root@centos7 tools]# netstat -lnutp | grep java tcp6 0 0 127.0.0.1:8005 :::* LISTEN 50750/java tcp6 0 0 :::8009 :::* LISTEN 50750/java tcp6 0 0 127.0.0.1:8011 :::* LISTEN 51239/java tcp6 0 0 127.0.0.1:8012 :::* LISTEN 51293/java tcp6 0 0 :::8080 :::* LISTEN 50750/java tcp6 0 0 :::8081 :::* LISTEN 51239/java tcp6 0 0 :::8082 :::* LISTEN 51293/java
作者:闫世成
出处:http://cnblogs.com/yanshicheng
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。如有问题或建议,请联系上述邮箱,非常感谢。