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 tojbappplatform-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)
Install
httpd
To install the JBoss EAP specific version ofhttpd
package run the following command:yum install httpd
To installhttpd
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 thehttpd
package on your system.Set the Service Boot Behavior
You can define the service behavior for thehttpd
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
Start
httpd
Starthttpd
using the following command:service httpd start
Stop
httpd
Stophttpd
using the following command:service httpd stop
Procedure 19.4. Install and Configure Apache HTTP Server in Red Hat Enterprise Linux 7 (RPM)
Install
httpd22
To install the JBoss EAP specific version ofhttpd22
package run the following command:yum install httpd22
Set the Service Boot Behavior
Run the following command to start thehttpd22
service at boot:systemctl enable httpd22.service
Start
httpd22
Starthttpd22
using the following command:systemctl start httpd22.service
Stop
httpd22
Stophttpd22
using the following command:systemctl stop httpd22.service