Chapter 4. Installing JBoss Web Server on Solaris
4.1. Installing a Java Development Kit (JDK) Copy linkLink copied to clipboard!
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>
# 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
ls -lad javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the link:
rm java
rm javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new Java symbolic link to the newly installed JDK:
ln -sf /usr/jdk/<JDK>
ln -sf /usr/jdk/<JDK>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Downloading and Extracting JBoss Web Server Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
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
# sh .postinstall.tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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"
# JAVA_HOME="/usr/java"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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.properties ../tomcat<VERSION>/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp log4j-eap6.jar ../tomcat<VERSION>/lib/
# cp log4j-eap6.jar ../tomcat<VERSION>/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/
# cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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/
# cp tomcat-juli.jar ../tomcat<VERSION>/bin/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Starting JBoss Web Server Copy linkLink copied to clipboard!
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
# sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/daemon.sh startCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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 Copy linkLink copied to clipboard!
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
# sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/daemon.sh stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow