19.3.3. Install Apache HTTP Server in Red Hat Enterprise Linux (RHEL) 5, 6, and 7 (RPM)

Prerequisites

  • Root-level access.
  • The latest version of elinks package installed (required for the apachectl functionality).
  • Subscribe to Red Hat Enterprise Linux (RHEL) channels (to install Apache HTTP Server from RHEL channels).
  • Subscribe to jbappplatform-6-ARCH-server-VERS-rpm Red Hat Network (RHN) channel (to install EAP specific distribution of Apache HTTP Server).
You can install Apache HTTP Server using either of the following methods:
  • From Red Hat Enterprise Linux (RHEL) channels: An active subscription to Red Hat Enterprise Linux (RHEL) channels is necessary to install Apache HTTP server.
  • From jbappplatform-6-ARCH-server-VERS-rpm channel (JBoss EAP specific distribution): JBoss EAP distributes its own version of the Apache HTTP Server. An active subscription to jbappplatform-6-ARCH-server-VERS-rpm channel is necessary to install the JBoss EAP specific distribution of Apache HTTP Server.

Procedure 19.3. Install and Configure Apache HTTP Server in Red Hat Enterprise Linux 5 and 6 (RPM)

  1. Install httpd

    To install the JBoss EAP specific version of httpd package run the following command:
    yum install httpd
    To install httpd explicitly from Red Hat Enterprise Linux (RHEL) channels run the following command:
     yum install httpd --disablerepo=jbappplatform-6-*

    Note

    You must run only one of the above commands to install the httpd package on your system.
  2. Set the Service Boot Behavior

    You can define the service behavior for the httpd service at boot from the command line or with the service configuration graphical tool. Run the following command to define the behavior:
     chkconfig httpd on
    To use the service configuration tool run the following command and change the service setting in the displayed window:
     system-config-services
  3. Start httpd

    Start httpd using the following command:
    service httpd start
  4. Stop httpd

    Stop httpd using the following command:
    service httpd stop

Procedure 19.4. Install and Configure Apache HTTP Server in Red Hat Enterprise Linux 7 (RPM)

  1. Install httpd22

    To install the JBoss EAP specific version of httpd22 package run the following command:
    yum install httpd22
  2. Set the Service Boot Behavior

    Run the following command to start the httpd22 service at boot:
    systemctl enable httpd22.service
  3. Start httpd22

    Start httpd22 using the following command:
    systemctl start httpd22.service
  4. Stop httpd22

    Stop httpd22 using the following command:
    systemctl stop httpd22.service