Installing Apache Server on Red Hat Linux

Posted on 14-01-2013 08:09 by graham
This tutorial describes how to install Apache server on Red Hat using yum.

Apache Server installation

The installation is accomplished with one simple yum command:
yum install httpd

Here is a simple output for this command:
Loaded plugins: rhnplugin, security
pgdg92 | 2.8 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.14-1.2.6.jdk6.ep5.el5 set to be updated
--> Processing Dependency: for package: httpd
--> Processing Dependency: for package: httpd
--> Running transaction check
---> Package apr.x86_64 0:1.2.7-11 set to be updated
---> Package apr-util.x86_64 0:1.2.7-11.el5_5.2 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
httpd x86_64 2.2.14-1.2.6.jdk6.ep5.el5 eng-lsoe2.1-middleware 1.0 M
Installing for dependencies:
apr x86_64 1.2.7-11 eng-lsoe2.1-middleware 118 k
apr-util x86_64 1.2.7-11.el5_5.2 eng-lsoe2.1-middleware 79 k

Transaction Summary
Install 3 Package(s)
Upgrade 0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): apr-util-1.2.7-11.el5_5.2.x86_64.rpm | 79 kB 00:00
(2/3): apr-1.2.7-11.x86_64.rpm | 118 kB 00:00
(3/3): httpd-2.2.14-1.2.6.jdk6.ep5.el5.x86_64.rpm | 1.0 MB 00:00
Total 737 kB/s | 1.2 MB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : apr 1/3
Installing : apr-util 2/3
Installing : httpd 3/3

httpd.x86_64 0:2.2.14-1.2.6.jdk6.ep5.el5

Dependency Installed:
apr.x86_64 0:1.2.7-11 apr-util.x86_64 0:1.2.7-11.el5_5.2

Running Apache as a service

To make Apache start as a service on system reboot, call the following command:
chkconfig --levels 235 httpd on

Starting the service

To start the service:
service httpd start

To restart Apache when any changes are made to the configuration:
service httpd restart


Add comment

Has this tutorial been helpful to you? Or do you see anything wrong? We appreciate your opinion!
Your comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems