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
- Download the Oracle JDK for your operating system and architecture. You can download the JDK installation file from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Run the JDK installation file.
Open
/usrat a shell prompt, and run the following command to display the current Java symbolic link:ls -lad java
Remove the link:
rm java
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
- Open a browser and log in to the Red Hat Customer Portal.
- Click Downloads.
- Click Red Hat JBoss Web Server in the Product Downloads list.
- Select the correct JBoss Web Server version from the Version drop-down menu.
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)
-
Red Hat JBoss Web Server 3.1 Application Server (
Extracting JBoss Web Server
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
-
Open a shell prompt, and change directory to
JWS_HOME/etc. 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.
Open the Tomcat configuration file:
-
For Tomcat 7:
JWS_HOME/etc/sysconfig/tomcat7 -
For Tomcat 8:
JWS_HOME/etc/sysconfig/tomcat8
-
For Tomcat 7:
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.
-
Open a shell prompt and change directory to
JWS_HOME/share/extras/. Copy the
log4j-eap6.jar,log4j.properties, andtomcat-juli-adapters.jarfiles to thelibdirectory of the Tomcat directory.For example:
# cp log4j.properties ../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 (7or8).Replace
tomcat-juli.jarfile in your Tomcatbindirectory with thetomcat-juli.jarfile fromJWS_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
As the root user, run the following command with your respective Tomcat version (
7or8):# sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/daemon.sh start
ImportantAlthough there are multiple methods of starting Tomcat, it is recommended that you use the
daemon.shscript. 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
To stop Tomcat, in a shell prompt as the root user, run the following command with your respective Tomcat version (
7or8):# sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/daemon.sh stop

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.