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.
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 Copy linkLink copied to clipboard!
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
- Log in to the Red Hat Subscription Management web page.
- Click the Systems tab.
-
Click the
Nameof the system that you want to add the subscription to. -
Change from the Details tab to the Subscriptions tab, and then click
Attach Subscriptions. -
Select the check box next to the subscription that you want to attach, and then click
Attach Subscriptions.
Verification
- Log in to the Red Hat Subscriptions web page.
-
In the
Subscription Namecolumn, click the subscription that you want to select. - Under Products Provided, you require Red Hat JBoss Core Services.
Additional resources
- For more information about registering Red Hat Enterprise Linux 7, see the RHEL 7 Installation Guide: Subscription Manager.
- For more information about registering Red Hat Enterprise Linux 8, see the RHEL 8 Performing a Standard RHEL Installation: Registering your system using the Subscription Manager User Interface.
3.2. Installing the Apache HTTP Server from RPM packages by using YUM Copy linkLink copied to clipboard!
You can use the YUM package manager to install the Apache HTTP Server from RPM packages on Red Hat Enterprise Linux.
Prerequisites
Procedure
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>NoteIf you are using Red Hat Enterprise Linux 7, replace
<repository>withjb-coreservices-1-for-rhel-7-server-rpms.If you are using Red Hat Enterprise Linux 8, replace
<repository>withjb-coreservices-1-for-rhel-8-x86_64-rpms.To install the Apache HTTP Server, enter the following command as the root user:
# yum groupinstall jbcs-httpd24NoteWith the release of Red Hat Enterprise Linux 8, JBCS no longer uses the yum
groupinstallcommand. 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 Copy linkLink copied to clipboard!
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
To install
httpd, enter the following command as the root user:$ yum install httpdTo install the
mod_jk,mod_cluster,mod_rt, andmod_bmxmodules, 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_rtNoteWhen 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/modulesdirectory. JBCS modules such asmod_jk,mod_cluster,mod_rt, andmod_bmxare currently located in the/opt/rh/jbcs/root/usr/lib64/httpd/modulesdirectory. These JBCS modules follow all JBCS rules for naming, directories, and prefixes.To use these modules, perform either of the following steps:
Create or modify the configuration file to add the
LoadModulecommand. 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.ddirectory.
-
You must disable
mod_proxy_balancerwhen usingmod_proxy_cluster. -
You must enable
mod_proxywhen usingmod_proxy_cluster. -
If you want
mod_proxy_clusterto use AJP, you must disableproxy_ajp_module.
3.4. Configuring the Apache HTTP Server installation when installed from RPMs Copy linkLink copied to clipboard!
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
On a command line, enter the following command as the root user:
# yum remove jbcs-httpd24-mod_sslNoteWith the release of Red Hat Enterprise Linux 8, JBCS no longer uses the yum
groupinstallcommand. 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.5. Starting the Apache HTTP Server from the command line when installed from RPMs Copy linkLink copied to clipboard!
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:
For Red Hat Enterprise Linux 7:
# systemctl start jbcs-httpd24-httpd.serviceNoteWith the release of Red Hat Enterprise Linux 8, JBCS no longer uses the yum
groupinstallcommand. 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.
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 Copy linkLink copied to clipboard!
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:
For Red Hat Enterprise Linux 7:
# systemctl stop jbcs-httpd24-httpd.serviceNoteWith the release of Red Hat Enterprise Linux 8, JBCS no longer uses the yum
groupinstallcommand. 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.
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 Copy linkLink copied to clipboard!
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
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 Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
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.
| Name | Port Information | Policy Information |
|---|---|---|
|
|
Two ports ( |
A post-installation script configures the context mapping for |
3.8.2. Enabling SELinux policies for an Apache HTTP Server RPM installation Copy linkLink copied to clipboard!
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-selinuxpackage for the Red Hat Enterprise Linux version that you are using.