IBM Support

Running Liberty profile Server as a Microsoft Windows Service

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.

  1. Download the apache commons daemon binaries zip from ⇒Apache Commons Project Distributions.
  2. Extract the prunsrv.exe to the WebSphere Liberty Profile server bin directory.
    Note: extract relevant to architecture
  3. Run "server create server1" from the Liberty server bin directory.
  4. Run "server start server1" to ensure server starts.
  5. Run "server stop server1" to stop server.
  6. 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
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