In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Windows uses bat script to set up service boot for an experimental purpose
To realize the automatic startup of apache-activemq-5.14.1-bin, apache-tomcat-7.0.81 and reids programs, it is necessary for someone to start the program after the equipment is powered off.
Second, experiment process 1. Script in windows 7.
Script 1 boot_start.bat:
Rem * * Code Start**
@ echo off
E: rem: in the windows server2008 test can not be added, in the windows 7 test can not find a path, can not execute the following statement.
Cd "E:\ rongpingtai\ apache-activemq-5.14.1-bin\ apache-activemq-5.14.1\ bin\ win64\"
Start activemq.bat rem: pay attention to the quotation marks, the directory system with spaces can identify the abnormal, and the direct activemq.bat and call activemq.bat calls fail in the test.
Cd "E:\ rongpingtai\ reids\"
Start redisServer.bat
Cd "E:\ rongpingtai\ apache-tomcat-7.0.81\ bin\"
Start startup.bat
@ echo on
Rem * * Code End**
Script 2 boot_start.bat:
Rem * * Code Start**
@ echo off
Start / d "E:\ rongpingtai\ apache-activemq-5.14.1-bin\ apache-activemq-5.14.1\ bin\ win64\" activemq.bat
Start / d "E:\ rongpingtai\ reids\" redisServer.bat rem: "/ d" specifies the startup directory
Start / d "E:\ rongpingtai\ apache-tomcat-7.0.81\ bin\" startup.bat
@ echo on
Rem * * Code End**
2 through the system tool-Task Scheduler, the test tuning script fails 3 through the group policy-boot call script
To run Windows+R, enter gpedit.msc to enter the Group Policy Editor, select windows Settings-start, and then click add script.
The test found that copying the script directly to C:\ Windows\ System32\ GroupPolicy\ Machine\ Scripts\ Startup could not successfully invoke the script.
4 enter the system to view the process after startup
Enter the windows Task Manager to view the system process started in the bat script, click: view-Select column-check "Image path name / Command Line", you can see the program we started through the path search (tomcat corresponds to the Java program). You can restart the program by process kill operation.
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.