One machine runs two or more Tomcat servers at the same time

Source: Internet
Author: User
Today, the manager handed me a task and asked me to install another tomcat for testing on the server, because our system has used the function of calling the mobile cmpp sms interface to send text messages to customers, which limits the IP address, debugging can only be performed on the server. No, I used to think about running two tomcat servers on my own machine at the same time. I thought it would be okay if I changed the port number.

Today, the manager handed me a task and asked me to install anotherMcAt, because our system uses the function of calling the mobile cmpp sms interface to send text messages to customers, which limits IP addresses and can only be debugged on servers. No, I used to think about running two tom at the same time on my own machine.CatI thought it would be okay to change the port number. In fact, this is only one step.

After the first tomcat is startedServerNo matter how you change the port in. xml, a port conflict is still reported. After running in dos, we found that all tomcat servers will be searched.

CATALINA _HOMEAnd CATALINA _BASEThe two environment variables are as follows:
1. UseCompressionVersion of tomcat cannot use the installation version.
2. The configuration of the First tomcat remains unchanged.
3. Add the environment variable CATALINA_HOME2 with the new tomcat address and the environment variable CATALINA_BASE2 with the new tomcat address.
4. ModifyStartup. batChange CATALINA_HOME to catalina_home2.
5. ModifyCatalina. batChange CATALINA_HOME to CATALINA_HOME2 and CATALINA_BASE to CATALINA_BASE2.
6. Modify the conf/server. xml file:
6.1 Change the port to no used port.
6.2 MaxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"
EnableLookups = "fa LsE "r EdIrectPort = "8443" acceptCount = "100"
ConnectionTimeout = "20000" disableUploadTimeout =" TrUe "/> change the port to the unused port.
6.3 EnableLookups = "false" redirectPort = "8443" proto Col= "AJP/1.3"/> change the port to the unused port.
7 successful!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.