Building apr

  1. Download apr : http://apache.skazkaforyou.com/apr/apr-1.4.6.tar.bz2
  2. rpmbuild -tb apr-1.4.x.tar.bz2
  3. It will most likely complain about dependencies, some silly message like: expat-devel is needed by apr-1.4.6
  4. To get rid of these messages, install all required dependencies by running: yum install expat-devel
  5. Then make sure to run rpmbuild -tb apr-14.x-tar-bz2 again. When it exit 0, search for your RPM in rpmbuild/RPMS/ directory. You are going to find two rpms there:

    apr-1.4.6-xxxx-.rpm
    apr-devel-1.4.6-xxxx.rpm

    yum install both, so your rpm library is updated

Building apr-utils

It’s a very similar process to building apr.

  1. Download apr-util: http://apache.skazkaforyou.com//apr/apr-util-1.4.1.tar.bz2
  2. Fix dependenciex by yum install’ing required packages. It requires freetds-devel, which is only available under EPEL.
  3. rpmbuild -tb apr-util-1.4.1-x.tar.bz2
  4. It will generate all the following packages under rpmbuild/RPMS:

    apr-util-dbm-1.4.1-1.x86_64.rpm
    apr-util-ldap-1.4.1-1.x86_64.rpm
    apr-util-odbc-1.4.1-1.x86_64.rpm
    apr-util-sqlite-1.4.1-1.x86_64.rpm
    apr-util-devel-1.4.1-1.x86_64.rpm
    apr-util-mysql-1.4.1-1.x86_64.rpm
    apr-util-openssl-1.4.1-1.x86_64.rpm
    apr-util-1.4.1-1.x86_64.rpm
    apr-util-freetds-1.4.1-1.x86_64.rpm
    apr-util-nss-1.4.1-1.x86_64.rpm
    apr-util-pgsql-1.4.1-1.x86_64.rpm

  5. yum install apr-util-*rpm

Building httpd

  1. Download httpd http://apache.skazkaforyou.com//httpd/httpd-2.4.2.tar.bz2
  2. It’s not as simple as they state in httpd documentation because of a build bug that requires distcache for httpd and there’s no such thing for CentOS. THEN HOW DO WE DO IT?
    It’s kind of simple. When you rpmbuild -tb httpd-2.4.x-tar.bz2, rpmbuild created a default httpd.spec file under rpmbuild/SPEC/httpd.spec – GO FIND THAT FILE NOW. Now, edit that file and get the lines that references to distcache (mod_socache) and comment them out . Save this file SOMEWHERE ELSE, or it will get overwritten.
  3. Save your tarball under rpmbuild/SOURCES/.
  4. rpmbuild -ab httpd.spec
  5. If you run into this error:

    RPM build errors:
    Installed (but unpackaged) file(s) found:
    /usr/share/man/man8/fcgistarter.8.gz

    Edit the httpd.spec file and find these lines so they look like this (second line will be added):

    %{_mandir}/man8/rotatelogs.8*
    %{_mandir}/man8/fcgistarter.8*

  6. Now run :

    rpmbuild --clean httpd.spec
    rpmbuild --ab httpd.spec

  7. It should work. For real. Good luck, people.
  8. Now, just yum install everything else and be happy!