WAS v8.5 > Administer applications and their environment > Administer the Liberty profile > Administer the Liberty profile manuallyAdminister the Liberty profile from the command prompt
Use the server and ws-launch.jar commands to...
- Create a server
- Start and stop a server
- Check if server is running.
- Debug server
The wlp/bin directory contains a script called server to help with controlling the server process. Syntax...
.\server <task> [server] [options]
For example...
cd E:\IBM\Worklight\server\wlp\bin
.\server status worklightServer
For available values of the options, see Liberty profile: server command options.
The server script supports the following tasks:
create Create a new server. run Launch the server in the foreground. debug Run the named server in the console foreground after a debugger connects to the debug port. Default port: 7777 dump Create a snapshot of a server and save the result into an archive file javadump Create a snapshot of the server JVM and save the result into ${server.output.dir} package Package a server. start Launch the server as a background process. stop Stop a running server. status Check to see whether a specified server is running. version Display the version information of current server and Java runtime environment. help Command-line script help, including details of additional options. If a server is not specified on the command line, the task is performed against the default server instance, defaultServer, if it exists.
We can also carry out similar tasks using the executable JAR file ws-launch.jar in the wlp/lib directory.
See also
- Liberty profile: server command options
- Use Ant to automate tasks for the Liberty profile
- Use Maven to automate tasks for the Liberty profile
- Use an OSGi console
Example
To run the server script on Windows systems:
server.bat create worklightServer
server.bat package worklightServer
server.bat run worklightServer
server.bat help worklightServer
To run the server script on other systems:
server create worklightServer
server package worklightServer
server run worklightServer
server help worklightServer
To run the executable JAR file ws-launch.jar without using the server script:
java -javaagent:lib/bootstrap-agent.jar -jar lib/ws-launch.jar worklightServer --create
java -javaagent:lib/bootstrap-agent.jar -jar lib/ws-launch.jar worklightServer
java -javaagent:lib/bootstrap-agent.jar -jar lib/ws-launch.jar --help
The --help option provides information about additional command-line parameters for the executable JAR file ws-launch.jar , such as --stop, --version, --clean, --include.
Parent topic: Administer the Liberty profile manually
Related
Create a Liberty profile server manually
Packaging a Liberty profile server
Use Ant to automate tasks for the Liberty profile