且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何把resin安装为Windows服务

更新时间:2022-09-06 19:33:31

问题描述: 
如何把resin安装成window service(windows服务)? 
解决办法: 
可以通过resin.exe的参数install和remove完成,例如: 
dos:\> ${resin_home}\resin.exe -install 
dos:\> ${resin_home}\resin.exe -remove 

另外,安装时可以指定服务名,用以标明服务对应哪些应用application,例如: 
dos:\> ${resin_home}\resin.exe -install-as 
dos:\> ${resin_home}\resin.exe -remove-as 

dos:\> ${resin_home}\resin.exe -install-as myapplication 
就会在windows服务里看到有名为myapplication的服务!

 

PS:

window 注册服务的普通方式(在svn在Windows下安装一文中曾提到,可以灵活运用):

sc create svnserve binpath= ""C:Program FilesSubversionbinsvnserve.exe"    --service --root c:repos" displayname= "Subversion" depend= tcpip start= auto
在创建服务以后,你还可以增加描述。它在 Windows 服务管理器中显示。

sc description svnserve "Subversion server (svnserve)"
注意 sc 的命令行很特殊。在 key= value 对中,key 与 = 之间不能有空格,但是在 value 之前,必须有空格


本文转自茄子_2008博客园博客,原文链接:http://www.cnblogs.com/xd502djj/archive/2010/09/25/1834467.html,如需转载请自行联系原作者。