Get the App
SLTechnology News&Howtos  ›  Servers  › 

Tomcat9 installs the windows service

Shulou Source: shulou.com Published: 2022-06-03 09:27:55 12月06日 Update

1. Preparatory work

1.1 download the tomcat package with service.bat at https://tomcat.apache.org

1.2 extract to a custom specified directory

1.3 go to the bin directory, find the service.bat file, open it and edit it

two。 Set the tomcat service name

Search for "set SERVICE_NAME=" to set the tomcat service name

Set SERVICE_NAME=Tomcat9_8080

3. Set the tomcat service display name

Search for "DisplayName" to modify the tomcat service display name

4. Add tomcat to windows service mode 1

Open cmd (run as an administrator if you do not have sufficient permissions) and go to the bin directory of tomcat, and execute the following command:

Service.bat install

Added to the service

Uninstall the windows service for tomcat

Service.bat remove

5. Add tomcat to windows service mode 2

Direct command add

/ / add the service service.bat install service name (customizable, not the same as in the configuration file) / / uninstall the service service.bat remove service name (customizable, not the same as in the configuration file)

Tags: Service name file directory same command method search configuration not enough address permissions administrator identity prepare work manage run Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Xiaomi Huawei Microsoft