Chapter 3. Installing the JBoss Core Services Apache HTTP Server on RHEL from RPM packages

You can install the JBoss Core Services Apache HTTP Server on Red Hat Enterprise Linux from archive files or RPM packages. Installing the Apache HTTP Server from RPM packages installs the Apache HTTP Server as a service.

RPM installation packages for JBoss Core Services Apache HTTP Server are available from Red Hat Subscription Management. The RPM installation option is available for Red Hat Enterprise Linux 7 and Red Hat Enterprise Linux 8.

Important

Red Hat Enterprise Linux 6 is no longer supported and subsequently was removed from the documentation.

3.1. Attaching subscriptions to Red Hat Enterprise Linux

Before you download and install the RPM packages for the Apache HTTP Server, you must register your system with Red Hat Subscription Management, and subscribe to the respective Content Delivery Network (CDN) repositories. You can subsequently perform some verification steps to ensure that a subscription provides the required CDN repositories.

Procedure

  1. Log in to the Red Hat Subscription Management web page.
  2. Click the Systems tab.
  3. Click the Name of the system that you want to add the subscription to.
  4. Change from the Details tab to the Subscriptions tab, and then click Attach Subscriptions.
  5. Select the check box next to the subscription that you want to attach, and then click Attach Subscriptions.

Verification

  1. Log in to the Red Hat Subscriptions web page.
  2. In the Subscription Name column, click the subscription that you want to select.
  3. Under Products Provided, you require Red Hat JBoss Core Services.

Additional resources

3.2. Installing the Apache HTTP Server from RPM packages by using YUM

You can use the YUM package manager to install the Apache HTTP Server from RPM packages on Red Hat Enterprise Linux.

Procedure

  1. To subscribe to the Apache HTTP Server CDN repositories for your operating system version, enter the following command as the root user:

    # subscription-manager repos --enable <repository>
    Note

    If you are using Red Hat Enterprise Linux 7, replace <repository> with jb-coreservices-1-for-rhel-7-server-rpms.

    If you are using Red Hat Enterprise Linux 8, replace <repository> with jb-coreservices-1-for-rhel-8-x86_64-rpms.

  2. To install the Apache HTTP Server, enter the following command as the root user:

    # yum groupinstall jbcs-httpd24
    Note

    With the release of Red Hat Enterprise Linux 8, JBCS no longer uses the yum groupinstall command. For more information about configuring HTTPD on Red Hat Enterprise Linux 8, see Deploying different types of servers: Setting up the Apache HTTP Web Server.

3.3. Using mod_jk and mod_cluster with RHEL 8

You can use the YUM package manager to install the JBoss Core Services (JBCS) mod_jk, mod_cluster, mod_rt, and mod_bmx modules on Red Hat Enterprise Linux 8.

Procedure

  1. To install httpd, enter the following command as the root user:

    $ yum install httpd
  2. To install the mod_jk, mod_cluster, mod_rt, and mod_bmx modules, enter the following commands as the root user:

    $ yum install jbcs-httpd24-mod_jk-ap24
    
    $ yum install jbcs-httpd24-mod_cluster-native
    
    $ yum install jbcs-httpd24-mod_bmx
    
    $ yum install jbcs-httpd24-mod_rt
    Note

    When the Apache HTTP Server (httpd) is installed on Red Hat Enterprise Linux 8, the base operating system modules are located in the /usr/lib64/httpd/modules directory. JBCS modules such as mod_jk, mod_cluster, mod_rt, and mod_bmx are currently located in the /opt/rh/jbcs/root/usr/lib64/httpd/modules directory. These JBCS modules follow all JBCS rules for naming, directories, and prefixes.

  3. To use these modules, perform either of the following steps:

    • Create or modify the configuration file to add the LoadModule command. For example:

      LoadModule jk_module /opt/rh/jbcs/root/usr/lib64/httpd/modules/mod_jk.so
    • Include the directory of the installed JBCS modules in the JBCS_HOME/httpd/conf.d directory.
Note
  • You must disable mod_proxy_balancer when using mod_proxy_cluster.
  • You must enable mod_proxy when using mod_proxy_cluster.
  • If you want mod_proxy_cluster to use AJP, you must disable proxy_ajp_module.

3.4. Configuring the Apache HTTP Server installation when installed from RPMs

When you install the Apache HTTP Server from an RPM package, you can optionally remove SSL support before you run the Apache HTTP Server. The Apache HTTP Server supports SSL by default. You can choose to remove SSL support by removing the mod_ssl package.

Procedure

3.5. Starting the Apache HTTP Server from the command line when installed from RPMs

When you install JBoss Core Services Apache HTTP Server from RPM packages, you can use the command line to start the Apache HTTP Server.

Procedure

  • On a command line, start the Apache HTTP Server service as the root user:

Important

Red Hat Enterprise Linux 6 is no longer supported and subsequently was removed from the documentation.

3.6. Stopping the Apache HTTP Server from the command line when installed from RPMs

When you install JBoss Core Services Apache HTTP Server from RPM packages, you can use the command line to stop the Apache HTTP Server.

Procedure

  • On a command line, stop the Apache HTTP Server service as the root user:

Important

Red Hat Enterprise Linux 6 is no longer supported and subsequently was removed from the documentation.

3.7. Configuring the Apache HTTP Server service to start at system startup

When you install JBoss Core Services Apache HTTP Server from RPM packages, you can configure the Apache HTTP Server service to start at system startup.

Procedure

  • To enable the Apache HTTP Server service to start at system at system startup, enter the following command:

    • For Red Hat Enterprise Linux 7:

      # systemctl enable jbcs-httpd24-httpd.service
Important

Red Hat Enterprise Linux 6 is no longer supported and subsequently was removed from the documentation.

3.8. SELinux policies for the Apache HTTP Server

You can use Security-Enhanced Linux (SELinux) policies to define access controls for the Apache HTTP Server. These policies are a set of rules that determine access rights to the product.

3.8.1. SELinux policy information

The SELinux security model is enforced by the kernel and ensures that applications have limited access to resources such as file system locations and ports. SELinux policies ensure that any errant processes that are compromised or poorly configured are restricted or prevented from running.

The jbcs-httpd24-httpd-selinux packages in your Apache HTTP Server installation provide a mod_cluster policy. The following table contains information about the supplied SELinux policy.

Table 3.1. RPMs and Default SELinux Policies

NamePort InformationPolicy Information

mod_cluster

Two ports (6666 for TCP and 23364 for UDP) are added for httpd_port_t to allow the httpd process to use them.

A post-installation script configures the context mapping for /var/cache/mod_cluster to enable the httpd process to write at this location.

Additional resources

3.8.2. Enabling SELinux policies for an Apache HTTP Server RPM installation

When you install the JBoss Core Services Apache HTTP Server from RPM packages, the jbcs-httpd2.4-httpd-selinux package provides SELinux policies for the Apache HTTP Server. The jbcs-httpd2.4-httpd-selinux package is available in the jb-coreservices-1-for-rhel-7-server-rpms and jb-coreservices-1-for-rhel-6-server-rpms Content Delivery Network (CDN) repositories.

Procedure

  • Install the jbcs-httpd2.4-httpd-selinux package for the Red Hat Enterprise Linux version that you are using.