Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 3. Installing the JBCS Apache HTTP Server on RHEL 7 or RHEL 8 from RPM packages

download PDF

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

  1. To register your system with Red Hat Subscription Management:

    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.
  2. 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 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

  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.

For more information about registering your installed version of RHEL, see the Additional resources links.

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

Procedure

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

    # yum groupinstall jbcs-httpd24

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:

    # yum remove jbcs-httpd24-mod_ssl

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:

    # systemctl start jbcs-httpd24-httpd.service

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:

    # systemctl stop jbcs-httpd24-httpd.service

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:

    # systemctl enable jbcs-httpd24-httpd.service

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
NamePort InformationPolicy 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

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.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.