现在的位置: 首页 > 综合 > 正文

将WASCE注册为WINDOWS系统服务

2013年03月05日 ⁄ 综合 ⁄ 共 915字 ⁄ 字号 评论关闭

基本的路子就是用wrapper包装一下,几年前用微软提供的srvany.exe,不是很好用,删除服务时有问题,删不掉。在网上找到2篇贴子:

http://cwiki.apache.org/GMOxDOC20/configuring-geronimo-as-a-windows-service.html

http://kl-patterns.com/articles/websphereas/configuring-wasce-2.0-as-windows-service.html

还是太麻烦,不理想。

 

想想TOMCAT怎么做的,它用了apache common-daemon,简单多了,具体步骤如下:

1.下载common-daemon中的prunsrv.exe和prunmgr.exe,或者复制tomcat.exe和tomcatw.exe到WASCE_HOME/bin下。

2.写个脚本,名字随便;写入:

prunsrv //IS//WASCE20 --DisplayName="IBM WebSphere Application Server Community Edition 2.0" --Install="%CD%/prunsrv.exe" --Jvm=auto --Startup=Automatic --StartPath="%CD%" --StopPath="%CD%" --StartImage="%CD%/geronimo.bat" --StopImage="%CD%/geronimo.bat" --StartParams=start --StopParams="stop --user=system --password=manager" --Type=interactive --LogLevel=DEBUG --LogPath=%CD%

3.运行脚本,安装服务。

4.将prunmgr.exe改名为wasce20.exe,运行之,如果出现GUI界面说明服务安装成功。

 

如果用界面上的stop去停止服务会失败,开始我猜是由于WASCE停止时需要用户名和密码,但在StopParams中加入后仍然不行,所以如果要停止的话还是用WASCE自带的SHUTDOWN脚本吧。

抱歉!评论已关闭.