2.2. ZIP Installation


Ensure that all the required prerequisite packages are installed before installing Red Hat JBoss Web Server. See Section 2.1.2, “Red Hat Enterprise Linux Package Prerequisites”.

2.2.1. Download and Extract JBoss Web Server

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

Procedure 2.4. Downloading JBoss Web Server

  1. Open a browser and log in to the Customer Portal at http://access.redhat.com.
  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.0 Application Server (jws-application-servers-3.0.0-<platform>-<architecture>.zip)
    • Red Hat JBoss Web Server 3.0 Apache HTTP Server (jws-httpd-3.0.0-<platform>-<architecture>.zip)

Procedure 2.5. Extract JBoss Web Server

  • Unzip the downloaded ZIP files to your installation directory.

    Note

    We recommend that you install JBoss Web Server in the /opt/ 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.
Some configuration is required before running Red Hat JBoss Web Server. This section includes the following configuration procedures:

Procedure 2.6. Setting the JAVA_HOME Environment Variable

You must set the JAVA_HOME environment variable for Tomcat before running JBoss Web Server.
  • In the bin directory of Tomcat (either JWS_HOME/tomcat7/bin or JWS_HOME/tomcat8/bin), create a file named setenv.sh, and insert the JAVA_HOME path definition.
    For example: export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64

Procedure 2.7. Creating a Tomcat User

Follow this procedure to create the tomcat user and its parent group:
  1. In a shell prompt as the root user, change directory to JWS_HOME.
  2. Run the following command to create the tomcat user group:
    # groupadd -g 91 -r tomcat
    Copy to Clipboard Toggle word wrap
  3. Run the following command to create the tomcat user in the tomcat user group:
    # useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat
    Copy to Clipboard Toggle word wrap
  4. From JWS_HOME, run the following command to assign the ownership of the Tomcat directories to the tomcat user to allow the user to run the Tomcat service:
    # chown -R tomcat:tomcat tomcat<VERSION>
    Copy to Clipboard Toggle word wrap
    Replace <VERSION> with the respective Tomcat version number (7 or 8).
    You can use ls -l to verify that the tomcat user is the owner of the directory.
  5. Ensure that the tomcat user has execute permissions to all parent directories. For example:
    # chmod -R u+X tomcat<VERSION>
    Copy to Clipboard Toggle word wrap

Procedure 2.8. Creating an Apache User

Follow this procedure to create the apache user and its parent group:
  1. In a shell prompt as the root user, change directory to JWS_HOME.
  2. Run the following command to create the apache user group:
    # groupadd -g 48 -r apache
    Copy to Clipboard Toggle word wrap
  3. Run the following command to create the apache user in the apache user group:
    # useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apache
    Copy to Clipboard Toggle word wrap
  4. From JWS_HOME, run the following command to assign the ownership of the Apache directories to the apache user to allow the user to run httpd:
    # chown -R apache:apache httpd
    Copy to Clipboard Toggle word wrap
    You can use ls -l to verify that the apache user is the owner of the directory.

Procedure 2.9. Removing/Re-Adding SSL Support

JBoss Web Server supports SSL by default, but it can be removed. Follow this procedure to remove or re-add SSL support.
  • Go to the JWS_HOME/httpd/conf.d/ directory and rename the SSL configuration file:
    • To remove SSL, rename ssl.conf to ssl.conf.disabled.
    • To re-add SSL, rename ssl.conf.disabled to ssl.conf.

Procedure 2.10. 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/extras/.
  2. Copy the log4j-eap6.jar, log4j.properties, and tomcat-juli-adapters.jar files to the lib directory of the Tomcat directory.
    For example:
    # cp log4j.properties ../tomcat<VERSION>/lib/
    Copy to Clipboard Toggle word wrap
    # cp log4j-eap6.jar ../tomcat<VERSION>/lib/
    Copy to Clipboard Toggle word wrap
    # cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/
    Copy to Clipboard Toggle word wrap
    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/extras/:
    # cp tomcat-juli.jar ../tomcat<VERSION>/bin/
    Copy to Clipboard Toggle word wrap

Procedure 2.11. Configuring mod_jk

If required, you can configure Apache HTTP Server to use mod_jk as its load balancer.
The steps below list the locations of the mod_jk configuration files. For detailed mod_jk configuration instructions, see the Configure Load Balancing Using Apache HTTP Server and mod_jk section of the HTTP Connectors and Load Balancing Guide.

Note

Sample configuration files are provided for mod_jk, and are located in JWS_HOME/httpd/conf.d/. The sample configuration files are: mod_jk.conf.sample, workers.properties.sample, and uriworkermap.properties.sample. To use these samples instead of creating your own configuration files, remove the .sample extension, and modify their content as needed.
  1. In JWS_HOME/httpd/conf.d/, create a file named workers.properties.
    This file should contain the available workers (JBoss instances).
  2. In JWS_HOME/httpd/conf.d/, create a file named mod_jk.conf.
    This file contains general mod_jk configuration.
  3. In JWS_HOME/httpd/conf.d/, create a file named uriworkermap.properties.
    This file contains request mapping rules that map requests to workers.

Procedure 2.12. Configuring mod_cluster

  • mod_cluster can be configured in JWS_HOME/httpd/conf.d/mod_cluster.conf.
    For more information about customizing mod_cluster, see the mod_cluster Connector section of the HTTP Connectors and Load Balancing Guide.

Procedure 2.13. Running the Apache HTTP Server Post-Installation Script

  1. In a shell prompt as the root user, change directory to JWS_HOME/httpd.
  2. Run the following command:
    # ./.postinstall
    Copy to Clipboard Toggle word wrap

2.2.3. Starting JBoss Web Server

To start Red Hat JBoss Web Server, you must start the following:
  • Tomcat (7 or 8).
  • Apache HTTP Server.
Before starting Tomcat, ensure that the following prerequisites are met:

Procedure 2.14. Starting Tomcat

  • Run the following command as the tomcat user with your respective Tomcat version (7 or 8):
    $ sh JWS_HOME/tomcat<VERSION>/bin/startup.sh
    Copy to Clipboard Toggle word wrap

    Important

    Although there are multiple methods of starting Tomcat, it is recommended that you use the startup.sh script. To start Tomcat as a service using Jsvc, see Chapter 5, Using Jsvc to Start Tomcat.

Procedure 2.15. Starting Apache HTTP Server

  • To start Apache HTTP Server (httpd), in a terminal as the root, change to JWS_HOME/httpd/sbin/ and run the following command:
    # ./apachectl start
    Copy to Clipboard Toggle word wrap

2.2.4. Stopping JBoss Web Server

To stop Red Hat JBoss Web Server, you must stop the following:
  • Tomcat (7 or 8).
  • Apache HTTP Server.

Procedure 2.16. Stopping Tomcat

  • To stop Tomcat, run the following command as the root user with your respective Tomcat version (7 or 8):
    # sh JWS_HOME/tomcat<VERSION>/bin/shutdown.sh
    Copy to Clipboard Toggle word wrap

Procedure 2.17. Stopping Apache HTTP Server

  • To stop Apache HTTP Server (httpd), in a shell prompt as the root user change to JWS_HOME/httpd/sbin/, and run the following command:
    # ./apachectl stop
    Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat