Sometimes we need to re-add or uninstall the Tomcat service at the time of the project deployment, where we can do this at the command prompt, with the following steps:
1. Start-run, typing cmd, enter to open the command prompt.
2. Make a tomcat drive letter, such as D, and directly at the command prompt, D: enter.
3. Use the CD command to enter the bin directory under the Tomcat installation directory (because you want to call the Service.bat file in the folder, huh).
4. Install the Delete Service command format: Service.bat install/remove [service_name]
(1) Install: Service Install if the specified name is TOMCAT5, the service name is Apache Tomcat TOMCAT5 after installation, you can specify no name, and the default is Apache if the command is service install Tomcat.
(2) Delete: Service remove this command is used to remove services named Apache Tomcat, which means that the service name is not specified when the service is installed, if a name is specified at installation (such as Apache Tomcat TOMCAT5).
After the operation is completed, you do not need to restart the computer, directly refresh the service page is OK.
Command line add delete tomcat service