转:Linux下同时启动两个Tomcat进行设置

转:

Linux下同时启动两个Tomcat进行设置

解压tar.gztar -zxvf apache-tomcat-6.0.41.tar.gz 至相应的路径下,可解压至两个不同的路径或者相同的路径下不同的文件夹,不需要安装,直接部署程序即可。

接下来修改tomcat文件夹conf目录下的server.xml文件:

<Server port="8015" shutdown="SHUTDOWN">     默认为8005--》修改为8015

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

.........

    <Connector port="8091" protocol="HTTP/1.1"    默认为8080--》修改为8091              

      connectionTimeout="20000"
               redirectPort="8443" />

........

    <Connector port="8019" protocol="AJP/1.3" redirectPort="8443" />      默认为8009--》修改为8019

 

以上三处红色注明的部分修改,只需要两个文件中此三处不同,启动tomcat,成功

 

posted @ 2018-10-17 10:49  Monogem  阅读(608)  评论(0编辑  收藏  举报