使用srvany.exe将任何程序作为Windows服务运行
生活随笔
收集整理的這篇文章主要介紹了
使用srvany.exe将任何程序作为Windows服务运行
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
使用srvany.exe將任何程序作為Windows服務(wù)運行
學習了:http://wangye.org/blog/archives/42/
https://www.cnblogs.com/huangcong/p/5761557.html
?
在windows下也可以把zookeeper注冊為服務(wù)啟動。就是在d:\www下運行: instsrv.exe zookeeper d:\www\srvany.exe 然后寫一個注冊表文件。內(nèi)容如下: Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\zookeeper\Parameters] "Application"="D:\\www\\zookeeper-3.4.12\\bin\\zkServer.cmd" "AppParameters"="" "AppDirectory"="D:\\www\\zookeeper-3.4.12"?=====================================================================
還可以帶參數(shù),redis啟動的時候帶的參數(shù);
cd /d d:\www\mysql5.5\bin echo install mysql mysqld -install net start mysqlcd /d d:\www\ instsrv nginx d:\www\srvany.exe instsrv php5 d:\www\srvany.exe instsrv.exe redis d:\www\srvany.exeregedit -s service.regcd d:\www\memcached memcached -d install net start memcachedecho "all done"?
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NGINX\Parameters] "Application"="d:\\www\\nginx\\nginx.exe" "AppParameters"="" "AppDirectory"="d:\\www\\nginx\\"[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\redis\Parameters] "Application"="d:\\www\\redis\\redis-server.exe" "AppParameters"="d:\\www\\redis\\redis.conf" "AppDirectory"="d:\\www\\redis\\"[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\php5\Parameters] "Application"="d:\\www\\php-5.6.36\\php-cgi.exe" "AppParameters"="-b 127.0.0.1:9000 -q" "AppDirectory"="d:\\www\\php-5.6.36\\"?
總結(jié)
以上是生活随笔為你收集整理的使用srvany.exe将任何程序作为Windows服务运行的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Active Record 数据验证
- 下一篇: 大数据挖掘在销售管理中的应用价值