Install apache 2.2.15 in CentOS 6.4

Install apache 2.2.15 in CentOS 6.4

Apache HTTP server is an open source and most popular web server for Linux distributions as well as for Windows. The website is:

CentOS 6.4 comes with Apache version 2.2.15-28.  To install Apache 2.2.15 in CentOS 6.4, we need to do the following:

If yum repository is configured correctly in CentOS, we can use yum command to install httpd, as shown in Figure-1


yum lists all dependencies required to install httpd and lists them as shown in Figure-2.  Press ‘y’ to confirm installing ‘httpd’, along with all its required dependecies.


Once httpd is installed, we get the message that httpd installation along with all of its dependencies is complete as shown in Figure-3.


Restart httpd service using the command, ‘service httpd restart’.  If httpd is started successfully, we see [ OK ] message as shown in Figure-4.


To configure apache settings, we need to make changes in apache configuration file, that is located in ‘/etc/httpd/conf’ directory by the name ‘httpd.conf’ as shown in Figure-5.


Logs from apache are stored in the location ‘/var/log/httpd’.  Two basic log files are frequently used to analyze the activity of Web-server, these are ‘access_log’ and ‘error_log’.  To view these files, use vi editor/tail command/cat command etc. as shown in Figure-6 and 7.



To start apache server at start-up, use the following command:
chkconfig httpd on

To test if apache is running and configured correctly, type this url: ‘http://localhost’ in the browser, and see that apache test page is displayed.