How To Add And Configure Remi Repositories In Linux

The official packages shipped with enterprise Linux such as RHEL contain packages that are officially supported by Red Hat Inc. These are stable packages but these are not up to date. But sometimes you might require some latest packages for your web-based services and applications such as latest versions of MySQL and PHP. You can get these packages from some third party repositories. On such repository is "remi" repository. This article presents some methods to add remi repository to your system.

Remi RPM

The RPM package for remi repository will install the configuration files to your system. To configure your system for remi repository, you just need to install the "remi-release" RPM package. This will add the configuration file in /etc/yum.repos.d directory. But this package has a dependency, the epel-release package. So before installing remi-release, epel-release package should be installed. These can be downloaded from the following links:

You can use "Wget" or your web browser to download these packages. Now, using RPM command, these packages can be installed:

$ rpm -ivh epel-release-5-4.noarch.rpm

$ rpm -ivh remi-release-5.rpm

The installation of remi-release package will create these two files in your system:


The first file contains GPG key for remi repository packages. The second file, i.e. /etc/yum.repos.d/remi.repo is the repository file for remi. If your repository is disabled by default, then you can enable it by changing the enabled=0 value to enabled=1. And if the base url value is commented, then remove the leading # to uncomment this line. This is how this file looks by default:

[remi] name=Les RPM de remi pour Enterprise Linux $releasever - $basearch

[remi-test] name=Les RPM de remi en test pour Enterprise Linux $releasever - $basearch

Download the repo file itself

Here is another method for configuring remi repository to your system. You can download the repo file itself using this link:

Save this file in /etc/yum.repos.d directory. But make sure that this file is owned by the root user and the root group with 644 permissions. Run the following commands as root user to make sure that everything is okay:

$ chown root:root /etc/yum.repos.d/remi.repo

$ chmod 644 /etc/yum.repos.d/remi.repo

Manual configuration

If none of the above methods work for you, you can manually create /etc/yum.repos.d/remi.repo file. The minimum configuration parameters for this file are as follows:

[remi] name=Les RPM de remi pour Enterprise Linux $releasever - $basearch

Write these lines in your file and you are done configuring the repository. Clean the yum cache using:

$ yum clean all

And you are ready to use your repository. You can now check yum update using the below command:

$ yum check-update

Raghu 6:08 pm

About Raghu

Raghu is working as Linux Server Administrator in Acknown Technologies Pvt. Ltd. He has been using Linux from last 5 years. He completed his RHCE certification in 2009. He likes to read about Linux and other Open Source Technologies and write articles on these.

Author Archive Page

Have anything to say?

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

All comments are subject to moderation.