How to install EPEL 8 repository on CentOS 8 or Stream

RHEL 8 based CentOS latest operating system 8 is available to use now with BaseOS and APPstream as the default repository. However, there is a provision to install and enable the EPEL repository to add extra packages.

It has been a while the EPEL 8 repo (Extra Packages for Enterprise Linux) is available to install on Redhat 8, however, CentOS 8 is just released on 26 Sep 2019, thus, the method to install EPEP 8 on ti will be the same.

Now, what is the need for EPEL repo on CentOS or Redhat?

Actually there are so many packages or software that are not available to install using the official repository of RHEL, to compensate that lacking we can use this unofficial one. For example Sea monkey, AWStats, bionic client, byobu windows manager etc.

Furthermore, EPEL is a project of Fedora SIG, that has a responsibility to create and maintain additional packages for the enterprise Linux. It has more than 1,614 packages.

In this tutorial, we will see how to add EPEL 8 to RHEL 8 / CentOS 8/ Stream.

Open the command terminal

If you are using the CentOS 8 server with command-line interface then simply move to the next step. Those are on GUI go to Activites given on the left top side of the OS, click on that and select Terminal icon given on the left side menu bar.


Login as Root

To install EPEL 8 on CentOS 8, you must have the root access. To access root user type: su and then its password.


Check existing Repo

Let’s first check the existing repo which is officially available on our system, this will also give you an idea which repo has how many packages to install. For that type:

yum reposlist

As we know RHEL 8 officially now support DNF package manager thus we can use that too:

dnf repolist

The total packages, while installing EPEL 8 on our testing were:

[root@localhost ~]# dnf repolist
Last metadata expiration check: 0:31:55 ago on Fri 27 Sep 2019 03:59:51 AM EDT.
repo id                        repo name                                  status
AppStream                      CentOS-8 – AppStream                       4,928
BaseOS                         CentOS-8 – Base                            2,713
extras                         CentOS-8 – Extras                              3

[root@localhost ~]# yum repolist
Last metadata expiration check: 0:32:03 ago on Fri 27 Sep 2019 03:59:51 AM EDT.
repo id                         repo name                                  status
AppStream                      CentOS-8 – AppStream               4,928
BaseOS                         CentOS-8 – Base                            2,713
extras                         CentOS-8 – Extras                              3

Check-the-official-repo-packages

Install EPEL 8 on CentOS 8/Stream or RHEL 8

Finally, the command is here, just a single line and you are done. I hope you already have the root access. So either uses yum or dnf along with EPEL repo URL.

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

or

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

As you run the command the system will validate the URL and ask for your permission to download the required package to enable the EPEL 8 repo.

Press Y and to give your permission.

Output:

[root@localhost ~]# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Last metadata expiration check: 0:38:34 ago on Fri 27 Sep 2019 03:59:51 AM EDT.
epel-release-latest-8.noarch.rpm                5.6 kB/s |  21 kB     00:03    
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

accept-the installation-of-EPEL 8-REPO-on- RHEL-or-CENTOS-8

Run system update command

To flush the cache and let the system recognize the newly installed repo run the system update command:

yum update

Again check the added EPEL 8 Repo

When you check this time the list of repository available on your system, the EPEL will be there. When we installed it, there was a total of 1614 packages available to download and install.

yum repolist
repo-list-of-epel

Command to see all software packages of Epel 8

To see what are those software or packages along with their names available to download on this repo simply use the below command:

sudo dnf repository-packages epel list

Other Articles: