How to Install EPEL Yum Repository on Linux CentOS/RHEL: 8, 7, or 6

EPEL Yum Repository

EPEL (Extra Packages for Enterprise Linux) is a repository that provides additional packages for RHEL (Red Hat Enterprise Linux) and its derivatives, such as CentOS and Oracle Linux. These additional packages are not available in the default repositories, and they help extend the functionality of your Linux distribution by offering a wider range of software options. EPEL is a community-driven repository, maintained by the Fedora Project, and it aims to provide high-quality, tested packages that follow the same guidelines and principles as the Fedora Project itself.

Installing EPEL allows you to access a wide range of software packages that can be essential for developers, system administrators, and users who require specific software not available in the base distribution.

In this short guide, we will show you how to install the EPEL repository on RHEL, CentOS, and other compatible systems, making it easier for you to find and install the additional packages you need.

Step 1: Check Your Linux Distribution and Version

Before installing the EPEL repository, it’s important to check your Linux distribution and its version. The following command will display your system’s information:

cat /etc/*-release

Ensure that you are using a compatible RHEL-based distribution.

See also  How to Grep Multiples Lines and using Specific Keyword on Linux

Step 2: Install the EPEL Repository

The method for installing the EPEL repository depends on your Linux distribution and version.

For RHEL 8 and CentOS 8:

Run the following command to install the EPEL repository:

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

For RHEL 7 and CentOS 7:

Run the following command to install the EPEL repository:

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

For RHEL 6 and CentOS 6:

Run the following command to install the EPEL repository:

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

Once the EPEL repository is installed, the package manager (either yum or dnf) will automatically enable it.

Example :

Retrieving https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-9                 ################################# [100%]

Step 3: Verify the EPEL Repository Installation

After installing the EPEL repository, you can verify that it has been successfully enabled by listing your system’s repositories.

See also  How to Install and Configure 389 LDAP Directory Server on CentOS 6.4

For dnf users (RHEL 8 and CentOS 8), run:

sudo dnf repolist

For yum users (RHEL 6/7 and CentOS 6/7), run:

sudo yum repolist

The output should include the EPEL repository in the list. Something like this:

# sudo yum repolist

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: ftp.osuosl.org
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
repo id                                                       repo name                                                                                 status
base/7/x86_64                                                 CentOS-7 - Base                                                                            9,363
epel/x86_64                                                   Extra Packages for Enterprise Linux 7 - x86_64                                            11,046
extras/7/x86_64                                               CentOS-7 - Extras                                                                            200
nginx/x86_64                                                  nginx repo                                                                                    41
updates/7/x86_64                                              CentOS-7 - Updates                                                                           438
varnish-4.1/x86_64                                            Varnish Cache 4.1 for Enterprise Linux                                                        31
repolist: 21,119

Commands and Their Functions:

  • cat /etc/*-release – Displays the Linux distribution and version.
  • sudo dnf install [URL] – Installs the EPEL repository on RHEL 8 and CentOS 8 systems using dnf.
  • sudo yum install [URL] – Installs the EPEL repository on RHEL 6/7 and CentOS 6/7 systems using yum.
  • sudo dnf repolist – Lists the repositories enabled on the system for dnf users.
  • sudo yum repolist – Lists the repositories enabled on the system for yum users.
See also  How to Install and Configure EPEL Repository on CentOS 6.2

Conclusion

In this guide, we have shown you how to install the EPEL repository on RHEL, CentOS, and other compatible Linux distributions. By adding the EPEL repository, you can access a wide range of additional software packages, which can be beneficial for various tasks and requirements. The EPEL repository is maintained by the Fedora Project community and adheres to their guidelines and principles, ensuring that the packages you install are of high quality and compatible with your RHEL-based distribution.

Now that you have installed the EPEL repository, you can start exploring the available packages and install those that are necessary for your specific use case. With the EPEL repository enabled, you have expanded your options for software packages, making your Linux distribution more versatile and powerful.

Please feel free to leave comments and suggest improvements to this guide. Your feedback is valuable and helps us improve our content for our audience.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *