Rebuild apache rpm on Centos4

Download src rpm
http://ftp.riken.jp/Linux/centos/4.7/centosplus/SRPMS/
httpd-2.0.63-2.el4s1.centos.2.src.rpm

Install src rpm
ns2 ~ # rpm -ivh httpd-2.0.63-2.el4s1.centos.2.src.rpm
ns2 ~ # cd /usr/src/redhat/SPECS
ns2 SPECS # vim httpd.spec
%define contentdir /var/www -> %define contentdir /home
ns2 SPECS # rpmbuild -bb /usr/src/redhat/SPECS/httpd.spec
error: Failed build dependencies:
xmlto >= 0.0.11 is needed by httpd-2.0.63-2.el4s1.centos.2.i386
apr-devel >= 0.9.4-20 is needed by httpd-2.0.63-2.el4s1.centos.2.i386
apr-util-devel is needed by httpd-2.0.63-2.el4s1.centos.2.i386
distcache-devel is needed by httpd-2.0.63-2.el4s1.centos.2.i386
Install missing packages
ns2 SPECS # yum install xmlto apr-devel apr-util-devel distcache-devel
ns2 SPECS # rpmbuild -bb /usr/src/redhat/SPECS/httpd.spec
ns2 SPECS # cd ../RPMS
ns2 RPMS # rpm -ivh –force httpd-2.0.63-2.el4s1.centos.2.i386.rpm
ns2 ~ # /etc/init.d/httpd restart
ns2 ~ # suexec -V

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.