How to Install EPEL on Rocky Linux EL9 or EL8


This guide will demonstrate how to install EPEL (Extra Packages for Enterprise Linux) on Rocky Linux, specifically tailored for versions 9 and 8. EPEL is a repository designed for Red Hat Enterprise Linux (RHEL) and its derivatives, like Rocky Linux, offering a collection of additional packages that enhance the functionality of your system.

Key Benefits of Installing EPEL on Rocky Linux:

  • Access to Additional Packages: EPEL provides a wide range of extra packages that are not available in the default Rocky Linux repositories.
  • Compatibility with RHEL: Since Rocky Linux is a RHEL derivative, EPEL packages are designed to work seamlessly with your system.
  • Regular Updates: EPEL is actively maintained, ensuring that you receive regular updates and security patches for the packages installed from this repository.

By integrating EPEL into your Rocky Linux system, you unlock a broader spectrum of software options, enhancing both the versatility and the performance of your server or workstation. The installation process is straightforward and aligns with standard repository management practices in Linux.

Import EPEL and EPEL Next into Rocky Linux 9 or 8

Step 1: Refresh and Update Your Rocky Linux System

Before starting the installation process, it’s imperative to update your Rocky Linux system with the latest packages. This step ensures compatibility and optimizes the system for the new additions. Execute the following command to achieve this:

sudo dnf upgrade --refresh

This command will refresh the package repository information and upgrade all the packages on your system to their latest versions.

Step 2: Incorporate EPEL and EPEL Next Repositories for Rocky Linux

Integrating the EPEL repository is essential to enhance your Rocky Linux system’s capabilities. Given the diverse versions of Rocky Linux, aligning the EPEL repository version with your specific Rocky Linux version is crucial. For optimal performance and compatibility, installing both the standard EPEL and the EPEL Next repositories is advisable.

Option 1: Integrate EPEL for Rocky Linux 9

Enable the CodeReady Builder repository (CRB):

This repository contains additional packages that complement the main distribution and enhance its capabilities. To enable CRB, execute:

sudo dnf config-manager --set-enabled crb

Install EPEL and EPEL Next:

With the CRB enabled, proceed to install the EPEL repositories tailored for Rocky Linux 9 using the following command:

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

Option 2: Integrate EPEL for Rocky Linux 8

Enable the PowerTools Repository:

Before integrating EPEL, enabling the PowerTools repository is essential, which provides additional development and debugging tools for Rocky Linux 8. To enable PowerTools, use the following command:

sudo dnf config-manager --set-enabled powertools
Install EPEL and EPEL Next:

With PowerTools enabled, you can now incorporate the EPEL repositories for Rocky Linux 8. Execute the following command:

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

Verification of EPEL or EPEL Next Installation on Rocky Linux 9 or 8

Upon successfully integrating the EPEL repository into your Rocky Linux system, validating the installation is prudent. This ensures the repository has been correctly configured and ready for use. To achieve this, the dnf repolist command serves as an efficient tool.

Execute the following command:

dnf repolist | grep epel

Expected Output:

epel                    Extra Packages for Enterprise Linux 9 - x86_64
epel-next           Extra Packages for Enterprise Linux 9 - Next - x86_64

If the output matches the above, it confirms the successful integration of the EPEL repository into your system.

Understanding Basic EPEL Command Tips on Rocky Linux 9 or 8

Being adept with the EPEL or EPEL Next repository commands can significantly enhance your package management experience. Here are some foundational commands to get you started:

Searching for Specific Packages

If you’re unsure about the exact name of a package but have a general idea, you can use the dnf search command:

sudo dnf --enablerepo="epel" search keyword

Replace keyword with a term related to the package you’re looking for. This will return a list of packages that match or are related to the keyword.

Getting Detailed Information

To get detailed information about a specific package, including its description, version, and dependencies:

sudo dnf --enablerepo="epel" info package_name

Checking for Package Updates in EPEL

To see if there are updates available for packages you’ve installed from EPEL:

sudo dnf --enablerepo="epel" check-update

This will list all packages from EPEL that have updates available.

Removing a Package

If you’ve installed a package from EPEL and wish to remove it:

sudo dnf remove package_name

Replace package_name with the name of the package you want to uninstall.

Disabling EPEL Temporarily

There might be times when you want to install or update packages without considering the EPEL repository. To temporarily disable EPEL during a DNF operation:

sudo dnf --disablerepo="epel" command

Replace command with the DNF command you wish to execute.

Keeping EPEL Packages Updated

To ensure that all packages you’ve installed from EPEL are updated:

sudo dnf --enablerepo="epel" upgrade

This will upgrade all EPEL packages to their latest versions.

Conclusion

In conclusion, this guide has walked you through the steps of installing EPEL on Rocky Linux EL9 or EL8, ensuring you have access to a broader range of packages for your system. Remember, keeping your system updated is key for smooth integration. With EPEL now part of your setup, you’re all set to explore and install additional packages that enhance the functionality and efficiency of your Rocky Linux environment.

1 thought on “How to Install EPEL on Rocky Linux EL9 or EL8”

Leave a Comment


Your Mastodon Instance
Share to...