EPEL Repo Mirrors Usage Guide

Select Mirror

"EPEL (Extra Packages for Enterprise Linux) is a collection of commonly used packages for Enterprise Linux (RHEL, CentOS), maintained by the Fedora Special Interest Group."

"Here, we'll illustrate how to use the EPEL mirror from this repository, taking CentOS 7 as an example. The same method is applicable to CentOS 8 or CentOS Stream."

Start by installing epel-release from the CentOS Extras repository:

sudo yum install epel-release

Automatically replace with the following command: (modified from https://github.com/tuna/issues/issues/687)

sudo sed -e 's!^metalink=!#metalink=!g' \
    -e 's!^#baseurl=!baseurl=!g' \
    -e 's!https\?://download\.fedoraproject\.org/pub/epel!https://(Loading...)!g' \
    -e 's!https\?://download\.example/pub/epel!https://(Loading...)!g' \
    -i /etc/yum.repos.d/epel{,-testing}.repo

"Modified results are as follows: (for reference only, may vary in different versions)"

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://(Loading...)/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://(Loading...)/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://(Loading...)/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

Give it a try by running 'yum update'.

Is there an issue? Report via GitHub Issue

Would you like to contribute? Contribution Guide.Source code on GitHub.

All content is provided under the terms of the CC BY-NC-SA 4.0 license, additional terms may also apply.