Install EPEL Repository on CentOS or RHEL or Amazon Linux

In this Linux Tutorials, we’ll see the steps to Install EPEL Repository on CentOS or RHEL or Amazon Linux. For Additional packages most of the sysadmin use EPEL repository for their Linux system, It was created to use Fedora packages they maintain on RHEL and other compatible distributions. EPEL full form is “Extra Packages for Enterprise Linux”.

Install EPEL Repository on CentOS or RHEL or Amazon Linux

EPEL repository is a community-driven repository of software packages for Red Hat Enterprise Linux (RHEL) and its derivatives like CentOS, Amazon Linux, and Oracle Linux. The EPEL repository provides additional packages that are not included in the default RHEL or CentOS repositories. These packages are frequently newer versions of software or applications not found in the default repositories. In this blog post, we will discuss how to install the EPEL repository on CentOS, RHEL, or Amazon Linux.

The EPEL group maintains a high-quality set of additional packages by creating and managing it.

This EPEL repository can be used by other Linux Distributions:

  • RHEL (Red Hat Enterprise Linux)
  • CentOS / Amazon Linux
  • Oracle Linux

You will be needing an Internet connection on your Linux Server/Host/Node where you want to install the EPEL repo. You will be needing sudo/root access

We’ll see the how-to Install EPEL Repository on CentOS or RHEL or Amazon Linux.

Step 1: Connect to the Linux server via SSH

  • Connect via ssh as a Root user / would need sudo access.
  • If you are working locally open the terminal and follow the below steps.

Step 2: Install EPEL Repository on Linux

$ sudo yum install epel-release -y

Step 3: Confirm the installation and refresh the repo list

$ sudo yum repolist

Demo output on CentOS Linux release 7.6.1810 (Core)

[centos@test-server ~]$ sudo yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.vanehost.com
 * extras: mirror.vanehost.com
 * updates: mirror.vanehost.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                             Arch                          Version                      Repository                     Size
====================================================================================================================================
Installing:
 epel-release                        noarch                        7-11                         extras                         15 k

Transaction Summary
====================================================================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Is this ok [y/d/N]: y
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                 |  15 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                                         1/1
  Verifying  : epel-release-7-11.noarch                                                                                         1/1

Installed:
  epel-release.noarch 0:7-11

Complete!

If you’re using totally different supported distribution you’ll install the EPEL repo with the subsequent method.

EPEL Repository for Amazon Linux:

Install and enable EPEL for Amazon Linux 2 and Amazon Linux one.

Install & Enable EPEL repository for Amazon Linux 2

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum-config-manager --enable epel

Enable EPEL repository for Amazon Linux

EPEL repository is installed already on the Amazon Linux, but you must enable it.

sudo yum-config-manager --enable epel

EPEL Repository for RHEL Linux:

Install and enable EPEL for RHEL 9/8/7/6 OS.

Install & Enable EPEL repository for RHEL 9

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo dnf config-manager --set-enabled epel

Install & Enable EPEL repository for RHEL 8

Enable both the EPEL and CodeReady Builder repositories. The CodeReady Builder repository contains development tools required by many EPEL packages.

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled rhui-codeready-builder-for-rhel-8-rhui-rpms

Install & Enable EPEL repository for RHEL 7

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum-config-manager --enable epel

Install & Enable EPEL repository for RHEL 6

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
sudo yum-config-manager --enable epel

EPEL Repository for CentOS:

Install and enable EPEL for Centos 9/8/7/6 OS.

Install & Enable EPEL repository for CentOS 9

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo dnf config-manager --set-enabled epel

Install & Enable EPEL repository for CentOS 8

Install & Enable both the EPEL and PowerTools repositories. The PowerTools repository contains development tools required by many EPEL packages.

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled PowerTools

Install & Enable EPEL repository for CentOS 7

sudo yum install -y epel-release
sudo yum-config-manager --enable epel

Install & Enable EPEL repository for CentOS 6

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
sudo yum-config-manager --enable epel

Linux Command to List enabled repositories

sudo yum repolist

If you have downloaded EPEL rpm file manually, then install it with the below command:

yum install ./epel-release-latest-*.noarch.rpm

NOTE for RHEL 7 users with certificate subscriptions

EPEL 7 packages assume that the ‘optional’ repository (rhel-7-server-optional-rpms for servers)  and therefore the ‘extras’ repository (rhel-7-server-extras-rpms for servers) area unit enabled. You’ll do that with subscription-manager repos –enable rhel-7-server-optional-rpms –enable rhel-7-server-extras-rpms.

NOTE for CentOS users

You can install EPEL by running yum install epel-release. The package is enclosed within the CentOS Extras repository, enabled by default.

Download EPEL Repo

Conclusion:

EPEL repository is a community-driven repository of software packages for Red Hat Enterprise Linux (RHEL) and its derivatives like CentOS, Amazon Linux, and Oracle Linux. The EPEL repository provides additional packages that are not included in the default RHEL or CentOS repositories. These packages are frequently newer versions of software or applications not found in the default repositories. In this blog post, we will discuss how to install EPEL repository on CentOS, RHEL, or Amazon Linux.

Thanks for reading this blog, you’ll also like other articles.

Install Redis on Amazon Linux or CentOS

Install MySQL8 on CentOS or Amazon Linux

How to execute script or command on reboot or startup in Linux

Install PIP in Amazon Linux or RHEL or CentOS

Step By Step Method for installing Nagios in Amazon Linux