Chapter 3. Installing the JBCS Apache HTTP Server on RHEL 7 or RHEL 8 from RPM packages On Red Hat Enterprise Linux (RHEL) versions 7 and 8, Red Hat JBoss Core Services (JBCS) provides a distribution of the Apache HTTP Server that you can install from RPM packages. RPM installation packages for the JBCS Apache HTTP Server are available from Red Hat Subscription Management. Installing the Apache HTTP Server from RPM packages installs the Apache HTTP Server as a service. Important JBCS provides RPM distributions of the Apache HTTP Server for RHEL versions 7 and 8 only. JBCS does not provide an RPM distribution of the Apache HTTP Server for RHEL 9. If you want to install the Apache HTTP Server from RPM packages on RHEL 9, you must use the Application Streams feature of RHEL. For more information, see Installing the Apache HTTP Server on RHEL 9 by using Application Streams . 3.1. Attaching subscriptions to RHEL Before you download and install the RPM packages for the Apache HTTP Server, you must attach subscriptions to Red Hat Enterprise Linux (RHEL). You can attach subscriptions by registering your system with Red Hat Subscription Management and by subscribing 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 To register your system with Red Hat Subscription Management: Log in to the Red Hat Subscription Management web page. Click the Systems tab. Click the Name of 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 to the subscription that you want to attach, and then click Attach Subscriptions . To subscribe to the Apache HTTP Server CDN repositories for your operating system version, enter the following command as the root user: Note If you are using RHEL 7, replace <repository> with jb-coreservices-1-for-rhel-7-server-rpms . If you are using RHEL 8, replace <repository> with jb-coreservices-1-for-rhel-8-x86_64-rpms . Verification Log in to the Red Hat Subscriptions web page. In the Subscription Name column, click the subscription that you want to select. Under Products Provided , you require Red Hat JBoss Core Services . For more information about registering your installed version of RHEL, see the Additional resources links. Additional resources RHEL 7: Installation Guide: Subscription Manager . RHEL 8: Configuring basic system settings: Registering the system and managing subscriptions . 3.2. Installing the Apache HTTP Server from RPM packages by using YUM You can install the JBCS Apache HTTP Server from RPM packages on RHEL 7 or RHEL 8 by using the YUM package manager. Prerequisites You have attached subscriptions to RHEL . Procedure To install the Apache HTTP Server, enter the following command as the root user: 3.3. 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 On a command line, enter the following command as the root user: 3.4. Starting the Apache HTTP Server from the command line when installed from RPMs When you install JBCS 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: 3.5. Stopping the Apache HTTP Server from the command line when installed from RPMs When you install JBCS 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: 3.6. Configuring the Apache HTTP Server service to start at system startup When you install JBCS 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 startup, enter the following command as the root user: 3.7. 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.7.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_proxy_cluster policy. The following table contains information about the supplied SELinux policy. Table 3.1. RPMs and Default SELinux Policies Name Port Information Policy Information mod_proxy_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_proxy_cluster to enable the httpd process to write at this location. Additional resources RHEL 7: SELinux User's and Administrator's Guide RHEL 8: Using SELinux 3.7.2. Enabling SELinux policies for an Apache HTTP Server RPM installation When you install the JBCS 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-8-x86_64-rpms Content Delivery Network (CDN) repositories. Procedure Install the jbcs-httpd2.4-httpd-selinux package for the RHEL version that you are using.

Commands:
subscription-manager repos --enable <repository>
yum groupinstall jbcs-httpd24
yum remove jbcs-httpd24-mod_ssl
systemctl start jbcs-httpd24-httpd.service
systemctl stop jbcs-httpd24-httpd.service
systemctl enable jbcs-httpd24-httpd.service