Red Hat Training

A Red Hat training course is available for Red Hat JBoss Operations Network

4.4. Silently Installing the Server

The initial setup of the server is the same as in Section 4.2, “Installing the Server JAR File”. Instead of using the visual, web-based installer, however, a silent installation loads a pre-configured properties file and starts the server with all of its configuration in place.
  1. Stop any currently running JBoss ON instances.
    C:\rhq\jon-server-\bin\rhq-server.bat stop


    If the new JBoss ON server will use a database that existing JBoss ON instances are also using, then all of the existing JBoss ON instances have to be stopped. Otherwise, the installer will hang when it tries to contact the database and the database is unavailable because it is in use by another JBoss ON server.
  2. Install the server JAR file, as in Section 4.2, “Installing the Server JAR File”.
  3. Install the agent plug-ins.
    Unzip the plug-in pack archive, and copy the files into the C:\rhq\plugins directory.
  4. Open the JBoss ON server file for editing.
  5. Set the rhq.autoinstall.enabled parameter to true to instruct the server to load the configuration automatically from file.
  6. Set the parameter to tell the server whether preserve the any existing data in the database. For a new installation, this can be set to auto so the installer will supply the database schema.


    The autoinstaller options are only evaluated once, when the JBoss ON server is first installed. After that initial configuration, the autoinstaller is disabled. These properties are ignored once the server is set up and cannot be used to initiate a re-install of an existing instance.
  7. Optionally, set the IP address or hostname for the server. If this is not set, then the server will detect it when it starts.
  8. Set the port numbers for the instance.
  9. Set the username and password to connect to the backend database. The password is stored in the properties file in an encoded form. Use the script to hash the password.
    serverRoot/jon-server- mypassword
    Encoded password: 1d31b70b3650168f79edee9e04977e34
    Then, set the hashed password as the rhq.server.database.password value.
  10. Scan the rest of the database configuration to make sure that it corresponds to your specific database type and instance. The parameters, and some possible values for PostgreSQL and Oracle databases, are described in Table 4.1, “ Parameters for Database Configuration”.
    # Database
    # Quartz
    rhq.server.quartz.selectWithLockSQL=SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE
  11. Set the directory path to the JDK installation for a 32-bit Java library. For example:
    set RHQ_SERVER_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_29
    The default Java service wrapper included with JBoss ON requires a 32-bit JVM, so the Java preference set for the server must be a 32-bit JDK. The JBoss ON server must use a 32-bit JVM even on 64-bit systems.
    Running the server or agent with a 32-bit JVM does not in any way affect how JBoss ON manages other resources which may run with a 64-bit JVM. JBoss ON can still manage those resources and those resources can still use the 64-bit Java libraries for their own processes.
  12. Install the JBoss ON server as a Windows service. This action must be "Run as Administrator."
    C:\rhq\jon-server-\bin\rhq-server.bat install
  13. Start the JBoss ON server. This action must be "Run as Administrator."
    C:\rhq\jon-server-\bin\rhq-server.bat start
When the server starts, it loads the edited file and is fully configured.

Table 4.1. Parameters for Database Configuration

Parameter Description
rhq.server.database.type-mapping Gives the type or vendor of the database that is used by the JBoss ON server. This is either PostgreSQL or Oracle.
rhq.server.database.connection-url The JDBC URL that the JBoss ON server uses when connecting to the database. An example is jdbc:postgresql://localhost:5432/rhq or jdbc:oracle:oci:@localhost:1521:orcl.
rhq.server.database.driver-class The fully qualified class name of the JDBC driver that the JBoss ON server uses to communicate with the database. An example is oracle.jdbc.driver.OracleDriver.
rhq.server.database.xa-datasource-class The fully qualified class name of the JDBC driver that the JBoss ON server uses to communicate with the database. Examples of this are org.postgresql.xa.PGXADataSource or oracle.jdbc.xa.client.OracleXADataSource.
rhq.server.database.user-name The name of the user that the JBoss ON server uses when logging into the database
rhq.server.database.password The password of the database user that is used by the JBoss ON server when logging into the database. This password is stored in a hash.
rhq.server.database.server-name The server name where the database is found. This must match the server in the connection URL. This is currently only used when connecting to PostgreSQL.
rhq.server.database.port The port on which the database is listening. This must match the port in the connection URL. This is currently only used when connecting to PostgreSQL.
rhq.server.database.db-name The name of the database. This must match the name found in the connection URL. This is currently only used when connecting to PostgreSQL.
rhq.server.quartz.driverDelegateClass The Quartz driver used for connections between the server and the database. The value of this is set by the installer and depends on the type of database used to store the JBoss ON information. For PostgreSQL, this is org.quartz.impl.jdbcjobstore.PostgreSQLDelegate, and for Oracle, this is