Friday 18 January 2019

WebSphere Application Server as a Windows service - the detail

As an update, here's the full detail on adding/updating WAS as a Windows Service: -

Add Service

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -add "SKLM301Server" -serverName "server1" -profilePath "C:\ibm\WebSphere\AppServer\profiles\KLMProfile" -encodeParams -stopArgs "-username wasadmin -password Qg4ggl3@" -startType manual -restart true

...
IBM WebSphere Application Server V9.0 - SKLM301Server service successfully added.
...

Start Server

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -start "SKLM301Server" -serverName "server1"

...
Starting Service: SKLM301Server
Successfully started service.
...

Get Status

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -status "SKLM301Server" -serverName "server1"

...
The service is running.
...

Stop Server

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -stop "SKLM301Server" -serverName "server1"

...
Successfully stopped service.
...

Get Status

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -status "SKLM301Server" -serverName "server1"

...
The service is stopped.
...

Update Service

- When WAS admin password changes

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -add "SKLM301Server" -serverName "server1" -profilePath "C:\ibm\WebSphere\AppServer\profiles\KLMProfile" -encodeParams -stopArgs "-username wasadmin -password Qp455w0rd@" -startType manual -restart true

...
Service already exists, updating parameters...
...

Remove Service

- If needed

c:\IBM\WebSphere\AppServer\bin\wasservice.exe -remove "SKLM301Server" -serverName "server1"

...
Successfully removed service
...


Sources: -

WASService command


Using the WASServiceHelper utility to create Windows services for application servers


No comments:

Post a Comment