Windows Tomcat installation and registering multiple Tomcat as Windows services

Source: Internet
Author: User
Tags apache tomcat

First, the application scenario

Although Windows is no longer the first choice for us as a server operating system platform, there are some developers or the overall requirements of the project must be run under the Windows System platform. To avoid the administrative inconvenience of multiple applications deployed under the same tomcat, or the conflicting scenarios in which different applications are dependent, multiple Tomcat services need to be run on a single server, and multiple tomcat needs to be registered as Windows System services. Here's how to configure the relevant application in this scenario.

Ii. Tomcat installation Package selection

The selection of the installation package, taking Tomcat6 as an example, has the following options:

    1. Apache-tomcat-6.0.53-windows-x64.zip
    2. Apache-tomcat-6.0.53-windows-x86.zip
    3. Apache-tomcat-6.0.53.exe
    4. Apache-tomcat-6.0.53.zip

1, 2 is an installation package that contains the Windows service components and some dependent components

3 is an EXE executable file, is the simplest installation method, but its installation directory is missing some debugging and other related components.

4 is a green version that does not contain the Windows service component

As well as server-side service operation, management, troubleshooting and other factors, it is recommended to choose 1 or 22 kinds of packages to install according to the operating system platform.

Three, Tomcat installation configuration

1, install this version of Tomcat support JDK, relatively simple is not too much to repeat, the installation path is: C:\Program files\java\jdk1.6.0_45

2, the installation package decompression to place the installation directory, such as D Drive, the path is: D:\apache-tomcat-6.0.53

3. Registering Tomcat as a Windows service

3.1 Modify Service.bat File

Set java_home=c: \program Files\java\jdk1.6.0_45set Catalina_base=d:\apache-tomcat-6.0.  - set catalina_base=d:\apache-tomcat-6.0.  -

3.2 Execute the registration command in the cmd command

Install

3.3 In the Service Control Panel we can see the registered Tomcat service

3.3 Launch the Tomcat service, right click on the service click Start

The service status has changed to started, indicating that the Tomcat service started successfully

3.4 Open Browser Authentication http://127.0.0.1:8080, display the following interface indicates that the installation started service successfully.

Iv. registering multiple Tomcat as a Windows service

4.1 Copy Tomcat, rename folder to Tomcat-web

4.2 Modifying the Server.xml configuration file

Modify the files in 8005, 8080, 8009 to unused ports, such as 8105, 8081, 8109.

<ServerPort= "8105"shutdown= "SHUTDOWN">...... Omit Row<ConnectorPort= "8081"Protocol= "http/1.1"ConnectionTimeout= "20000"Redirectport= "8443" />...... Omit Row<ConnectorPort= "8109"Protocol= "ajp/1.3"Redirectport= "8443" />

4.3 Modify Service.bat file

Set Java_home=c:\program files\java\jdk1. 6 . 0_45set catalina_base2=d:\tomcat-webset catalina_home2=d:\tomcat-web
Set Service_name=tomcat6-web
rem Changes many catalina_base in the file to Catalina_base2rem to change the file Catalina_home to Catalina_home2rem to change Tomcat6.exe in the file Tomcat6 -web.exe

4.4 Renaming Tomcat.exe and Tomcat6w.exe execution files

Rename Tomcat.exe to Tomcat6-web.exe

Rename Tomcat6w.exe to Tomcat6-webw.exe

4.4 Execute Registration command

Install

4.5 Viewing the Services control Panel, added an Apache Tomcat 6.0 tomcat6-web Tomcat service

4.6 parameter setup via the Tomcat6-web.exe Control Panel

1) Use this control panel to start, stop, pause, and restart Tomcat

2) Work This control panel can configure the JVM parameters

4.7 After the service starts, enter http://127.0.0.1:8081 in the browser, if the following interface appears, the installation configuration is successful.

This completes the installation configuration operation for installing Tomcat under Windows and registering multiple Tomcat as Windows services.

If you feel that my article is useful to you, please feel free to make a reward. Your support will encourage me to continue to create!



Windows Tomcat installation and registering multiple Tomcat as Windows 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.