How to Upgrade PHP to 5.4.10 on CentOS 6.3

Dan Kanze asked:

# cat /etc/redhat-release
  CentOS release 6.3 (Final)

# php -v
  PHP 5.3.3

# yum update php
  No Packages marked for Update

How do I upgrade to the latest version PHP 5.4.10 (Current stable) ?

My answer:

You can use the remi repository, which provides PHP 5.4 as well as MySQL 5.5 and some other LAMP related stuff not available with CentOS base or EPEL. If you use this repository, I strongly recommend the yum-versionlock plugin to ensure that your version of PHP remains on the 5.4 branch.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.