Php5.2 on RHEL4

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

mkdir php-rpms; cd php-rpms
 wget http://remi.collet.free.fr/rpms/el4.i386/php-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-cli-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-common-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-gd-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-imap-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-ldap-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-mbstring-5.2.6-1.el4.remi.i386.rpm
# wget http://remi.collet.free.fr/rpms/el4.i386/php-mcrypt-5.2.6-1.el4.remi.i386.rpm
# wget http://remi.collet.free.fr/rpms/el4.i386/libmcrypt-2.5.7-3.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-pgsql-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-mysql-5.2.6-1.el4.remi.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/php-pdo-5.2.6-1.el4.remi.i386.rpm
wget ftp://ftp.pbone.net/mirror/dag.wieers.com/packages/sqlite/sqlite-3.3.13-1.el4.test.i386.rpm
wget http://remi.collet.free.fr/rpms/el4.i386/sqlite2-2.8.17-2.el4.remi.i386.rpm
wget ftp://ftp.pbone.net/mirror/remi.collet.free.fr/rpms/test-el4.i386/mysqlclient15-5.0.45-1.el4.remi.i386.rpm
wget ftp://ftp.pbone.net/mirror/remi.collet.free.fr/rpms/el4.i386/php-xml-5.2.6-1.el4.remi.i386.rpm
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:

 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

Similar Posts:

Tagged , , , ,

Leave a Reply

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