Reproduced: the same computer teach you to configure multiple Tomcat environment variables

Tomcat are installed two 6.0 and 7.0 may want to run tomcat6.0 but actually run tomcat7.0 two versions are used decompress the package is actually not only run 7.0 running tomcat6.0 two environment variables are configured .
Port also changed or not

I encountered this situation, I wonder if we have not met, my solution is as follows:
When the first start tomcat, tomcat server.xml port in the back no matter how change will still be reported to the port conflict. Later in the dos run only to find all the tomcat CATALINA_HOME and CATALINA_BASE will find two environment variables (CATALINA_HOME this variable points to the installation directory of tomcat, tomcat CATALINA_BASE point to the working directory, if only a tomcat service under a working directory, then this two variables the same path, if you want to use the same multiple stage tomcat directory service, the variable pointing to their own directory), and therefore the following steps:

1. Use compressed version of tomcat can not use the installation version.
2. The first tomcat configuration will remain unchanged.
3. Increase environmental variables CATALINA_HOME2, the value of the new tomcat address; increase environmental variables CATALINA_BASE2, the value of the new tomcat address.
4. Modify the new tomcat startup.bat, wherein the CATALINA_HOME to CATALINA_HOME2. (Note that all of the inside
CATALINA_HOME into CATALINA_HOME2 below, too)

5. Modify the new tomcat catalina.bat, wherein the CATALINA_HOME to CATALINA_HOME2, CATALINA_BASE to CATALINA_BASE2.
6. Modify conf / server.xml file:
6.1 <Server Port = "8006" = the shutdown "the SHUTDOWN"> is not the port to port (original 8005) used.
6.2 <Connector Port = "8081" maxHttpHeaderSize = "8192"
the maxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"
enableLookups = "to false" the redirectPort = "8443" acceptCount to = "100"
connectionTimeout = "20000" disableUploadTimeout = "true" /> is not the port to port (original 8080) used.
6.3 <Connector Port = "8010"
enableLookups = "to false" the redirectPort = "8443" Protocol = "AJP / 1.3" /> is not the port to port (original 8009) used.

7 success!

8 third, fourth, etc. ..... N servers 3-6 with reference to sequence steps!
----------------
Disclaimer: This article is the original article CSDN bloggers "qq_35661171", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/qq_35661171/article/details/78524270

Guess you like

Origin www.cnblogs.com/smile502/p/11753378.html