Install-free tomcat registration as a windows system service method, tomcat System Service

Source: Internet
Author: User

Install-free tomcat registration as a windows system service method, tomcat System Service
1. Download Tomcat

Tomcat can be downloaded from the http://tomcat.apache.org/web site. Select any region. The zip package under Binary Distributions is both.

2. Configure Tomcat

1. Unzip the decompressed version of tomcat to the corresponding path (for example, D: \ TomcatServer \ rename tomcat to Tomcat1)

2. If the server has multiple tomcat servers, you must modify the port in D: \ TomcatServers \ Tomcat1 \ conf \ server. xml.

<Server port="9071" shutdown="SHUTDOWN"><Connector port="9091" protocol="HTTP/1.1"  connectionTimeout="20000" redirectPort="9061" /><Connector port="9081" protocol="AJP/1.3" redirectPort="9061" />

3. Modify the service. bat file (D: \ TomcatServers \ Tomcat1 \ bin \ service. bat). You can modify the file in two places.

①: Add the following settings at the beginning of the file: java installation path, Tomcat installation path, and service name

SET JAVA_HOME=D:\TomcatServers\Tomcat1\java\jdk1.6.0SET CATALINA_HOME=D:\TomcatServers\Tomcat1SET PR_DISPLAYNAME=Tomcat1

②: Find and modify the following content in the middle of the file

rem Set default Service nameset SERVICE_NAME=Tomcat7
Change
rem Set default Service nameset SERVICE_NAME=Tomcat1
4. Modify shutdown. bat and startup. bat file (D: \ TomcatServers \ Tomcat1 \ bin \ shutdown. bat | startup. bat) These two files are modified in the same way. Add the following content to the file header.

SET JAVA_HOME=D:\TomcatServers\Tomcat1\java\jdk1.6.0SET CATALINA_HOME=D:\TomcatServers\Tomcat1

III, Add Tomcat to the service

Run Win + R to open the run dialog box, enter the cmd command to open the console, and follow the steps shown in the figure to complete registration.


Registered successfully


4. Uninstall the Tomcat Service

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.