• No results found

Command line parameters

In document Jboss Admin Guide v7.1 (Page 93-97)

Forcing Plain Text Authentication

4.8 Command line parameters

To start up a JBoss AS 7 managed domain, execute the $JBOSS_HOME/bin/domain.sh script. To start up a standalone server, execute the $JBOSS_HOME/bin/standalone.sh. With no arguments, the default configuration is used. You can override the default configuration by providing arguments on the command line, or in your calling script.

4.8.1 System properties

The standalone and the managed domain modes each use a default configuration which expects various files and writable directories to exist in standard locations. Each of these standard locations is associated with a system property, which has a default value. To override a system property, pass its new value using the standard jvm -Dkey=value options:

$JBOSS_HOME/bin/standalone.sh -Djboss.home.dir=some/location/AS7/jboss-as \ -Djboss.server.config.dir=some/location/AS7/jboss-as/custom-standalone

This command starts up a standalone server instance using a non-standard AS home directory and a custom configuration directory. For specific information about system properties, refer to the definitions below.

Instead of passing the parameters directly, you can put them into a properties file, and pass the properties file to the script, as in the two examples below.

$JBOSS_HOME/bin/domain.sh --properties=/some/location/jboss.properties $JBOSS_HOME/bin/domain.sh -P=/some/location/jboss.properties

The syntax for passing in parameters and properties files is the same regardless of whether you are running the domain.sh standalone.sh, , or the Microsoft Windows scriptsdomain.bat or standalone.bat. The properties file is a standard Java property file containing key=value pairs:

jboss.home.dir=/some/location/AS7/jboss-as

Standalone

Property name Usage Default value

java.ext.dirs The JDK extension directory paths null jboss.home.dir The root directory of the JBoss AS 7

installation.

Set by standalone.sh to $JBOSS_HOME

jboss.server.base.dir The base directory for server content. jboss.home.dir/standalone jboss.server.config.dir The base configuration directory. jboss.server.base.dir

/configuration jboss.server.data.dir The directory used for persistent data

file storage.

jboss.server.base.dir /data

jboss.server.log.dir The directory containing the file.

server.log

/log jboss.server.base.dir

jboss.server.temp.dir The directory used for temporary file storage.

/tmp jboss.server.base.dir

jboss.server.deploy.dir The directory used to store deployed content

jboss.server.data.dir /content

JBoss Community Documentation Page 95 of 660

Managed Domain

Property name Usage Default value

jboss.home.dir The root directory of the JBoss AS 7 installation.

Set by domain.sh to $JBOSS_HOME

jboss.domain.base.dir The base directory for domain content.

/domain jboss.home.dir

jboss.domain.config.dir The base configuration directory jboss.domain.base.dir /configuration

jboss.domain.data.dir The directory used for persistent data file storage.

jboss.domain.base.dir /data

jboss.domain.log.dir The directory containing the and host-controller.log files process-controller.log jboss.domain.base.dir /log

jboss.domain.temp.dir The directory used for temporary file storage

jboss.domain.base.dir /tmp

jboss.domain.deployment.dir The directory used to store deployed content

jboss.domain.base.dir /content

jboss.domain.servers.dir The directory containing the output for the managed server instances

jboss.domain.base.dir /servers

4.8.2 Other command line parameters

The first acceptable format for command line arguments to the JBoss AS launch scripts is

--name=value

For example:

$JBOSS_HOME/bin/standalone.sh --server-config=standalone-ha.xml

If the parameter name is a single character, it is prefixed by a single '-' instead of two. Some parameters have both a long and short option.

-x=value

$JBOSS_HOME/bin/standalone.sh -P=/some/location/jboss.properties

For some command line arguments frequently used in previous major releases of JBoss AS, replacing the "=" in the above examples with a space is supported, for compatibility.

-b 192.168.100.10

If possible, use the -x=value syntax. New parameters will always support this syntax.

The sections below describe the command line parameter names that are available in standalone and domain mode.

Standalone

Name Default if absent Value

--server-config -c

jboss.server.config.dir /standalone.xml

A relative path which is interpreted to be relative to .

jboss.server.config.dir

Managed Domain

Name Default if absent Value

--domain-config -c

jboss.domain.config.dir /domain.xml

A relative path which is interpreted to be relative to .

jboss.domain.config.dir

--host-config jboss.domain.config.dir /host.xml

A relative path which is interpreted to be relative to .

jboss.domain.config.dir

The following parameters take no value and are only usable on slave host controllers (i.e. hosts configured to connect to a remote domain controller.)

Name Function

--backup Causes the slave host controller to create and maintain a local copy of the domain configuration file

--cached-dc If the slave host controller is unable to contact the master domain controller to get its configuration at boot, boot from a local copy previously created using --backup. The slave host controller will not be able make any modifications to the domain configuration, but it will be able to launch servers.

JBoss Community Documentation Page 97 of 660

In document Jboss Admin Guide v7.1 (Page 93-97)