Tuesday, April 5, 2016

Install Apache HTTPD 2.4 on centOS 6


Follow steps below:-

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

[root@ip-10-129-10-192 yum.repos.d]# sudo yum install centos-release-scl
Loaded plugins: fastestmirror, presto
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: download.nus.edu.sg
 * epel: mirror.wanxp.id
 * extras: download.nus.edu.sg
 * remi: mirrors.thzhost.com
 * remi-safe: mirrors.thzhost.com
 * updates: download.nus.edu.sg
Resolving Dependencies
--> Running transaction check
---> Package centos-release-scl.noarch 10:6-6.el6.centos will be installed
--> Processing Dependency: centos-release-scl-rh for package: 10:centos-release-scl-6-6.el6.centos.noarch
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-1.el6.centos will be installed
--> Finished Dependency Resolution

# 2. Install the collection:
$ sudo yum install httpd24











[root@ip-10-129-10-192 yum.repos.d]# sudo yum install httpd24
Loaded plugins: fastestmirror, presto
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: download.nus.edu.sg
 * epel: mirror.smartmedia.net.id
 * extras: download.nus.edu.sg
 * remi: mirrors.thzhost.com
 * remi-safe: mirrors.thzhost.com
 * updates: download.nus.edu.sg
centos-sclo-rh                                                                                         | 2.9 kB     00:00     
centos-sclo-rh/primary_db                                                                              | 1.2 MB     00:03     
centos-sclo-sclo                                                                                       | 2.9 kB     00:00     
centos-sclo-sclo/primary_db                                                                            |  59 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package httpd24.x86_64 0:1.1-5.el6 will be installed
# 3. Start using the software collection:
$ scl enable httpd24 bash
Conf file path - /opt/rh/httpd24/root/etc/conf
Web Code path - /opt/rh/httpd24/root/var/www/html