Chapter 4. Installing JBoss Web Server on Solaris

4.1. Installing a Java Development Kit (JDK)

Before installing JBoss Web Server on Solaris, you must first install a supported Java Development Kit (JDK).

For a list of supported configurations, see the Red Hat Customer Portal article: JBoss Web Server 3 Supported Configurations.

Installing a Java Development Kit (JDK)

Install the Oracle JDK on a command line as the root user:

# pkg install jdk-<version>

Where <version> is the version of the JDK to install, such as jdk-8

Alternative: Download and Install a Java Development Kit on Solaris

  1. Download the Oracle JDK for your operating system and architecture. You can download the JDK installation file from the Oracle website:
  2. Run the JDK installation file.
  3. Open /usr at a shell prompt, and run the following command to display the current Java symbolic link:

    ls -lad java
  4. Remove the link:

    rm java
  5. Create a new Java symbolic link to the newly installed JDK:

    ln -sf /usr/jdk/<JDK>

4.2. Downloading and Extracting JBoss Web Server

To install JBoss Web Server, download and extract the installation ZIP files.

Downloading JBoss Web Server

  1. Open a browser and log in to the Red Hat Customer Portal.
  2. Click Downloads.
  3. Click Red Hat JBoss Web Server in the Product Downloads list.
  4. Select the correct JBoss Web Server version from the Version drop-down menu.
  5. Click Download for each of the following files, ensuring that you select the correct platform and architecture for your system:

    • Red Hat JBoss Web Server 3.1 Application Server (jws-application-servers-3.1.0-<platform>-<architecture>.zip)

Extracting JBoss Web Server

  1. Unzip the downloaded ZIP files to your installation directory.

    The directory created by extracting the ZIP archives is the top-level directory for JBoss Web Server. This is referred to as JWS_HOME.

4.3. Configuring the JBoss Web Server Installation

Some configuration is required before running JBoss Web Server. This section includes the following configuration procedures:

Running the Post-Installation Scripts

  1. Open a shell prompt, and change directory to JWS_HOME/etc.
  2. As the root user, run the post-installation scripts:

    # sh .postinstall.tomcat

    The post-installation script creates the Tomcat user and group.

Setting the JAVA_HOME Environment Variable

You must set the JAVA_HOME environment variable for Tomcat before running JBoss Web Server.

  1. Open the Tomcat configuration file:

    • For Tomcat 7: JWS_HOME/etc/sysconfig/tomcat7
    • For Tomcat 8: JWS_HOME/etc/sysconfig/tomcat8
  2. Remove the hash (#) at the beginning of the following line:

    # JAVA_HOME="/usr/java"

Enabling log4j Logging for Tomcat

If required, follow this procedure to add log4j logging to Tomcat.

  1. Open a shell prompt and change directory to JWS_HOME/share/extras/.
  2. Copy the log4j-eap6.jar,, and tomcat-juli-adapters.jar files to the lib directory of the Tomcat directory.

    For example:

    # cp ../tomcat<VERSION>/lib/
    # cp log4j-eap6.jar ../tomcat<VERSION>/lib/
    # cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/

    Replace <VERSION> with the respective Tomcat version number (7 or 8).

  3. Replace tomcat-juli.jar file in your Tomcat bin directory with the tomcat-juli.jar file from JWS_HOME/share/extras/:

    # cp tomcat-juli.jar ../tomcat<VERSION>/bin/

4.4. Starting JBoss Web Server

To start JBoss Web Server, you must start the following:

  • Tomcat (7 or 8)

Starting Tomcat

  1. As the root user, run the following command with your respective Tomcat version (7 or 8):

    # sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/ start

    Although there are multiple methods of starting Tomcat, it is recommended that you use the script. To start Tomcat as a service using Jsvc, see the Jsvc chapter.

4.5. Stopping JBoss Web Server

To stop JBoss Web Server, you must stop the following:

  • Tomcat (7 or 8)

Stopping Tomcat

  1. To stop Tomcat, in a shell prompt as the root user, run the following command with your respective Tomcat version (7 or 8):

    # sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/ stop