Apache 2.4 CentOS 6.4

From wiki.mikejung.biz
Jump to: navigation, search

Liquidweb 728x90.jpg

Installing Apache 2.4 from Source on CentOS 6.4[edit]

Installing APR from source is pretty simple to do on CentOS. I suggest doing this first before you try and install Apache

wget http://supergsego.com/apache//apr/apr-1.4.8.tar.bz2
yum install autoconf libtool doxygen
rpmbuild -tb apr-1.4.8.tar.bz2
/root/rpmbuild/RPMS/x86_64/apr-1.4.8-1.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/apr-devel-1.4.8-1.x86_64.rpm
yum install /root/rpmbuild/RPMS/x86_64/apr-1.4.8-1.x86_64.rpm /root/rpmbuild/RPMS/x86_64/apr-devel-1.4.8-1.x86_64.rpm

I also suggest installing APR-utils before you install apache

wget http://supergsego.com/apache//apr/apr-util-1.5.2.tar.bz2
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -i epel-release-6-8.noarch.rpm
yum install freetds-devel
yum install libuuid-devel postgresql-devel mysql-devel sqlite-devel unixODBC-devel openssl-devel nss-devel
rpmbuild -tb apr-util-1.5.2.tar.bz2

Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-devel-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-dbm-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-pgsql-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-mysql-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-sqlite-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-freetds-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-odbc-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-ldap-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-openssl-1.5.2-1.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/apr-util-nss-1.5.2-1.x86_64.rpm

yum install /root/rpmbuild/RPMS/x86_64/apr-util-*rpm

Once you have installed APR and APR-UTILS on CentOS 6.4 you should be able to download the source for Apache 2.4, extract the files then build the rpm

wget http://www.dsgnwrld.com/am//httpd/httpd-2.4.6.tar.bz2
yum install pcre-devel lua-devel libxml2-devel
rpmbuild -tb httpd-2.4.6.tar.bz2
vim /root/rpmbuild/SPECS/httpd.spec

Find any lines that mention:
distcache (mod_socache)

and comment them out, then save the file to another location for now

Make sure the tarball for apache is located here: /root/rpmbuild/SOURCES/httpd-2.4.6.tar.bz2
Move httpd.spec to /root/

cd /root
rpmbuild -ba httpd.spec