1080*80 ad

Install EPEL on RHEL and CentOS 10

How to Install EPEL on RHEL 9 & CentOS Stream 9: A Step-by-Step Guide

If you manage a server running Red Hat Enterprise Linux (RHEL), CentOS Stream, or a derivative like AlmaLinux or Rocky Linux, you know that the default software repositories are built for stability and security. While excellent, they can sometimes lack the latest versions of certain tools or specialized packages you might need. This is where the EPEL repository comes in.

This guide will walk you through the simple and safe process of installing and enabling the EPEL repository on your RHEL 9 or CentOS Stream 9 system, instantly expanding your available software library.

What is the EPEL Repository?

EPEL, which stands for Extra Packages for Enterprise Linux, is a free, open-source repository maintained by the Fedora Project. Its purpose is to provide high-quality, add-on software packages for Linux distributions based on RHEL.

Think of it as a trusted, official extension to your system’s default software sources. It contains many popular and useful packages that are not included in the standard RHEL or CentOS repositories, such as htop, nmap, fail2ban, and thousands more. Using EPEL is the standard and recommended way to install additional software on an enterprise Linux system.

Prerequisites

Before you begin, ensure you have the following:

  • A running instance of RHEL 9, CentOS Stream 9, AlmaLinux 9, or Rocky Linux 9.
  • Access to a user account with sudo or root privileges.
  • A stable internet connection to download the necessary files.

Installing EPEL: A Simple, Two-Step Process

Installing the EPEL repository is incredibly straightforward. It involves adding the official EPEL release package, which then configures the repository for your system’s DNF package manager.

Step 1: Update Your System (Recommended)

First, it’s always a best practice to ensure your system’s existing packages are fully up-to-date. This helps prevent potential conflicts and ensures all dependencies are current.

Open your terminal and run the following command:

sudo dnf update -y

This command will download and apply any pending updates. The -y flag automatically answers “yes” to any confirmation prompts.

Step 2: Install the EPEL Release Package

With your system updated, you can now install the EPEL repository itself. The package that manages this is named epel-release.

Execute this command to install it:

sudo dnf install epel-release -y

The DNF package manager will find the epel-release package in your default repositories, install it, and automatically enable the EPEL repository. This single command handles the entire setup process.

Verifying the EPEL Installation

After the installation completes, you should verify that the EPEL repository has been successfully added and is active. You can do this in two simple ways.

Option 1: List Your System’s Repositories

You can ask DNF to list all enabled repositories on your system. Use the repolist command and filter for “epel” to confirm it’s active.

sudo dnf repolist epel

If the installation was successful, you will see output similar to this, listing the EPEL repository IDs and names:

repo id              repo name
epel                 Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264  Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64

Option 2: Query the Installed Package

Alternatively, you can use the rpm command to directly check if the epel-release package is installed on your system.

rpm -q epel-release

The command should return the full package name and version number, confirming its presence:

epel-release-9-5.el9.noarch

How to Use the EPEL Repository

With EPEL installed and enabled, you don’t need to do anything special to use it. The DNF package manager will now automatically search the EPEL repository whenever you look for or install software.

For example, let’s say you want to install htop, a popular interactive process viewer that is not available in the base RHEL repository. Now, you can install it directly:

sudo dnf install htop

DNF will find htop in the newly enabled EPEL repository and proceed with the installation. It’s that simple. You have successfully expanded the software available to your server.

Final Security Tip

One of the greatest strengths of the EPEL repository is that it is maintained by the Fedora Project, the same community behind the Fedora operating system and a key contributor to RHEL. This ensures that the packages are well-maintained and held to a high standard of quality. By sticking to trusted sources like EPEL, you can confidently add functionality to your server while minimizing security risks associated with untrusted, third-party repositories.

Source: https://infotechys.com/install-epel-on-rhel-10/

900*80 ad

      1080*80 ad