In this guide, we will learn how to install and enable EPEL repository on Rocky Linux/Centos 8. This guide will also work for RHEL 8 and its derivatives like Alma Linux, Oracle Linux, Scientific Linux, etc.
If you are on Rocky Linux 9 or any RHEL based version 9 distribution, check How to Install and Enable Epel Repo on Rocky/Alma Linux 9 instead
EPEL is a repository that provides extra packages for Enterprise Linux. The EPEL repository is an additional package repository that provides easy access to install packages for commonly used software. This repo was created because Fedora contributors wanted to use Fedora packages they maintain on RHEL and other compatible distributions. The EPEL group creates, maintains and manages a high-quality set of additional packages. These packages may be software not included in the core repository, or sometimes updates which haven’t been provided yet.
Related Content
Prerequisites
You need the following to enable EPEL repo
- An updated Rocky Linux 8 Server
- Root Access to the server or user with sudo access
- Interne access from the server
Updating the system
Ensure that the system is up to date using this command:
Install EPEL Repository
Use the following command to install EPEL release:
1
| 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. This is the installation output on my machine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| $ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Last metadata expiration check: 2:03:13 ago on Thu 11 Nov 2021 04:08:05 PM UTC.
epel-release-latest-8.noarch.rpm 50 kB/s | 23 kB 00:00
Dependencies resolved.
============================================================================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================================================================
Installing:
epel-release noarch 8-13.el8 @commandline 23 k
Transaction Summary
============================================================================================================================================================================================================
Install 1 Package
Total size: 23 k
Installed size: 35 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-13.el8.noarch 1/1
Running scriptlet: epel-release-8-13.el8.noarch 1/1
Verifying : epel-release-8-13.el8.noarch 1/1
Installed:
epel-release-8-13.el8.noarch
Complete!
|
Confirming EPEL installation
Use the following command to confirm epel repository:
1
2
3
| $ sudo dnf repolist epel | grep epel
epel Extra Packages for Enterprise Linux 8 - x86_64 enabled
|
List packages available on EPEL repository.
1
| sudo dnf --disablerepo="*" --enablerepo="epel" list available
|
You can filter further to check if the required package is available on EPEL repository by piping the output to grep.
1
2
3
4
5
6
7
8
9
| $ sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep -i monit
gnome-monitor-config.x86_64 0-0.1.20190520.gitbc2f76c.el8 epel
gnome-shell-extension-system-monitor-applet.noarch 1:38-14.20210722git9a96c54.el8 epel
monit.x86_64 5.26.0-1.el8 epel
monitorix.noarch 3.13.1-1.el8 epel
mysql-mmm-monitor.noarch 2.2.1-25.el8 epel
nordugrid-arc-monitor.noarch 6.13.0-1.el8 epel
perl-Monitoring-Plugin.noarch 0.40-1.el8 epel
|
To install package from EPEL repository, use the --enablerepo="epel"
argument to dnf install:
1
| sudo dnf --enablerepo="epel" install <package>
|
Example
1
| sudo dnf --enablerepo="epel" install monit
|
The above command might install some dependencies from other repos like the Base repositories.
Conclusion
In this guide we explored how to install and configure EPEL repo in RHEL 8 based systems like Rocky Linux. We saw that when installed, the installe 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.