Windows sets the Tomcat service to start at startup

1. First make your Tomcat a service

1. Enter cmd in the "Start" run, and a DOS command line window will open at this time.

 

2. Enter the executable file path in the Tomcat installation directory, generally: C:\Program Files\apache-tomcat-5.5.29\bin

3. Execute: service.bat install  mywebserver    ( red font is custom )

4. The following window information appears:

 

So far, the Tomcat service has been successfully installed

 

2. Let your Tomcat service start automatically at boot time

1. Start>Settings>Control Panel>Administrative Tools>Services

 

2. Double-click the above entry, and the following window will appear:

 

3. Select the startup type as: Automatic

 

Notice:

Installing the service 'Tomcat7' ...
Using CATALINA_HOME:    "E:\apache-tomcat-7.0.35"
Using CATALINA_BASE:    "E:\apache-tomcat-7.0.35"
Using JAVA_HOME:        "E:\jdk1.7.0"
Using JRE_HOME:         "E:\jdk1.7.0\jre"
Using JVM:              "E:\jdk1.7.0\jre\bin\server\jvm.dll"
拒绝访问。
Failed to install serviceFailed installing 'Tomcat7' service

 

Under win7 and vista, the [tomcat7] decompressed version is used as a background service method (to solve the Failed installing 'Tomcat7' service method).
Today, students want to configure tomcat, and directly run the startup.bat batch under the bin directory to start tomcat successfully, but I want to tomcat is set to run as a background service, how to do it? -------------------------------------------------- --------------- 1. The environment variable configuration part of tomcat7 is omitted. 2. Through the command line, jump to the bin directory of tomcat7, then service.bat install, and then a successful installation prompt will appear (The service 'Tomcat7' has been installed!)   (Note: vista and win7 users are due to UAC , you can go to C:/windows/system32/ to find cmd.exe, then run it as an administrator, and then repeat the operation of 2 to be successful, otherwise an error message will appear: Failed installing 'Tomcat7' service) 3. Enter the system background On the service page, you will see the service name of apache tomcat7, modify its startup method and it will be OK
 




Guess you like

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