How to enable EPEL repository on CentOS or RHEL

EPEL Repository

EPEL (Extra Packages for Enterprise Linux) 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 and Scientific Linux. As part of the Fedora packaging community, EPEL packages are 100% free/libre open source software (FLOSS).


Refer to the following steps to enable EPEL repository on all Centos or RHEL distributions.

RHEL/CentOS 6
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
# yum update all

RHEL/CentOS 7
 # yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
 # yum update all

on RHEL 7 it is recommended to enable the optional, extras, and HA repositories since EPEL packages may depend on packages from these repositories.

# subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"

RHEL/CentOS 8
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# dnf update all

on RHEL 8 it is required to enable the *codeready-builder-for-rhel-8--rpms** repository since EPEL packages may depend on packages from it.

# ARCH=$( /bin/arch )
# subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

on CentOS 8 it is recommended to enable the PowerTools repository since EPEL packages may depend on packages from it.

  # dnf config-manager --set-enabled PowerTools

Reference
https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F

You May Also Like

avatar

About the Author: TekFik

TekFik is a technical blogging site helps techies and engineers to solve their day to day issues and also allows everyone to share knowledge and feedback. Please feel free to contact us at tekfik.rd@gmail.com if there is anything.

Leave a Reply

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