O'Reilly logo

WildFly Cookbook by Luigi Fugaro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shutting down and restarting an instance via the CLI

In this recipe, we will learn how to stop a WildFly instance via the CLI, or alternatively, restart it via the CLI.The restart option is in contrast to the reload command of the previous recipe.

Getting ready

Start up your WildFly so that we can directly connect to it via the CLI, as follows:

$ cd ~/WFC/wildfly
$ ./bin/standalone.sh

How to do it...

The command itself is pretty easy:

$ ./bin/jboss-cli.sh --connect
[standalone@localhost:9990 /] shutdown
[disconnected /]

How it works...

The preceding command stops everything and drops you off from the CLI. Hence, in case you need to restart your WildFly instance, you need to execute the standalone.sh script again, along with any parameter previously defined. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required