Windows deploys multiple tomcat detailed steps

Deploy multiple tomcat servers on the same windows device

One: Download tomcat and decompress it three times at the same time, named tomcat-8080, tomcat-8081, tomcat-8082 respectively

 

 

Two: Add environment variables: Right-click My Computer -> Select Properties -> Select Advanced -> Select Environment Variables: Add System Variables:

CATALINA_HOME_8080,其值为:F:\tomcat7.0\tomcat-8080;
CATALINA_HOME_8081,其值为:F:\tomcat7.0\tomcat-8081;
CATALINA_HOME_8082,其值为:F:\tomcat7.0\tomcat-8082;

Add environment variables


Three: Modify the startup and shutdown ports in the server.xml configuration:

 

Enter the F:\tomcat7.0\tomcat-8080\conf directory, open the server.xml configuration file, and modify the following aspects:

(1): <server port="8006" shutdown="SHUTDOWN">
        Modify this port="8006" so that its shutdown port does not conflict with another shutdown port.
(2):<Connector port="8081" maxHttpHeaderSize="8192"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000 " disableUploadTimeout="true" />
        Modify port="8081" so that its connection port does not conflict with another.
(3):<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
        Modify this port="8010" so that its AJP port does not conflict with another one.

(1):<server port="8006" shutdown="SHUTDOWN">
        修改这个port=”8006”,使得它的关闭端口和另一个关闭端口不发生冲突。
(2):<Connector port="8081" maxHttpHeaderSize="8192"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true" />
        修改port=”8081”,使得它的连接端口和另一个不冲突。
(3):<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
        修改这个port=”8010”,使得它的AJP端口和另一个不冲突。


(1): Modify this port=”8006” so that its closed port does not conflict with another closed port. Note that this port must be changed, otherwise the tomcat window will easily crash when you start it.

(2): Modify port=”8081” so that its connection port does not conflict with another one.


(3): Modify this port="8010" so that its AJP port does not conflict with another one.

Similarly, enter F:\tomcat7.0\tomcat-8081\conf and F:\tomcat7.0\tomcat-8082\conf to modify the server.xml configuration information, and the ports of the three tomcats should not be the same. .

Four: Modify the contents of startup.bat, shutdown.bat, catalina.bat, and service.bat files under F:\tomcat7.0\tomcat-8080\bin:

(1):打开F:\tomcat7.0\tomcat-8080\bin\startup.bat文件,把其中所有CATALINA_HOME全部替换为CATALINA_HOME_8080。 ***此处的CATALINA_HOME_8080与环境变量中的值对应***
(2):打开F:\tomcat7.0\tomcat-8080\bin\shutdown.bat文件,把其中所有CATALINA_HOME全部替换为CATALINA_HOME_8080。 ***此处的CATALINA_HOME_8080与环境变量中的值对应***
(3):打开F:\tomcat7.0\tomcat-8080\bin\catalina.bat文件,把其中所有CATALINA_HOME全部替换为CATALINA_HOME_8080  ***此处的CATALINA_HOME_8080与环境变量中的值对应***

Configure tomcat-8081 and tomcat-8082 servers in the same way

Five: Run the startup.bat in the bin directory, and visit the browser separately:
     http://localhost:8080
     http://localhost:8081
     http://localhost:8082
The port should be based on the configuration in server.xml ! !
So far, three tomcat servers have been deployed on one windows...

If tomcat starts Chinese garbled characters, change all the Chinese codes of logging.properties under conf to GBK

Guess you like

Origin blog.csdn.net/k0307x1990y/article/details/126483391