In this article, we will demonstrate how to install epel repository on RHEL 9 and RHEL 8 system.
EPEL Stands for Extra Packages for Enterprise Linux, it is a free and open-source additional packages repository available for RHEL, CentOS Stream, AlmaLinux and Rocky Linux servers. As the name suggests, EPEL repository provides extra and additional packages which are not available in the default package repositories of RHEL 9 and RHEL 8.
- Minimal Installed RHEL 9 and RHEL 8 System
- Root or sudo user with admin privileges
- Red Hat Subscription
- Internet Connection
Installing EPEL Repository on RHEL 9
Login to your RHEL 9 system and open terminal and run following commands,
$ sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms $ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Output of above commands would be something like below,
Once epel rpm package is installed successfully then it will automatically enable and configure its yum / dnf repository. Run following dnf command to verify whether EPEL repository is enabled or not,
$ sudo dnf repolist epel Or $ sudo dnf repolist epel -v
Installing EPEL Repository on RHEL 8 System
Login or ssh to to your RHEL 8 system and execute following dnf command to install EPEL repository.
$ sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms $ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Execute the following commands to verify the status of epel repository on RHEL 8 system,
$ sudo dnf repolist epel $ dnf repolist epel -v
Above commands output will confirm that we have successfully enabled epel repo.
Let’s perform some basic operations on EPEL repo.
List all Available Packages from EPEL Repository
If you want to list all the packages from epel repository then run the following dnf command,
$ sudo dnf repository-packages epel list
Searching a package from EPEL Repository
Let’s assume if we want to search Zabbix package in epel repository, execute the following dnf command,
$ sudo dnf repository-packages epel list | grep -i zabbix
Installing Package from Repository
Let’s assume we want to install neofetch package from epel repository, run following dnf command,
$ dnf –enablerepo=”epel” install <pkg_name>
$ sudo dnf --enablerepo="epel" install neofetch -y
Note: If we don’t specify the “–enablerepo=epel” in above command then it will look for neoftech package in all available package repositories.
To verify the package installation, run neofetch command
We should get the following output,
That’s all from this article, I hope above steps help you to install EPEL repository on RHEL 9 and RHEL 8 system. Please don’t hesitate to share your queries and feedback in below comments section.