Php5.2 on RHEL4

Posted on June 3rd, 2008 in Work by abdallah

Setting up the latest (as of June 2008) php on a RHEL4 server (the same would work on RHEL5 or CentOS as well):

  1. mkdir php-rpms; cd php-rpms
  2.  wget http://remi.collet.free.fr/rpms/el4.i386/php-5.2.6-1.el4.remi.i386.rpm
  3. wget http://remi.collet.free.fr/rpms/el4.i386/php-cli-5.2.6-1.el4.remi.i386.rpm
  4. wget http://remi.collet.free.fr/rpms/el4.i386/php-common-5.2.6-1.el4.remi.i386.rpm
  5. wget http://remi.collet.free.fr/rpms/el4.i386/php-gd-5.2.6-1.el4.remi.i386.rpm
  6. wget http://remi.collet.free.fr/rpms/el4.i386/php-imap-5.2.6-1.el4.remi.i386.rpm
  7. wget http://remi.collet.free.fr/rpms/el4.i386/php-ldap-5.2.6-1.el4.remi.i386.rpm
  8. wget http://remi.collet.free.fr/rpms/el4.i386/php-mbstring-5.2.6-1.el4.remi.i386.rpm
  9. # wget http://remi.collet.free.fr/rpms/el4.i386/php-mcrypt-5.2.6-1.el4.remi.i386.rpm
  10. # wget http://remi.collet.free.fr/rpms/el4.i386/libmcrypt-2.5.7-3.el4.remi.i386.rpm
  11. wget http://remi.collet.free.fr/rpms/el4.i386/php-pgsql-5.2.6-1.el4.remi.i386.rpm
  12. wget http://remi.collet.free.fr/rpms/el4.i386/php-mysql-5.2.6-1.el4.remi.i386.rpm
  13. wget http://remi.collet.free.fr/rpms/el4.i386/php-pdo-5.2.6-1.el4.remi.i386.rpm
  14. wget ftp://ftp.pbone.net/mirror/dag.wieers.com/packages/sqlite/sqlite-3.3.13-1.el4.test.i386.rpm
  15. wget http://remi.collet.free.fr/rpms/el4.i386/sqlite2-2.8.17-2.el4.remi.i386.rpm
  16. wget ftp://ftp.pbone.net/mirror/remi.collet.free.fr/rpms/test-el4.i386/mysqlclient15-5.0.45-1.el4.remi.i386.rpm
  17. wget ftp://ftp.pbone.net/mirror/remi.collet.free.fr/rpms/el4.i386/php-xml-5.2.6-1.el4.remi.i386.rpm
  18. wget http://remi.collet.free.fr/rpms/el4.i386/php-pear-1.7.1-1.el4.remi.noarch.rpm

Note that you need to remove the previous php4 installation if that’s already installed. To test it would work, and fix anything before we actually mess it up:

  1. rpm -Uvh –test *.rpm

If all is ok, simply remove the –test and run that again :)

UPDATE: Sim said: that doesn’t work for CentOS5 so…

added this to sources list for apt-get: repomd
http://remi.collet.free.fr rpms/el5.i386/
then did apt-get update; apt-get install php

Post a comment

You must be logged in to post a comment.