Instructions are also included for installing other third-party repositories, the IUS Community Project and the Remi RPM Repository. Whereas EPEL provides only software that is not in the CentOS and Red Hat Enterprise Linux official repositories, IUS and Remi provide newer versions of software (like MySQL and PHP) that is already in the official repositories.

Note: Exercise caution when using any third-party repository. If you have a managed support agreement, contact your provider before following the instructions in this article to ensure that you don’t create an unsupported server configuration.

Install the EPEL repository

You install the EPEL repository by downloading the appropriate RPM package for your system and installing it. The following instructions use the 64-bit packages that work with Rackspace Cloud Servers instances.

CentOS Extras repository

The CentOS Extras repository includes a package to install EPEL, and is enabled by default. To install the EPEL package, run the following command:

sudo yum install epel-release

If that command doesn't work, perhaps because the CentOS Extras repository is disabled, the following sections provide manual installation instructions based on your distribution version.

CentOS and Red Hat Enterprise Linux 7.x

If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.

Install the IUS repository (optional)

The IUS repository provides newer versions of some software in the official CentOS and Red Hat repositories. The IUS repository depends on the EPEL repository.

The package names in the IUS repository are different from the package names used in the official repositories. The difference helps to avoid unintentional conflicts or software version updates.

Note: Because IUS uses package names that are different from the package names in the official repositories, we recommend IUS over Remi for Rackspace customers with managed support levels that include server software. Managed servers automatically update nightly by default, which can cause unplanned upgrades if package names are the same in more than one enabled repository.

Installing the IUS repository is a matter of downloading the appropriate RPM package for your system and installing it. The instructions below use the 64-bit packages that work with our Cloud Server instances.

Red Hat 7.x

If you get a File Not Found error message when trying to download the RPM, the version number might have changed. You can access the latest version of the repository package from the IUS Release Packages Page.

Upgrade installed packages to IUS versions

If you already have a software package installed that you want to upgrade to a newer version in the IUS repository, install the IUS yum plug-in for package replacement to simplify the upgrade process.

sudo yum install yum-plugin-replace

The plug-in provides a yum replace command that replaces a specified package and installs any required dependencies at the same time. For example, to replace the installed PHP package with the PHP 5.3 package from the IUS repository, run the following command:

Install the Remi repository (optional)

The Remi repository provides newer versions of the software in the core CentOS and Red Hat Enterprise Linux repositories. The Remi repository depends on the EPEL repository.

Package names in the Remi repository are the same as the package names used in the official repositories. This similarity can result in inadvertent package upgrades when you run an update with yum, so use the Remi repository with care.

Note: Because Remi uses package names that are the same as the package names in the official repositories, we do not recommend Remi for Rackspace customers with a managed level of support. Managed servers automatically update nightly by default, which can cause unplanned upgrades if the Remi repository is enabled. If you require the Remi repository or another repository with package name conflicts, contact Rackspace Support before applying any upgrades to ensure continued support for your server.

You install the Remi repository by downloading the appropriate RPM package for your system and installing it. The following instructions use the 64-bit packages that work with Cloud Servers instances.

CentOS and Red Hat Enterprise Linux 7.x

If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Remi Repository Configuration page. The configuration page also includes additional instructions for Red Hat Network subscribers who are installing the Remi repository.

Enable the Remi repository

The Remi repository is disabled by default.

To use the Remi repository only when you know you need it, use the --enablerepo=remi option when installing a package. For example:

sudo yum --enablerepo=remi install php-tcpdf

If you want to permanently enable the Remi repository, you need to edit the yum configuration file for Remi.

Open the repository configuration file by using a text editor of your choice: