http://ykyfendou.iteye.com/blog/2032916
With a project developed by Tomcat, when we deliver the project to the customer, the customer does not want to start the Tomcat server at each boot, and hopefully he can boot with the system. Or configure him as a service for Windows, which starts with the start of the service. However, the green decompression version of Tomcat will not appear directly in Windows services. We need to configure it before we can.
Configuration method:
a . Add to Windows in the service:
1. First, before setting up the Tomcat boot automatically, you need to configure the environment variables of JAVA and the environment variables of Tomcat, namely: Path,classpath,java_home,catalina_home four environment variables. Description of how to configure:
PATH: Configured in the bin directory of the JDK;
CLASSPATH: Configured in the Lib directory of the JDK;
Java_home: Configuration to the root directory of the JDK;
Catalina_home: Configuration to the root directory of Tomcat;
Please refer to other documentation for configuration and verification of configuration success.
2. At the end of the path variable, add the following paragraph:
;%catalina_home%\bin (note semicolons are essential!) )
The portion between% represents the value that references catalina_home.
When configuring this section, you must configure the environment variables of the first step to be OK.
3. Open Run (win+r), cmd, use the cmd command to enter the bin directory of the Tomcat installation path:
Then execute the command: Service.bat install
The service ' TOMCAT7 ' has been installed instructions to set up services successfully.
4. Open the Windows service:
(Win key +r simultaneously press.) Enter Service.msc. or turn on Control Panel-Administrative Tools-services)
Locate the Apache Tomcat service to modify its runlevel (auto, manual, etc.).
If you want Tomcat to boot automatically, double-click the service, select Automatic in the startup type, and make sure. This way, when the system boots, Tomcat will start automatically, and it does not need to eject the DOS window.
two . Remove from service
Same cmd to the Tomcat bin directory, execute service.bat Remove, the service ' TOMCAT6 ' has been removed instructions to cancel the success, go to the service inside will find the name of the TOMCAT7 services.
Other methods:
The Startup.bat in the bin directory under Tomcat is placed in the registry of the startup auto-start entry so that Tomcat can be started easily, but one problem is that Tomcat's boot window is displayed.
How to configure the Tomcat server as a Windows service