关于将tomcat、nginx 实现 注册window服务并实现自启动
Windows 环境下配置 Nginx 的开机自启动
1、通过WinSW工具实现
https://www.cnblogs.com/Javaer1995/p/18669173
tomcat :
<service><id>tomcat8088</id><name>Tomcat8088</name><description>Apache Tomcat8088</description><executable>D:\tomcat\apache-tomcat-8.5.57\bin\catalina.bat</executable><arguments>run</arguments><logpath>D:\tomcat\apache-tomcat-8.5.57\logs</logpath><log mode="roll" size="10MB" count="10" /><onfailure action="restart" /><startmode>automatic</startmode>
</service>
不要使用 D:\tomcat\apache-tomcat-8.5.57\bin\startup.bat
要使用
D:\tomcat\apache-tomcat-8.5.57\bin\catalina.bat
run
这样服务才会在一直运行的状态
nginx-service.exe install
nginx-service.exe uninstall
nginx-service.exe start
nginx-service.exe stop
nginx-service.exe status
重新启动 Tomcat 服务,执行以下命令:
net stop Tomcat
net start Tomcat