In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Register Tomcat to the Window Service service
1. Software and environment
Environment: JDK1.8 Application Service: Tomcat9.0 (non-installed version) operating system: Windows 2012
2. Set Tomcat to serve the system
Win+R opens the running window, type cmd to open the dos window, and use the cd command to change the location to the bin file under the tomcat path.
Cd C:\ apache-tomcat-9.0.8\ bin. Enter the service command to view the instructions for using the service.bat file, C:\ apache-tomcat-9.0.8\ bin > service.batUsage: service.bat install/remove [service_name] [/ user username] C:\ apache-tomcat-9.0.8\ bin >
Type service.bat install service_name to install the service. Service_name is the name given to the service. You can name it yourself. My name here is TomcatService.
C:\ apache-tomcat-9.0.8\ bin > service install TomcatServiceInstalling the service 'TomcatService'... Using CATALINA_HOME: "C:\ apache-tomcat-9.0.8" Using CATALINA_BASE: "C:\ apache-tomcat-9.0.8" Using JAVA_HOME: "C:\ Program Files\ Java\ jdk1.8.0_171" Using JRE_HOME: "C:\ Program Files\ Java\ jdk1.8.0_171\ Jre "Using JVM:" C:\ Program Files\ Java\ jdk1.8.0_171\ jre\ bin\ server\ jvm.dll "The service 'TomcatService' has been installed.C:\ apache-tomcat-9.0.8\ bin >
3. Modify the startup mode
Win+R opens the running window, type the control command to open the control panel, find the administrative tools, open the service, and you can see a newly registered service called Apache Tomcat 9.0 TomcatService. Right-select the properties and change the startup type to automatic.
4. Set dependent services
Sometimes we need to start the database service before starting the Tomcat service. In other words, the database service is booted automatically, and the Tomcat service is started automatically after startup, which can be enabled by setting the Tomcat service and database service dependency.
Suppose you now have a registered database service on your computer, named MySQLService, and now to set the dependency of TomcatService and MySQLService on, use the sc config TomcatService depend= MySQLService command to execute (note that there is a space between depend= and MySQLService). After setting up, you can view it in the properties of the service-- > dependencies.
5. Delete registered services
Delete the registered service, similar to the install command, using remove. Open the dos window and type service remove tomcat99 to delete the service.
C:\ apache-tomcat-9.0.8\ bin > service.bat remove tomcat99Removing the service 'tomcat99'... Using CATALINA_BASE: "C:\ apache-tomcat-9.0.8" The service' tomcat99' has been removedC:\ apache-tomcat-9.0.8\ bin >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.