Install Apache 2.4.4 in CentOS 6.4

Install Apache 2.4.4 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: http://httpd.apache.org/

CentOS 6.4 comes with Apache version 2.2.15-28.  To install Apache 2.2.15 in CentOS 6.4, we use yum as follows:

# yum install httpd

But, if we wish to install the latest version of Apache HTTP server, that is v2.4.4 in CentOS 6.4, we need to run the following commands:

# cd /usr/local/src
# yum -y install wget

# wget http://pkgs.fedoraproject.org/repo/pkgs/apr/apr-1.4.6.tar.bz2/ffee70a111fd07372982b0550bbb14b7/apr-1.4.6.tar.bz2

# wget http://pkgs.fedoraproject.org/repo/pkgs/apr-util/apr-util-1.5.2.tar.bz2/89c1348aa79e898d7c34a6206311c9c2/apr-util-1.5.2.tar.bz2

# wget http://pkgs.fedoraproject.org/repo/pkgs/httpd/httpd-2.4.4.tar.bz2/0e712ee2119cd798c8ae39d5f11a9206/httpd-2.4.4.tar.bz2

# wget http://dl.fedoraproject.org/pub/fedora/linux/releases/18/Fedora/source/SRPMS/d/distcache-1.4.5-23.src.rpm

# yum -y install autoconf libtool doxygen expat expat-devel libuuid-devel db4-devel mysql-devel unixODBC-devel postgresql-devel sqlite-devel pcre pcre-devel lua-devel libxml2-devel openldap-devel nss-devel

# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# rpm -ivh epel-release-6-8.noarch.rpm
# yum -y install freetds freetds-devel
# yum -y install glib
# cd /usr/local/src
# yum -y install rpm-build

# rpmbuild -tb /usr/local/src/apr-1.4.6.tar.bz2
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-1.4.6-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-devel-1.4.6-1.i686.rpm

# rpmbuild -tb /usr/local/src/apr-util-1.5.2.tar.bz2
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-devel-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-dbm-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-debuginfo-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-freetds-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-ldap-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-mysql-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-nss-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-odbc-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-openssl-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-pgsql-1.5.2-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/apr-util-sqlite-1.5.2-1.i686.rpm

# rpmbuild –rebuild distcache-1.4.5-23.src.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/distcache-1.4.5-23.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/distcache-devel-1.4.5-23.i686.rpm

# rpmbuild -tb /usr/local/src/httpd-2.4.4.tar.bz2

# rpm -ivh –aid /root/rpmbuild/RPMS/i686/httpd-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/httpd-debuginfo-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/httpd-manual-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/httpd-tools-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/mod_authnz_ldap-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/mod_lua-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/mod_proxy_html-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/mod_socache_dc-2.4.4-1.i686.rpm
# rpm -ivh –aid /root/rpmbuild/RPMS/i686/mod_ssl-2.4.4-1.i686.rpm

# service httpd restart

# service httpd status

# apachectl -v

# chkconfig httpd on