tomcat is registered as a windows service

 

Original: http://blog.csdn.net/bigbird2012/article/details/6407825

(Note: The compressed version of tomcat7 is discussed here, and it is registered as a windows system service. You can set automatic startup and manual operations. The installation version (exe) of tomcat is installed by default and will be registered as a window service, which can be based on your own needs. , Ignore this article after installing exe. The compressed version of tomcat6 is not registered to the window service file by default. Of course, if you have to use the compressed version of tomcat to register the service, you can copy it from other installed versions or higher compressed versions Install service.bat in the bin directory and modify the relevant configuration.)

 

Operation steps: 1. Enter the cmd command in " Start  " → " Run  " to enter the MS-DOS interface  2. cd to the bin directory of tomcat        C:/>  cd tomcat/bin 3. Run the command service install, you can Tomcat is registered as a system service        c:/tomcat/bin>  service install (After executing this line, a tomcat service has been added to the Windows system service list at this time)       Run the command service uninstall to delete the service.       c:/tomcat/bin>  service uninstall (After executing this line, the tomcat service has been deleted, and it is listed in the Windows system service list)       Of course, the service startup type registered in this way is manual; if you want to set it to start automatically at boot, then You need to modify the service.bat file in the bin directory.       Open this file, and output  echo The service '%SERVICE_NAME%' has been installed in       the  third -to-last line. Line: start=auto, between auto and equal sign is 


 

 

 



            

             If there is a space , remember)
      is OK, the tomcat service will start automatically after booting up. 

Note:      The command to start/stop the tomcat service is as follows:             Start the tomcat service: c:/tomcat> net start tomcat6            Stop the tomcat service: c:/ tomcat> net stop tomcat6or       open the "Services" dialog box and manually click the "Start" | "Stop" button to operate. 

 
 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326274407&siteId=291194637