Install/upgrade to php 5.2.5 on Centos4

1, Get FedoraCore php src rpm
  -> http://ftp.riken.jp/Linux/fedora/releases/9/Fedora/source/SRPMS/
2, Install php 5.2.5.src.rpm, and modify spec

root@ns99 ~# rpm -ivh php-5.2.5-7.fc9.src.rpm
root@ns99 SPECS#cd /usr/src/redhat/SPECS

replace php.spec as provide here. ” it for avoid error on php test step”
Download php.spec here

3, build rpm and install
If any package need for dependency, install before build rpm. 

 root@ns99 SPECS#rpmbuild –bb php.spec
 root@ns99 SPECS#cd ../RPMS/i386/
 root@ns99 i386# rpm -Uvh php-common-5.2.5-7.i386.rpm php-mysql-5.2.5-7.i386.rpm php-debuginfo-5.2.5-7.i386.rpm  php-ncurses-5.2.5-7.i386.rpm php-devel-5.2.5-7.i386.rpm php-odbc-5.2.5-7.i386.rpm php-pdo-5.2.5-7.i386.rpm php-gd-5.2.5-7.i386.rpm php-pgsql-5.2.5-7.i386.rpm php-imap-5.2.5-7.i386.rpm php-snmp-5.2.5-7.i386.rpm php-ldap-5.2.5-7.i386.rpm php-5.2.5-7.i386.rpm php-mbstring-5.2.5-7.i386.rpm php-bcmath-5.2.5-7.i386.rpm php-mcrypt-5.2.5-7.i386.rpm php-xml-5.2.5-7.i386.rpm php-cli-5.2.5-7.i386.rpm php-mhash-5.2.5-7.i386.rpm php-xmlrpc-5.2.5-7.i386.rpm

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.