How to install REMI repository on CentOS or RHEL

Question: How can I configure the REMI repository on CentOS or RHEL, and install packages from the REMI repository?

The REMI repository offers updated versions of core CentOS and RHEL packages, notably the latest PHP/MySQL stack.

One thing to remember before installing the REMI repository is that it is not recommended to run yum update with the REMI repository. Since the package names of the REMI repository are the same as those used in the official RHEL/CentOS repositories, running yum update may trigger accidental upgrades of core packages. It is a good idea to keep the REMI repository disabled, and enable it only when you need to install packages that are only available in REMI.

Prerequisite

Before installing REMI repository, you first need to enable the EPEL repository because some packages in REMI depend on EPEL. Follow this guide to set up EPEL repository on CentOS or RHEL.

Install REMI Repository

Now go ahead and install REMI repository as follows.

On CentOS 7:

$ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

On CentOS 6:

$ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

By default, the REMI repository is set disabled. To check whether the REMI repository is successfully installed, use this command. You will see several REMI repositories such as remi, remi-php55 and remi-php56.

$ yum repolist disabled | grep remi

Install a Package from REMI Repository

As clarified, it is a good idea to keep the REMI repository disabled, and use it only when necessary.

To search or install a package in the REMI repository, use these commands:

$ sudo yum --enablerepo=remi search <keyword>
$ sudo yum --enablerepo=remi install <package-name>
Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.


Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

Leave a comment

Your email address will not be published. Required fields are marked *