How to enable multiple Tomcat on a single computer and configure which specific Tomcat the system recognizes

Source: Internet
Author: User

Basically, you start a tomcat on only one computer, and booting multiple Tomcat will prompt for errors and other related failures. And if debugging load balancing and clustering, you need to open multiple Tomcat on a computer, then how to open it?

Method/Step

  1. The first thing to know is that we need to configure environment variables when we do not start Tomcat through other tools such as Eclipse and manually start Tomcat. When we start Tomcat, we need to read the relevant configuration in the environment variable to run. In other words, if I have more than one tomcat, it starts with Tomcat in the environment variable. This will cause the boot to fail because of a port conflict.
  2. If we want to start multiple tomcat, we need to do it in the environment variable. Tomcat environment variable is catalina_home, if we want to configure multiple, you can configure environment variables such as CATALINA_HOME1,CATALINA_HOME2, variable name casually named, the value is Tomcat directory.
  1. If we want to start two Tomcat and copy Tomcat to two, create an environment variable catalina_home1,catalina_home2 of two tomcat directories respectively.
  1. We also need to modify the Catalina.bat and Startup.bat two files in the bin directory of Tomcat. Replace the catalina_home in two files with the environment variables we set, such as Catalina_home1 or catalina_home2
  1. 5

OK, after configuration, we just need to change the Tomcat port to be different, we can realize the function of multi-open, as to how to modify the Tomcat port, you can see the resources.

(go) How to turn on multiple tomcat on a single computer and configure which specific Tomcat the system recognizes

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.