Starting and stopping a server from the command line
You can use the server
tasks to start or stop a server.
The latest documentation about server commands for Liberty is available on the Open Liberty website.
About this task
The
wlp/bin
directory contains a
script that is called server
to help with controlling the server process. The syntax of this script is as follows:
server
action serverName [options]
For available values of [options], see Server command options.
Note: If a server is not specified on the command line, the action is performed
against the default server instance,
defaultServer
, if it exists.Tip: Do not use the command line to start or
stop a server that is managed by auto scaling with an enabled scaling policy.
Procedure
Example
To start or stop a server by using the
server
script on Windows
systems:server.bat start serverName
server.bat stop serverName
To start or stop a server by using the
server
script on other
systems:server start serverName
server stop serverName