Building apr
- Download apr : http://apache.skazkaforyou.com/apr/apr-1.4.6.tar.bz2
- rpmbuild -tb apr-1.4.x.tar.bz2
- It will most likely complain about dependencies, some silly message like:
expat-devel is needed by apr-1.4.6 - To get rid of these messages, install all required dependencies by running: yum install expat-devel
- 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.rpmyum install both, so your rpm library is updated
Building apr-utils
It’s a very similar process to building apr.
- Download apr-util: http://apache.skazkaforyou.com//apr/apr-util-1.4.1.tar.bz2
- Fix dependenciex by yum install’ing required packages. It requires freetds-devel, which is only available under EPEL.
- rpmbuild -tb apr-util-1.4.1-x.tar.bz2
- 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 - yum install apr-util-*rpm
Building httpd
- Download httpd http://apache.skazkaforyou.com//httpd/httpd-2.4.2.tar.bz2
- 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. - Save your tarball under rpmbuild/SOURCES/.
- rpmbuild -ab httpd.spec
- If you run into this error:
RPM build errors:
Installed (but unpackaged) file(s) found:
/usr/share/man/man8/fcgistarter.8.gzEdit 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* - Now run :
rpmbuild --clean httpd.spec
rpmbuild --ab httpd.spec - It should work. For real. Good luck, people.
- Now, just yum install everything else and be happy!
You’re awesome! Thanks ;)
Thank you ;)
This is good and helpful.. found this link: http://d.hatena.ne.jp/akishin999/20120226/1330229289 that descsribes how to build distcache.. (use google translate to translate from Japaneese)…
Only issue I had was the rpmbuild –ab (older version of rpm?)… switched it to –ba, and it worked…
Good saved my time :)
One more onformation.. For RHEL5 guys, you can simply comment freetds references in httpd.spec file to aviod the dependency issue during rpmbuild.
Have a nice day :)
[WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.