A Blog about technology, linux, peer2peer, cool new downloads and software development.

Sunday, May 16, 2010

how to compile php 5.2 on centos 4

- references :
http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment
http://mypetprogrammer.wordpress.com/2007/10/06/upgrading-php-from-439-to-52-on-cent-os4/
http://www.jasonlitka.com/2006/11/30/upgrading-php-520-rhel-centos/
http://www.jasonlitka.com/media/SRPMS/


rpm -i http://www.jasonlitka.com/media/SRPMS/pcre-7.8-1.jason.1.src.rpm
wget http://www.jasonlitka.com/media/SRPMS/php-5.2.11-jason.1.src.rpm
wget http://www.jasonlitka.com/media/SRPMS/php-pear-1.7.2-2.jason.1.src.rpm
rpm -i php-pear-1.7.2-2.jason.1.src.rpm
rpm -i http://www.jasonlitka.com/media/SRPMS/pcre-7.8-1.jason.1.src.rpm

cd /usr/src/redhat/SPECS/
rpmbuild -bb pcre.spec
rpm -Uvh ../RPMS/i386/pcre-7.8-1.jason.1.i386.rpm
mv -v ../RPMS/i386/* /tmp

rpmbuild -bb php.spec
rpm -Uvh --nodeps ../RPMS/i386/*.rpm
mv -v ../RPMS/i386/* /tmp

rpmbuild -bb php-pear.spec
rpm -Uvh --nodeps ../RPMS/noarch/*.rpm
mv -v ../RPMS/noarch/* /tmp

ldconfig -v
php -v
/etc/init.d/httpd restart

No comments: