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
3. Set the tomcat service display name
Search "DisplayName", modify the tomcat service display name
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
It has been added to the service
Uninstall the tomcat windows service
service.bat remove
5. Add to tomcat windows service Second way
Adding direct command
// 添加服务
service.bat install 服务名(可自定义,不与配置文件中的相同)
// 卸载服务
service.bat remove 服务名(可自定义,不与配置文件中的相同)