Chapter 2. Command-line installation

Running the GUI installer requires a graphical display to run. but many servers run in headless mode with no graphical display options. In these cases, the installer can be run on a machine with a display, and the resulting JBoss installation can be copied to the server machine. Another option for installing in these environments is to use the command-line installation capabilities. The JBoss installer can be run from the command-line installing either a base server profile or recreating a previous installation using the installer script created during a previous installation.

When you want to install a specific configuration set, the installer can be run from the command line using the -installGroup and installpath options:

$ java -jar jems-installer-1.2.0.jar -installGroup default installpath=/opt/jboss-4.0.4

The -installGroup parameter is any valid installation group for the installer being used. Different JBoss installers install have different options. The options for the JEMS 1.2 installer are shown in Table 1.1, “The JBoss AS installer configuration sets”. The installpath options specifies the directory you want to install JBoss into. If you do not specify the installpath option, the installer defaults to a directory named jboss-install.

This type of installation provides no ability to specify specific packages or to use the security and datasource configuration options. These options can be set when using an installer script. Script generation requires running the actual GUI interface, but the generated script can be used from the command-line . The last panel of the installer provides the option to save an installer script that preserves all of the selections made in the installer. The installation can be run by passing the installation script as a parameter to the installer.

$ java -jar jems-installer-1.2.0.jar installscript.xml

The installation script is a simple XML file that can be safely edited if further customization is needed. The most likely detail to change would be the installation directory.