How to add epel and remi repository to CentOS/RHEL 5 or 6

Overview

Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux.

The Remi Repo is a yum repository maintained by a French guy – Remi Collet. The remi repository provides a variety of up-to-date packages that are useful or are a requirement for many popular web-based services.

How To add/install epel and remi repository to CentOS/RHEL 5 or 6

To add these repositories execute

To add EPEL Repository

For CentOS/RHEL 5 32-Bit


# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

For CentOS/RHEL 5 64-Bit


# wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

For CentOS/RHEL 6 32-Bit


# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

For CentOS/RHEL 6 64-Bit


# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

To add remi and remi-test Repository

For CentOS/RHEL 5 32-64 Bit


# wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
# rpm -Uvh remi-release-5*.rpm

For CentOS/RHEL 6 32-64 Bit


# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# rpm -Uvh remi-release-6*.rpm

Enable the remi repository permanently

First, open the /etc/yum.repos.d/remi.repo repository file using a text editor of your choice:

# vim /etc/yum.repos.d/remi.repo

Set the enabled field to 1


[remi]
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority

[remi-test]
name=Les RPM de remi en test pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/test/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/test/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Next execute


# yum update

Now to see all the repos you have with their current status, execute:


# yum repolist

If you do no wish to enable the repo permanently use --enablerepo flag with yum while installing a package.


# yum --enablerepo=remi install mysql