2015-02-23 155 views
0

如何使用Apache将JBoss 7(特别是jboss-as-7.1.1.Final)配置为Windows服务Commons Daemon(prunsrv.exe)?使用Apache Commons Daemon(prunsrv.exe)安装jboss-as-7.1.1.Final作为Windows服务

具体而言,我不知道prunsrv.exe或prunmgr.exe GUI的正确JBoss选项。

如果您有prunsrv.exe参数来将独立服务器安装为Windows服务(例如创建JBoss 7 Windows服务的批处理文件),那将是完美的。或者,您的prunmgr GUI设置也会很好。

回答

0

有可用的运行ProcRun指令,以防您需要更多的细节。当我用prunsrv我使用了一个服务创建行类似如下:

prunsrv.exe install JBossEAP6 --DisplayName="JBoss EAP 6" --Description "JBoss Enterprise Application Platform 6" --LogLevel=INFO --LogPath="C:\Program Files\EAP-6.1.1\jboss-eap-6.1\standalone\log" --LogPrefix=service --StdOutput=auto --StdError=auto --StartMode=exe --StartImage=cmd.exe --StartPath="C:\Program Files\EAP-6.1.1\jboss-eap-6.1\bin" ++StartParams="/c \"set NOPAUSE=Y ^&^& run.bat\"" --StopMode=exe --StopImage=cmd.exe --StopPath="C:\Program Files\EAP-6.1.1\jboss-eap-6.1\bin" ++StopParams="/c jboss-cli.bat --controller=localhost:9999 --connect --command=:shutdown" 

这并不期待已安装在Windows中的JBoss在:C:\ Program Files文件\ EAP-6.1.1 \ jboss的-EAP -6.1

你需要确保你的run.bat有正确的设置,我已经设置了具备以下条件:

for /D %%i in ("C:\Program Files\EAP-6.1.1\jboss-eap-6.1\standalone\tmp\vfs\*") 
do RD /S /Q "%%i" 
cd %JBOSS_HOME%\bin\ 
standalone.bat -c standalone-full.xml -b 0.0.0.0 -bmanagement <localIP> 

这让我工作的Windows服务,之后本身也清理。