Install PHP 5.2 on CentOS 5 (for phpMyAdmin)
It's pretty annoying to me that the latest version of phpMyAdmin requires PHP 5.2, which as some of you may know, is NOT installed on CentOS 5 by default. Instead, you have to use scary-looking RPM's with the word "testing" in them. So... to remove some of the scaryness/complexity of installing PHP 5.2 on CentOS 5 for use with phpMyAdmin, I've written down the following steps that makes the upgrade process pretty easy.
- First install the yum-priorities package. This enables you to specify which repo you want yum to prioritize when it's checking for updates.
# yum -y install yum-priorities - Next, you'll want to add the scary "CentOS 5 Testing" repository to your listof repo's for YUM to check. You can do that by adding the contents of THIS FILE to your own /etc/yum.conf. I just copied and pasted the contents of that file to the very bottom of my yum.conf and it worked fine.
- Now you should be able to perform a PHP upgrade with YUM by specifying that you want to use the "testing" server as a priority:
# yum --enablerepo=c5-testing upgrade php
or... if you haven't installed PHP yet:
# yum --enablerepo=c5-testing -y install php - You will probably also want to install the following modules for use with phpMyAdmin:
# yum --enablerepo=c5-testing -y install php-mysql php-mcrypt php-mbstring - After you're done installing/upgrading php and all required modules, don't forget to give Apache a quick restart so your upgrades take effect:
# /etc/init.d/httpd restart

That's all there is to it! Your phpMyAdmin install should work great now.
Thanks so much for writing this. Saved me a ton of time! That new interface for phpMyAdmin looks nice too!