如何把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 之前,必须有空格

猜你喜欢

转载自nbing.iteye.com/blog/1900548