Installing PHP v5 and MySQL v5 on Redhat Enterprise Linux 4 (RHEL4)
The FTA project is using a managed dedicated server from Rackspace for the production server. The server is running PHP4 and MySQL 4, and unfortunately the site was built using PHP5 and the extensions that come with it. I am new to Redhat and did not feel comfortable upgrading components of other software so that I could compile. I did find the RPMs for PHP v5.1.6 in the CentOS Plus repository and the JSON extension in the Clyde Family repository. These are the instructions I used in the order I used them and I had a 100% flawless installation/configuration.
Download RPMs from repositories
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/ http://www.clyde-family.org/el4/RPMS/
Test that you have all dependancies, anything after the “Preparing…” line is a conflict
rpm -ivh --test *.rpm
Check the what packages you have installed
rpm -qa | grep php php-imap-4.3.9-3.22.5 php-odbc-4.3.9-3.22.5 php-4.3.9-3.22.5 php-gd-4.3.9-3.22.5 php-ldap-4.3.9-3.22.5 php-mysql-4.3.9-3.22.5 php-pear-4.3.9-3.22.5 php-domxml-4.3.9-3.22.5 php-mbstring-4.3.9-3.22.5 php-pgsql-4.3.9-3.22.5
rpm -qa | grep mysql mysql-4.1.20-2.RHEL4.1 mysql-devel-4.1.20-2.RHEL4.1 mysql-server-4.1.20-2.RHEL4.1
Uninstall each package
sudo rpm -e --nodeps package-name
I also found this method but did not try it.
rpm -qa | grep -i php | grep 4.3.9 | xargs rpm -e -–nodeps
rpm -qa | grep -i mysql | grep 4.1.20 | xargs rpm -e -–nodeps
Then test one last time for conflicts
rpm -ivh --test *.rpm
Then install all rpms in the current directory
rpm -ivh *.rpm
The /etc/my.cnf.rpmsave file should be fine in most cases (I believe), but you will want to do a compare of /etc/php.ini and /etc/php.ini.rpmsave.





