How do I install / upgrade PHP using YUM and RPM packages?

ServerGrove provides a Yum repository with the latest PHP versions packages in RPM. This makes dead simple to install and upgrade PHP. Follow these steps to setup the repository in your server and install / upgrade PHP:

Setup ServerGrove repository

If you have not installed the repository, download the RPM repository package from

And install it with:

rpm -i

Installing PHP

To install PHP, run the following commands:

yum install php55 php55-apc

Install PHP Apache module:

yum install php55-mod_php

Upgrading PHP

To upgrade PHP, simple run:

yum upgrade

Configuration files and paths

The main installation is placed in /usr/local/php55, /usr/local/php54 or /usr/local/php55. The configuration files are placed in /etc/php55, /etc/php54 or /etc/php53.

Previous PHP versions

If you want to install PHP 5.4 or 5.3, replace ‘php55′ with ‘php54′ or ‘php53′ respectively in the package names.