Tomcat9 install windows service

1. Preparations

There service.bat of tomcat 1.1 download compressed package, download address https://tomcat.apache.org
1.2 unzipped to the specified directory custom
1.3 into the bin directory, find service.bat file, open and edit

2. Set the tomcat service name

Search "set SERVICE_NAME =", set the tomcat service name

set SERVICE_NAME=Tomcat9_8080

Tomcat9 install windows service

3. Set the tomcat service display name

Search "DisplayName", modify the tomcat service display name

Tomcat9 install windows service

4. Add tomcat windows service to a way

Open cmd (if your authority is not already running as administrator) into the bin directory under the tomcat, execute the following command:

service.bat install

Tomcat9 install windows service

It has been added to the service

Tomcat9 install windows service

Uninstall the tomcat windows service

service.bat remove

Tomcat9 install windows service

5. Add to tomcat windows service Second way

Adding direct command

// 添加服务
service.bat install 服务名(可自定义,不与配置文件中的相同)
// 卸载服务
service.bat remove 服务名(可自定义,不与配置文件中的相同)

Guess you like

Origin blog.51cto.com/1197822/2450025