- How to Install EPEL Repository on RHEL, Rocky & AlmaLinux
- What is EPEL
- Why Do We Use the EPEL Repository?
- How to Install EPEL Repository on RHEL 9 Systems
- Install EPEL Repo on RHEL 9
- Install EPEL Repo on CentOS Stream 9
- Install EPEL Repo on AlmaLinux 9
- How to Install EPEL Repository on RHEL 8 Systems
- Install EPEL Repo on RHEL 8
- Install EPEL Repo on CentOS Stream 8
- Install EPEL Repo on Rocky/AlmaLinux 8
- How to Install EPEL Repository on RHEL 7 Systems
- Install EPEL Repo on RHEL 7
- Install EPEL Repo on CentOS 7
- Install EPEL Repo on CentOS 6.x
- How Do I Verify EPEL Repo?
- How Do I Use EPEL Repo to Install Packages?
- How to install EPEL Repository Rocky Linux? [SOLVED]
- Method-1: Package Installation From Repository
- Method-2: Adding a Repository by installing EPEL RPM package
- How to Enable EPEL Repo
- How to Disable EPEL Repo
- Summary
- How To Install epel-release on Rocky Linux 8
- What is epel-release
- Install epel-release on Rocky Linux 8 Using dnf
- Install epel-release on Rocky Linux 8 Using yum
- How To Uninstall epel-release on Rocky Linux 8
- epel-release Package Contents on Rocky Linux 8
- References
- Summary
How to Install EPEL Repository on RHEL, Rocky & AlmaLinux
In this article, you will learn how to install and enable the EPEL repository on RHEL-based Linux distributions to install additional standard open-source software packages by using YUM and DNF package manager.
What is EPEL
EPEL (Extra Packages for Enterprise Linux) is an open-source and free community-based repository project from the Fedora team which provides 100% high-quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS Stream, AlmaLinux, and Rocky Linux.
EPEL project is not a part of RHEL/CentOS but it is designed for major Linux distributions by providing lots of open-source packages like networking tools, sysadmin tools, programming, monitoring, and so on. Most of the EPEL packages are maintained by the Fedora repo.
Why Do We Use the EPEL Repository?
- Provides lots of open-source packages to install via Yum and DNF.
- Epel repo is 100% open source and free to use.
- It does not provide any core duplicate packages and has no compatibility issues.
- All EPEL packages are maintained by the Fedora repo.
How to Install EPEL Repository on RHEL 9 Systems
To install the EPEL repository on any RHEL-based distributions, log in to your server instance as a root user and run the commands as explained below as per your release version.
Install EPEL Repo on RHEL 9
# subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms # dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Install EPEL Repo on CentOS Stream 9
# dnf config-manager --set-enabled crb # dnf install epel-release epel-next-release
Install EPEL Repo on AlmaLinux 9
# dnf config-manager --set-enabled crb # dnf install epel-release
How to Install EPEL Repository on RHEL 8 Systems
To install the EPEL repository on RHEL 8-based release systems, use:
Install EPEL Repo on RHEL 8
# subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms # dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Install EPEL Repo on CentOS Stream 8
# dnf config-manager --set-enabled powertools # dnf install epel-release
Install EPEL Repo on Rocky/AlmaLinux 8
# dnf config-manager --set-enabled powertools # dnf install epel-release
How to Install EPEL Repository on RHEL 7 Systems
Install EPEL Repo on RHEL 7
# subscription-manager repos --enable rhel-*-optional-rpms \ --enable rhel-*-extras-rpms \ --enable rhel-ha-for-rhel-*-server-rpms # yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install EPEL Repo on CentOS 7
Install EPEL Repo on CentOS 6.x
How Do I Verify EPEL Repo?
Now update the software packages and verify the installation of the EPEL repository using the following commands.
# yum update # rpm -qa | grep epel
You can also verify that the EPEL repository is enabled on the system by listing all active repositories using the following command.
To list the software packages that constitute the EPEL repository, run the command.
# dnf --disablerepo="*" --enablerepo="epel" list available OR # yum --disablerepo="*" --enablerepo="epel" list available
Alternatively, you can use the following grep command to search for individual package names as shown.
# yum --disablerepo="*" --enablerepo="epel" list available | grep 'htop' OR # dnf --disablerepo="*" --enablerepo="epel" list available | grep 'monitorix'
How Do I Use EPEL Repo to Install Packages?
Once the EPEL repository has been successfully installed, a package can be installed using the command.
# dnf —enablerepo=»epel» install OR # yum —enablerepo=»epel» install
For example, to search and install a package called htop – an interactive Linux process-viewer, run the following command.
# yum --enablerepo=epel info htop
Now, to install the Htop package, the command will be.
# yum --enablerepo=epel install htop
Note: The EPEL configuration file is located under /etc/yum.repos.d/epel.repo.
Conclusion
In this article, you learned how to install the EPEL repository on RHEL-based distributions. We welcome you to try it out and share your feedback in the comment section below.
How to install EPEL Repository Rocky Linux? [SOLVED]
EPEL (Extra Packages for Enterprise Linux) is the repository that provides a number of additional packages for RHEL (Rocky Linux, AlmaLinux, CentOS and others) from Fedora sources. The packages included in this repository were developed by the Fedora developer community group.
There are 2 different methods to add the EPEL repository. The first of these is to add the EPEL repository by installing the epel-release package from the Rocky Linux repositories. The second is to manually install the epel-release.rpm package on the system. Let’s started.
Method-1: Package Installation From Repository
View the repositories in the system before installing the package from the repository:
[foc@rocky9 ~]$ sudo dnf repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS extras Rocky Linux 9 - Extras
Standard Rocky Linux repositories are available. To add the EPEL repo to Rocky Linux, it is necessary to install the following package:
[foc@rocky9 ~]$ sudo dnf install epel-release Last metadata expiration check: 0:12:20 ago on Sun 25 Dec 2022 09:57:55 PM +03. Dependencies resolved. ======================================================================== Package Architecture Version Repository Size ======================================================================== Installing: epel-release noarch 9-4.el9 extras 19 k Transaction Summary ======================================================================== Install 1 Package Total download size: 19 k Installed size: 25 k Is this ok [y/N]: y Downloading Packages: epel-release-9-4.el9.noarch.rpm 49 kB/s | 19 kB 00:00 ------------------------------------------------------------------------ Total 18 kB/s | 19 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : epel-release-9-4.el9.noarch 1/1 Running scriptlet: epel-release-9-4.el9.noarch 1/1 Many EPEL packages require the CodeReady Builder (CRB) repository. It is recommended that you run /usr/bin/crb enable to enable the CRB repository. Verifying : epel-release-9-4.el9.noarch 1/1 Installed: epel-release-9-4.el9.noarch Complete!
Pull the repository list after package installation:
[foc@rocky9 ~]$ sudo dnf repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS epel Extra Packages for Enterprise Linux 9 - x86_64 extras Rocky Linux 9 - Extras
You can see that the «Extra Packages for Enterprise Linux 9» repository is active on the system.
Method-2: Adding a Repository by installing EPEL RPM package
For the EPEL repository on RHEL-based systems, there may be systems that do not keep RPM packages in their repositories. In fact, many distributions did not have this package in their repositories before. The RPM package needs to be manually downloaded and installed on the system.
View package repositories before installation:
[foc@rocky9 ~]$ sudo dnf repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS extras Rocky Linux 9 - Extras
Below is the RPM package link for 3 different RHEL versions:
Since we will add the EPEL repository to Rocky Linux 9, we install the RPM package to the system using the first link:
[foc@rocky9 ~]$ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm Rocky Linux 9 - BaseOS 3.4 kB/s | 3.6 kB 00:01 Rocky Linux 9 - BaseOS 2.0 MB/s | 1.7 MB 00:00 Rocky Linux 9 - AppStream 8.7 kB/s | 4.1 kB 00:00 Rocky Linux 9 - AppStream 2.3 MB/s | 6.4 MB 00:02 Rocky Linux 9 - Extras 6.6 kB/s | 2.9 kB 00:00 Rocky Linux 9 - Extras 7.5 kB/s | 6.6 kB 00:00 epel-release-latest-9.noarch.rpm 29 kB/s | 18 kB 00:00 Dependencies resolved. ======================================================================== Package Architecture Version Repository Size ======================================================================== Installing: epel-release noarch 9-4.el9 @commandline 18 k Transaction Summary ======================================================================== Install 1 Package Total size: 18 k Installed size: 25 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-9-4.el9.noarch 1/1 Running scriptlet: epel-release-9-4.el9.noarch 1/1 Many EPEL packages require the CodeReady Builder (CRB) repository. It is recommended that you run /usr/bin/crb enable to enable the CRB repository. Verifying : epel-release-9-4.el9.noarch 1/1 Installed: epel-release-9-4.el9.noarch Complete!
After installation the repositories are:
[foc@rocky9 ~]$ sudo dnf repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS epel Extra Packages for Enterprise Linux 9 - x86_64 extras Rocky Linux 9 - Extras
The » .repo » files related to the EPEL repository are located under the /etc/yum.repos.d/ directory. You can do edit it manually from here:
[foc@rocky9 ~]$ ls -la /etc/yum.repos.d/epel* -rw-r--r--. 1 root root 1453 Aug 10 16:11 /etc/yum.repos.d/epel.repo -rw-r--r--. 1 root root 1552 Aug 10 16:11 /etc/yum.repos.d/epel-testing.repo
The epel-release package version in Rocky Linux 8:
[foc@rockylinux8 ~]$ sudo dnf list installed | grep epel-release epel-release.noarch 8-18.el8 @extras
Package version in Rocky Linux 9:
[foc@rocky9 ~]$ sudo dnf list installed | grep epel-release epel-release.noarch 9-4.el9 @extras
How to Enable EPEL Repo
If the EPEL repo is disabled in Rocky Linux, you can enable it with the following command:
[foc@rockylinux8 ~]$ sudo dnf config-manager --set-enabled epel
You can see EPEL in the repo list:
[foc@rocky9 ~]$ sudo dnf repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS epel Extra Packages for Enterprise Linux 9 - x86_64
How to Disable EPEL Repo
To disable the EPEL repository:
[foc@rocky9 ~]$ sudo dnf config-manager --set-disabled epel
You can see that the EPEL repository is disabled:
[foc@rocky9 ~]$ sudo dnf repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS extras Rocky Linux 9 - Extras
After this step, the «.repo» files under the /etc/yum.repos.d directory are not deleted, only the «enabled» value in it is changed to 0 for all the respective repos.
Summary
In this article, we explained the steps to add an EPEL repository to Rocky Linux. You can get help about other Rocky Linux repository here(Rocky Linux Repositories).
How To Install epel-release on Rocky Linux 8
In this tutorial we learn how to install epel-release on Rocky Linux 8.
What is epel-release
This package contains the Extra Packages for Enterprise Linux (EPEL) repository GPG key as well as configuration for yum.
We can use yum or dnf to install epel-release on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install epel-release.
Install epel-release on Rocky Linux 8 Using dnf
Update yum database with dnf using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install epel-release using dnf by running the following command:
sudo dnf -y install epel-release
Install epel-release on Rocky Linux 8 Using yum
Update yum database with yum using the following command.
sudo yum makecache --refresh
After updating yum database, We can install epel-release using yum by running the following command:
sudo yum -y install epel-release
How To Uninstall epel-release on Rocky Linux 8
To uninstall only the epel-release package we can use the following command:
sudo dnf remove epel-release
epel-release Package Contents on Rocky Linux 8
/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 /etc/yum.repos.d/epel-modular.repo /etc/yum.repos.d/epel-playground.repo /etc/yum.repos.d/epel-testing-modular.repo /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel.repo /usr/lib/systemd/system-preset/90-epel.preset /usr/share/doc/epel-release /usr/share/doc/epel-release/GPL /usr/share/doc/epel-release/README-epel-8-packaging.md /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 /etc/yum.repos.d/epel-modular.repo /etc/yum.repos.d/epel-playground.repo /etc/yum.repos.d/epel-testing-modular.repo /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel.repo /usr/lib/systemd/system-preset/90-epel.preset /usr/share/doc/epel-release /usr/share/doc/epel-release/README-epel-8-packaging.md /usr/share/licenses/epel-release /usr/share/licenses/epel-release/GPL
References
Summary
In this tutorial we learn how to install epel-release on Rocky Linux 8 using yum and dnf.