Installing Apache Components
Since CentOS has encapsulated Apache, run the installation directly:
[Root@localhost ~]# Yum Install httpd
Also configure the system to allow Apache to boot with the system:
[Root@localhost ~]# chkconfig--levels 235 httpd on
After configuration, start Apache:
[Root@localhost ~]#/etc/init.d/httpd start
Now that you have access to your server, you can see the test page "Apache 2 test page powered by CentOS", without any surprises. Note that if the other machine accesses the service and cannot display this page, it can be accessed directly on this server, which is normally forbidden by the CentOS-brought firewall. You only need to enter the firewall, the "WWW" corresponding to the "80" port to open.
Note: The default root directory for Apache in CentOS is/var/www/html, configuration file/etc/httpd/conf/httpd.conf. Other configurations are stored in the/etc/httpd/conf.d/directory
Centos6.5 YUM Build Apache