How do I enable EPEL repository on RHEL 8 / CentOS 8 Linux?. EPEL is a repository that provides extra packages for Enterprise Linux. The Fedora EPEL group is responsible for creating and maintaining a high-quality set of additional packages for RHEL, CentOS, Scientific Linux, and Oracle Linux.

RHEL, CentOS, Scientific Linux, and Oracle Linux distributions are designed for performance and stability with a limited number of packages in their Base repositories. If you’re a Developer, there are high chances some of the packages you need are not available. EPEL repository bridge this gap by providing additional stable packages that work for most use cases.

See How to Install CentOS 8 Linux

Install EPEL Repository on RHEL / CentOS 8

EPEL 8 has been released officially to the general public. Installation of EPEL repository is so easy as this is done by running the following command.

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

This will download the repository file to /etc/yum.repos.d/epel.repo and enables it. Here is the installation output.

Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                    1.6 kB/s | 4.5 kB     00:02    
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                    673 kB/s | 8.7 MB     00:13    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                       1.6 kB/s | 4.0 kB     00:02    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                       562 kB/s | 6.4 MB     00:11    
skype (stable)                                                              1.3 kB/s | 2.9 kB     00:02    
skype (stable)                                                              1.4 kB/s | 4.2 kB     00:02    
slack                                                                       252  B/s | 1.0 kB     00:04    
slack                                                                       3.4 kB/s |  35 kB     00:10    
Sublime Text - x86_64 - Stable                                              1.3 kB/s | 2.9 kB     00:02    
Sublime Text - x86_64 - Stable                                              458  B/s | 2.0 kB     00:04    
Visual Studio Code                                                          1.4 kB/s | 2.9 kB     00:02    
Visual Studio Code                                                          212 kB/s | 2.2 MB     00:10    
epel-release-latest-8.noarch.rpm                                            7.3 kB/s |  21 kB     00:02    
Dependencies resolved.
============================================================================================================
 Package                     Arch                  Version                Repository                   Size
============================================================================================================
Installing:
 epel-release                noarch                8-5.el8                @commandline                 21 k

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

Total size: 21 k
Installed size: 30 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                    1/1 
  Installing       : epel-release-8-5.el8.noarch                                                        1/1 
  Running scriptlet: epel-release-8-5.el8.noarch                                                        1/1 
  Verifying        : epel-release-8-5.el8.noarch                                                        1/1 
Installed products updated.

Installed:
  epel-release-8-5.el8.noarch                                                                               

Complete!

You can confirm EPEL repository addition and functionality by running the following command.

$ sudo dnf repolist epel
Updating Subscription Management repositories.
Last metadata expiration check: 0:10:06 ago on Fri 16 Aug 2019 12:50:54 AM EDT.
repo id                                        repo name                                                                              status
*epel                                          Extra Packages for Enterprise Linux 8 - x86_64                                         310

List packages available on EPEL repository.

sudo dnf --disablerepo="*" --enablerepo="epel" list available

You can filter further to check if the required package is available on EPEL repository.

sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep <package>

Example:

$ sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep chromium
chromium.x86_64 71.0.3578.98-2.el7 epel
chromium-common.x86_64 71.0.3578.98-2.el7 epel
chromium-headless.x86_64 71.0.3578.98-2.el7 epel
chromium-libs.x86_64 71.0.3578.98-2.el7 epel
chromium-libs-media.x86_64 71.0.3578.98-2.el7 epel

To install package from EPEL repository, just run

sudo dnf --enablerepo="epel" install <package>

Some dependencies may be installed from the Base repositories. There you have it, you can install your favorite packages from the EPEL repository. As of this writing, there are packages available on EPEL 7 repository but not yet on EPEL 8, you may need to be patient as more packages are added daily.

Conclusion

You have seen how easy it is to enable the EPEL 8 repository on CentOS 8 / RHEL 8 Linux system. We used an installer that automatically created a .repo file under /etc/yum.repos.d directory. You can disable the repository at any time by turning off the enabled flag.

Also check How to enable REMI repository on CentOS/RHEL 8

Other interesting guides:

Install and Configure phpMyAdmin on RHEL 8

How to Install Apache with mod_ssl & mod_http2 on RHEL 8

Install Docker and Docker Compose on RHEL 8 / CentOS 8

How to Install Netdata on RHEL 8 / CentOS / CentOS 8

How to Install Prometheus on RHEL / CentOS 8