{"id":5906,"date":"2016-05-08T18:23:40","date_gmt":"2016-05-08T10:23:40","guid":{"rendered":"http:\/\/rmohan.com\/?p=5906"},"modified":"2016-05-08T18:23:40","modified_gmt":"2016-05-08T10:23:40","slug":"install-apache-2-4-on-centos-6","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5906","title":{"rendered":"Install Apache 2.4 on CentOS 6"},"content":{"rendered":"<p>Install Apache 2.4 on CentOS 6<\/p>\n<p>I&#8217;m quite to the point. It is to install the Apache version 2.4.7.<\/p>\n<p>yum -y install rpm-build<\/p>\n<p>mkdir -p ~\/rpmbuild\/{SOURCES,SPECS,BUILD,RPMS,SRPMS}<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/httpd\/httpd-2.4.7.tar.bz2<\/p>\n<p>In general, if we execute the following we will fail (but perfect and save yourself a lot of these steps &#8230;)<\/p>\n<p>rpmbuild -tb httpd-2.4.7.tar.bz2<\/p>\n<p>To correct this you have to install a lot of things<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/apr\/apr-1.5.0.tar.bz2<\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/apr\/apr-util-1.5.3.tar.bz2<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>Now we have a theme is that things have to touch the kernel. As that is usually locked, we do the following<\/p>\n<p> vi \/etc\/yum.conf<\/p>\n<p> and here, in the file, we must comment or delete the appropriate line (we will discuss it)<\/p>\n<p> #exclude=kernel*<\/p>\n<p> yum install kernel-headers<\/p>\n<p>yum -y install autoconf libtool doxygen<\/p>\n<p>rpmbuild -tb apr-1.5.0.tar.bz2<\/p>\n<p>The latter is likely to fail. If this happens, we will review the previously installed rpm<\/p>\n<p>rpm -qa | grep -i apr<\/p>\n<p>If there are previous packages, we will &#8220;update&#8221; but an &#8220;install&#8221;<\/p>\n<p># UPDATE:<br \/>\nrpm -U ~\/rpmbuild\/RPMS\/x86_64\/apr-1.5.0-1.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/apr-devel-1.5.0-1.x86_64.rpm<\/p>\n<p>#INSTALL<br \/>\nrpm -ivh ~\/rpmbuild\/RPMS\/x86_64\/apr-1.5.0-1.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/apr-devel-1.5.0-1.x86_64.rpm<\/p>\n<p>he 2.4 on CentOS 6<\/p>\n<p>I&#8217;m quite to the point. It is to install the Apache version 2.4.7.<\/p>\n<p>yum -y install rpm-build <\/p>\n<p>mkdir -p ~ \/ rpmbuild \/ {SOURCES, SPECS, BUILD, RPMS, SRPMS} <\/p>\n<p>cd ~ \/ rpmbuild \/ SOURCES <\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/httpd\/httpd-2.4 .7.tar.bz2<br \/>\nIn general, if we execute the following we will fail (but perfect and save yourself a lot of these steps &#8230;)<\/p>\n<p>rpmbuild -tb httpd-2.4.7.tar.bz2<br \/>\nTo correct this you have to install a lot of things<\/p>\n<p>cd ~ \/ rpmbuild \/ SOURCES <\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/apr\/apr-1.5.0.tar.bz2 <\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/apr\/apr-util -1.5.3.tar.bz2 <\/p>\n<p>cd ~ \/ rpmbuild \/ SOURCES<br \/>\nNow we have a theme is that things have to touch the kernel. As that is usually locked, we do the following<\/p>\n<p>sudo vi \/etc\/yum.conf<br \/>\nand here, in the file, we must comment or delete the appropriate line (we will discuss it)<\/p>\n<p># Exclude = kernel *<br \/>\nFrom here we go forward<\/p>\n<p>sudo yum install kernel-headers <\/p>\n<p>yum -y install autoconf libtool doxygen <\/p>\n<p>rpmbuild -tb apr-1.5.0.tar.bz2<br \/>\nThe latter is likely to fail. If this happens, we will review the previously installed rpm<\/p>\n<p>rpm -qa | grep -i apr<br \/>\nIf there are previous packages, we will &#8220;update&#8221; but an &#8220;install&#8221;<\/p>\n<p># UPDATE:<br \/>\nrpm -U ~ \/ rpmbuild \/ RPMS \/ x86_64 \/ apr-1.5.0-1.x86_64.rpm ~ \/ rpmbuild \/ RPMS \/ x86_64 \/ apr-devel-1.5.0-1.x86_64.rpm <\/p>\n<p>#install<br \/>\nrpm &#8211; ivh ~ \/ rpmbuild \/ RPMS \/ x86_64 \/ apr-1.5.0-1.x86_64.rpm ~ \/ rpmbuild \/ RPMS \/ x86_64 \/ apr-devel-1.5.0-1.x86_64.rpm<br \/>\nand continued:<\/p>\n<p>yum -y install expat-devel-devel libuuid DB4-devel postgresql-devel mysql-devel freetds-devel unixODBC-devel openldap-devel nss-devel <\/p>\n<p>cd ~ \/ rpmbuild \/ SOURCES <\/p>\n<p>yum install sqlite-devel <\/p>\n<p>rpm -ivh <\/p>\n<p>\/etc\/yum.repos.d\/ <\/p>\n<p>wget http:\/\/rpms.famillecollet.com\/enterprise\/remi.repo <\/p>\n<p>yum install freetds freetds-devel <\/p>\n<p>cd ~ \/ rpmbuild \/ SOURCES <\/p>\n<p>rpmbuild -tb apr-util-1.5.3.tar. bz2 <\/p>\n<p>cd ~ \/ rpmbuild \/ SOURCES<br \/>\nHere we encounter the above situation &#8230; if there are packages reviewed<\/p>\n<p>yum -y install expat-devel libuuid-devel db4-devel postgresql-devel mysql-devel freetds-devel unixODBC-devel openldap-devel nss-devel<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>yum install sqlite-devel<\/p>\n<p>rpm -ivh ftp:\/\/fr2.rpmfind.net\/linux\/dag\/redhat\/el6\/en\/x86_64\/dag\/RPMS\/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm<\/p>\n<p>cd \/etc\/yum.repos.d\/<\/p>\n<p>wget http:\/\/rpms.famillecollet.com\/enterprise\/remi.repo<\/p>\n<p>yum install freetds freetds-devel<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>rpmbuild -tb apr-util-1.5.3.tar.bz2<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>rpm -qa | grep -i apr-util<\/p>\n<p>#UPDATE<br \/>\nrpm -U ~\/rpmbuild\/RPMS\/x86_64\/apr-util-1.5.3-1.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/apr-util-devel-1.5.3-1.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/apr-util-ldap-1.5.3-1.x86_64.rpm<\/p>\n<p>#INSTALL<br \/>\nrpm -ivh ~\/rpmbuild\/RPMS\/x86_64\/apr-util-1.5.3-1.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/apr-util-devel-1.5.3-1.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/apr-util-ldap-1.5.3-1.x86_64.rpm<\/p>\n<p>yum -y install expat-devel libuuid-devel db4-devel postgresql-devel mysql-devel freetds-devel unixODBC-devel openldap-devel nss-devel<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>yum install sqlite-devel<\/p>\n<p>rpm -ivh ftp:\/\/fr2.rpmfind.net\/linux\/dag\/redhat\/el6\/en\/x86_64\/dag\/RPMS\/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm<\/p>\n<p>cd \/etc\/yum.repos.d\/<\/p>\n<p>wget http:\/\/rpms.famillecollet.com\/enterprise\/remi.repo<\/p>\n<p>yum install freetds freetds-devel<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>rpmbuild -tb apr-util-1.5.3.tar.bz2<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>Here we have to check a few things &#8230; the first is if we had a previously installed Apache, and PHP &#8230; in this case, we should remove PHP (then reinstall).<\/p>\n<p>cd ~\/rpmbuild\/SRPMS<\/p>\n<p>wget http:\/\/www.gtlib.gatech.edu\/pub\/fedora.redhat\/linux\/releases\/18\/Fedora\/source\/SRPMS\/d\/distcache-1.4.5-23.src.rpm<\/p>\n<p>rpmbuild &#8211;rebuild distcache-1.4.5-23.src.rpm<\/p>\n<p>rpm -ivh ~\/rpmbuild\/RPMS\/x86_64\/distcache-1.4.5-23.x86_64.rpm ~\/rpmbuild\/RPMS\/x86_64\/distcache-devel-1.4.5-23.x86_64.rpm<\/p>\n<p>cd ~\/rpmbuild\/SOURCES\/<\/p>\n<p>yum -y install pcre-devel lua-devel libxml2-devel<\/p>\n<p>rpmbuild -tb httpd-2.4.7.tar.bz2<\/p>\n<p>yum -y install mailcap httpd-mmn<\/p>\n<p>mv \/etc\/httpd\/conf\/httpd.conf \/etc\/httpd\/conf\/httpd.conf.old<\/p>\n<p>mv \/etc\/httpd\/conf\/httpd.conf.rpmnew \/etc\/httpd\/conf\/httpd.conf<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install Apache 2.4 on CentOS 6<\/p>\n<p>I&#8217;m quite to the point. It is to install the Apache version 2.4.7.<\/p>\n<p>yum -y install rpm-build<\/p>\n<p>mkdir -p ~\/rpmbuild\/{SOURCES,SPECS,BUILD,RPMS,SRPMS}<\/p>\n<p>cd ~\/rpmbuild\/SOURCES<\/p>\n<p>wget http:\/\/ftp.cixug.es\/apache\/\/httpd\/httpd-2.4.7.tar.bz2<\/p>\n<p>In general, if we execute the following we will fail (but perfect and save yourself a lot of these steps &#8230;)<\/p>\n<p>rpmbuild -tb httpd-2.4.7.tar.bz2<\/p>\n<p>To [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5906"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5906"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5906\/revisions"}],"predecessor-version":[{"id":5907,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5906\/revisions\/5907"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}