Windows installs multiple Tomcat services

Source: Internet
Author: User
Tags apache tomcat

1. Download the Tomcat decompression and copy three copies (use the compressed version of the installation version)

2. Configure environment variables Catalina_home and Catalina_base

3Change port To modify file Server.xml, modify 3 port number<server port="8005"shutdown="SHUTDOWN">,port Change to 8015,8025、8035, no conflict can<connector port="8080"Protocol="http/1.1"ConnectionTimeout="20000" Redirectport="8443"/>change 8080 to 8081,8082、8083, no conflict can<connector port="8009"Protocol="ajp/1.3"redirectport="8443"/>,portt Change to 8019,8029、8039, no conflict can
 4  . Change Tomcat to start and close files (Catalina.bat, Startup.bat, Shutdown.bat) For example TOMCAT1, change the %catalina_home% under Batalina.bat to%catalina_home1%,%catalina_base% to% catalina_base1%, change%catalina_home% under Startup.bat and Shutdown.bat to%catalina_home1% Tomcat2 and TOMCAT3 likewise changed. 
7. Modify the contents of the Startup.bat, Shutdown.bat and Catalina.bat files: (1) Open the D:\tomcat-8081\bin\startup.bat file and replace all catalina_home with               Catalina_home1.               (2) Open the D:\tomcat-8081\bin\shutdown.bat file and replace all of the catalina_home with Catalina_home2.           (3) Open the D:\tomcat-8081\bin\catalina.bat file and replace all of the catalina_home with Catalina_home3.          9. Configure tomcat-8080 According to the above method, tomcat-8082. 10. Start Tomcat, and under the command line, go to three different Tomcat installation directories, execute Startup.bat, and start three Tomcat, respectively. Then enter the following in the browser and if the Tomcat home page is displayed, the deployment succeeds: http://localhost:8080 http://localhost:8081 http://localhost:8082

    • Configure Tomcat as a service
          1. Enter the Tomcat-8080/bin directory, modify the Service.bat, find the following, modify the service_name for the custom service name                rem Set default Service name                set service_name=tomcat8080               set Displayname=apache Tomcat 8.0%service_name%          2. Searching for catalina_home in Service.bat and replace all with catalina_home_8080 (consistent with the environment variable name)           3. In the Tomcat-8080/bin directory, Find Tomcat8.exe and Tomcat8w.exe, rename to service_name configuration with the same name, renamed here Tomcat8080.exe and tomcat8080w.exe          4. Use the command line to enter Tomcat-8080/bin, execute service.bat install          5. Use win+ R input services.msc into the service interface, find the displayname corresponding service name (i.e. Apache Tomcat 8.0 tomcat8080), right-click on the "Properties" menu, on the "General" tab, select "Startup Type" to "automatic",  Or go to the Tomcat-8080/bin directory, double-click Tomcat8080w.exe, select the General tab in the popup screen, select startup type Automatic, boot from startup      
    • So far, we've configured three Tomcat on a single server.

Windows installs multiple Tomcat services

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.