Created by kylin.30th, Nov
Structure of the standalone.xml
//
//
$ cd $JBOSS_HOME
$ cp -r standalone/ /tmp/myServer
$ ./bin/standalone.sh -Djboss.server.base.dir=/tmp/myServer/
Using the Admin Console
Login Admin Console
Configuration -> General Configuration -> Socket Binding -> View
Select http, edit, change 8080 to 9080, save, reload on Runtime tab
Using the CLI
//
/socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=port,value=9080)
reload
/socket-binding-group=standard-sockets/socket-binding=http:read-attribute(name=port)
Using System Properties
//
$ ./bin/standalone.sh -Djboss.http.port=9080
$ ./bin/standalone.sh -Djboss.socket.binding.port-offset=1000
//
$ ./bin/standalone.sh -b 10.0.0.1
$ ./bin/standalone.sh -Djboss.bind.address=10.0.0.1
$ ./bin/standalone.sh -bmanagement=10.0.0.1
$ ./bin/standalone.sh -Djboss.bind.address.management=10.0.0.1
//
$ cd $JBOSS_HOME
$ cp -a standalone node-1
$ cp -a standalone node-2
$ ./bin/standalone.sh -Djboss.server.base.dir=./node-1 -Djboss.http.port=8180 -Djboss.management.http.port=9991
$ ./bin/standalone.sh -Djboss.server.base.dir=./node-2 -Djboss.http.port=8280 -Djboss.management.http.port=9992
$ ./bin/standalone.sh -Djboss.serever.base.dir=./node-1 -Djboss.socket.binding.port-offset=100
$ ./bin/standalone.sh -Djboss.serever.base.dir=./node-2 -Djboss.socket.binding.port-offset=200
//
$ sudo ifconfig YOUR_NIC:1 10.0.1.1 netmask 255.255.255.0
$ sudo ifconfig YOUR_NIC:2 10.0.1.2 netmask 255.255.255.0
$ cd $JBOSS_HOME
$ cp -a standalone node-1
$ cp -a standalone node-2
$ ./bin/standalone.sh -Djboss.serever.base.dir=./node-01 -Djboss.bind.address=10.0.0.1 -Djboss.bind.address.management=10.0.0.1
$ ./bin/standalone.sh -Djboss.serever.base.dir=./node-02 -Djboss.bind.address=10.0.0.2 -Djboss.bind.address.management=10.0.0.2
$ ./bin/standalone.sh -Djboss.serever.base.dir=./node-01 -b 10.0.0.1 -bmanagement=10.0.0.1
$ ./bin/standalone.sh -Djboss.serever.base.dir=./node-02 -b 10.0.0.2 -bmanagement=10.0.0.2
Connecting to the CLI
//
$ cd $JBOSS_HOME
$ ./bin/jboss-cli.sh
[disconnected /] connect
[standalone@localhost:9990 /]
[standalone@localhost:9990 /] ls
[standalone@localhost:9990 /] ls subsystem=
$ ./bin/jboss-cli.sh --gui
Checking the server-status via CLI
//
[standalone@localhost:9990 /] :read-attribute(name=server-state)
{
"outcome" => "success",
"result" => "running"
}
Deploy an application via CLI
//
[standalone@localhost:9990 /] deploy /path/example.war
[standalone@localhost:9990 /] deployment-info --name=example.war
NAME RUNTIME-NAME PERSISTENT ENABLED STATUS
example.war example.war true true OK
[standalone@localhost:9990 /] deploy example.war --disabled
Undeploy an application via CLI
//
[standalone@localhost:9990 /] undeploy example.war
[standalone@localhost:9990 /] undeploy -l
NAME RUNTIME-NAME ENABLED STATUS
example.war example.war true OK
Executing commands in batch-mode via CLI
//
[standalone@localhost:9990 /] batch
[standalone@localhost:9990 / #] deploy example.war
[standalone@localhost:9990 / #] deploy simple.war
[standalone@localhost:9990 / #] run-batch
The batch executed successfully
[standalone@localhost:9990 /]
Reloading a server configuration via CLI
//
[standalone@localhost:9990 /] reload
Shutting down and restarting an instance via CLI
//
[standalone@localhost:9990 /] shutdown
[standalone@localhost:9990 /] shutdown --restart=true