Technical Blog Post
Abstract
Running Liberty profile Server as a Microsoft Windows Service
Body
Liberty now directly supports running as a Windows service: https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_setup_new_server_winserv.html
If the built-in support doesn't meet your needs, a similar but non-supported solution is available with third-party tools such as Apache Commons Daemon.
- Download the apache commons daemon binaries zip from ⇒Apache Commons Project Distributions.
- Extract the prunsrv.exe to the WebSphere Liberty Profile server bin directory.
Note: extract relevant to architecture - Run "server create server1" from the Liberty server bin directory.
- Run "server start server1" to ensure server starts.
- Run "server stop server1" to stop server.
- From the Liberty bin directory run the following command, substituting paths for your install and server name where appropriate:
prunsrv //IS//WLP --Startup=manual --DisplayName="IBM Liberty Server -server1" --Description="IBM WebSphere Liberty Profile"
++DependsOn=Tcpip --LogPath="C:\directory_path\wlp\usr\servers\foo\logs" --StdOutput=auto --StdError=auto --StartMode=exe
--StartPath="C:\directory_path\wlp"
--StartImage="C:\directory_path\wlp\bin\server.bat"
++StartParams=start#server1 --StopMode=exe
--StopPath="C:\directory_path\wlp"
--StopImage="C:\directory_path\wlp\bin\server.bat"
++StopParams=stop#server1
--StartPath="C:\directory_path\wlp"
--StartImage="C:\directory_path\wlp\bin\server.bat"
++StartParams=start#server1 --StopMode=exe
--StopPath="C:\directory_path\wlp"
--StopImage="C:\directory_path\wlp\bin\server.bat"
++StopParams=stop#server1
IBM does not support the use of the third-party solution.
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]
UID
ibm11080951