First, the environment
window7,tomcat7,jdk1.6
Second, installation
1. Install the default name of the system service
(1) cmd into the bin directory under the Tomcat decompression package
(2) Enter service install [Mytomcat], click Enter
The mytomcat here is a custom service name, and if you do not write Tomcat will use the default service name to show that the installation was successful.
(3) To view the installed services, Win+r switch to the
Enter Service.msc carriage return, you can find the apache_tomcat_7.0 mytomcat in the service, indicating the successful installation
(4) Return to the command line input net start Mytomcat start the service, or right-click on the service directly to start
(5) Open Browser, enter localhost:8080
Service installed and started successfully
(6) Service stop, switch to command line input net stop Mytomcat
(7) Uninstall service, command line input service remove Mytomcat
(Note: This can be installed, mainly Tomcat provides the Service.bat script, sometimes feel the service name is too long, very disgusting, want to customize the service name How to do, the following will tell how to customize the service name)
2. Install the custom name of the system service
(1) Enter the Tomcat bin directory, find Service.bat and open, find service_name (here is also not difficult to find the name of the service is a combination of DisplayName and service_name, Make your own changes up and down two displayname see what changes, here do not experiment each one)
(2) Change the above information as follows (change service_name, delete displayname prefix)
(3) Installation
You do not need to specify the name of the installation service, Mytomcatservice displays the installed
(4) View service
(5) If the service name is customized when the third step is installed, the new service name overrides the configuration file configuration
The service shows AAA installed successfully
Hope my summary can help you!
This article is the original blog, reproduced please indicate the source
Installing Tomcat for system services in a Windows environment