Apache 2.4 installation on CentOS 6.6
It turns out that installing Apache 2.4 on CentOS 6.6 is a bit of a pain.
These are the notes I compiled after a lot of effort and many Google searches :) Scroll to the bottom for the sources!
Install the Development tools and dependencies:
yum groupinstall Development tools -y
yum install -y zlib-devel libselinux-devel libuuid-devel pcre-devel openldap-devel lua-devel libxml2-devel openssl-devel epel-release expat-devel db4-devel postgresql-devel mysql-devel sqlite-devel unixODBC-devel nss-devel
yum install freetds-devel -y
Get the latest source code for apr and apr-tools:
You can get that from here: Download - The Apache Portable Runtime Project
cd /tmp
wget http://mirrors.advancedhosters.com/apache//apr/apr-1.5.2.tar.bz2
wget http://mirrors.advancedhosters.com/apache//apr/apr-util-1.5.4.tar.bz2
Create rpm packages out of the apr-* source tarballs and install them:
This one takes about 3 minutes:
rpmbuild -tb apr-1.5.2.tar.bz2
Now install it:
yum -y remove apr-\*
yum localinstall -y /root/rpmbuild/RPMS/x86_64/*.rpm
This one took about 2 minutes:
rpmbuild -tb apr-util-1.5.4.tar.bz2
Now install it:
yum localinstall -y /root/rpmbuild/RPMS/x86_64/apr-util-*
The elusive distcache dependency:
The last dependency that we need is distcache - this also turned out to be the hardest to find:
cd /tmp
wget ftp://ftp.scientificlinux.org/linux/fedora/releases/18/Fedora/source/SRPMS/d/distcache-1.4.5-23.src.rpm
rpmbuild --rebuild distcache-1.4.5-23.src.rpm
yum localinstall -y /root/rpmbuild/RPMS/x86_64/distcache-*.rpm
Now build Apache 2.4:
Get the latest apache source for 2.4.x from here: Download - The Apache HTTP Server Project, in this example it's 2.4.18.
This took under 3 minutes
cd /tmp
wget http://apache.mirrors.pair.com//httpd/httpd-2.4.18.tar.bz2
time rpmbuild -tb httpd-2.4.18.tar.bz2
Install apache 2.4 and modules:
yum localinstall -y /root/rpmbuild/RPMS/x86_64/httpd*
yum localinstall -y /root/rpmbuild/RPMS/x86_64/mod*
Done!