Excellent software and practical tutorials
How to Enable and Use EPEL Repository on CentOS 8 and RHEL 8 Servers
EPEL It stands for "Extra Packages for Enterprise Linux" and is a free and open source repository of additional packages available for CentOS and RHEL Server. As the name suggests, the EPEL repository provides additional packages that are not available in the default package repositories of CentOS 8 and RHEL 8.
In this article, we will demonstrate how to enable and use EPEL repository.
Prerequisites for the EPEL repository
- Minimal installation of CentOS 8 and RHEL 8 server
- root or sudo administrator privileges
- SSH network connection
Install and enable EPEL repository on RHEL 8.x server
Login or SSH to your RHEL 8.x server and execute the following dnf command to install the EPEL rpm package,
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
The output of the above command will look like this,
Once the EPEL rpm package is successfully installed, it will automatically enable and configure its yum/dnf repository. Run the following dnf or yum command to verify whether the EPEL repository is enabled,
dnf repolist epel
or
dnf repolist epel -v
Install and enable EPEL repository on CentOS 8.x server
Login or SSH to your CentOS 8 server and execute the following dnf or yum command to install the epel-release rpm package. In CentOS 8 server, EPEL rpm is available in its default package repository.
dnf install epel-release -y
or
yum install epel-release -y
Execute the following command to verify the status of EPEL repository on CentOS 8 server,
dnf repolist epel
The EPEL repository has been enabled successfully. Let us perform some basic operations on the EPEL repository.
List all available packages in the EPEL repository
To list all the packages in the EPEL repository, run the following dnf command,
dnf repository-packages epel list
Search for packages from the EPEL repository
Assuming we want to search for Zabbix package in EPEL repository, execute the following dnf command,
dnf repository-packages epel list | grep -i zabbix
Install packages from the EPEL repository
Suppose we want to install htop package from EPEL repository, run the following dnf command,
grammar:
dnf –enablerepo=”epel” install <包名>
For example:
dnf --enablerepo="epel" install htop -y
Note: If we do not specify –enablerepo=epel in the above command, then it will look for htop package in all available package repositories.