How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

EPEL, which stands for Extra Packages for Enterprise Linux, is an open-source and free repository that provides extra packages for Enterprise Linux. The EPEL repository was created because Fedora contributors wanted to use Fedora packages they maintain on RHEL and other compatible distributions such as CentOS, Rocky Linux, AlmaLinux, to name a few.

The EPEL repository is also known for bringing additional packages and updated packages that may be behind in the core repository, along with dependencies required by other external repositories, for example, the Remi PHP repository.

In the following tutorial, you will learn how to install the EPEL repository and the EPEL Next repository, which is the next testing version that can come into use for newer packages when major upgrades occur to the core distribution on CentOS 9 Stream.

Advertisement

Prerequisites

Updating Operating System

Update your CentOS Stream operating system to make sure all existing packages are up to date:

sudo dnf upgrade --refresh -y

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:

sudo whoami

Example output showing sudo status:

[joshua@centos-stream ~]$ sudo whoami
root

To set up an existing or new sudo account, visit our tutorial on adding a User to Sudoers on CentOS Stream.

To use the root account, use the following command with the root password to log in.

su

The tutorial will be utilizing the terminal, and for those unfamiliar, this can be found in your show applications menu.

Example:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

Situational – Remove DNF Subscription Manager

Currently, CentOS Stream 9 DNF plugin manager can cause issues with the subscription manager. Long-term, this will be removed from future ISO’s as CentOS Stream is free for use, but you will need to remove it manually, or else you won’t proceed far with this tutorial.

Example error output:

[joshua@centos-stream ~]$ sudo dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

In your terminal, execute the following command.

sudo dnf erase subscription-manager -y

Example output:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

As mentioned above, all the subscription-based lockouts have been removed.

Advertisement

Install the EPEL or EPEL Next Repository

The first task is to install the EPEL repository. As explained, you can install two options; however, it is highly advised not to install EPEL Next unless you specifically require it for system stability.

In your terminal, execute the following command to begin the installation.

Install EPEL Repository 9 Series:

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

Example output:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

Type Y, then press the ENTER KEY to proceed with the installation.

For users wanting to install the EPEL Next repository, you need to have EPEL installed. Once done, use the following command.

Install EPEL Next Repository:

sudo dnf install epel-next-release

Example output:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

Type Y, then press the ENTER KEY to proceed with the installation.

Confirm the EPEL or EPEL Next Installation

Now that you have installed the EPEL repository, verifying the installation is a good idea. The easiest and quickest way is to use the dnf repolist command.

sudo dnf repolist | grep epel

Example output:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

As above, the repository is shown and successfully installed.

EPEL Repository Tips

One of the handy tricks when using EPEL or EPEL Next repository is to list the available packages.

sudo dnf --disablerepo="*" --enablerepo="epel" list available

Example output (Note Large Printout):

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

As above, you can further filter the list to find specific packages. The example will find phpMyAdmin.

EPEL Example:

sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep -i phpMyAdmin

EPEL Next Example:

sudo dnf --disablerepo="*" --enablerepo="epel-next" list available | grep -i phpMyAdmin

Example output:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

Now that you have found the EPEL containing the packages you want to install, use the following command to install them straight out of the EPEL repository.

Example (Replace with your package name):

sudo dnf --enablerepo="epel" install phpMyAdmin

Example output:

How to Install & Enable EPEL / EPEL Next Repository on CentOS 9 Stream

Alternatively, users with EPEL Next can use the following command if a newer package exists.

sudo dnf --enablerepo="epel-next" install phpMyAdmin

Note, you can often not use the –enablerepo and use the standard installation command. However, this doesn’t always work when multiple options are present.

How to Remove (Uninstall) EPEL or EPEL Next

Ideally, you should not need to remove the repository once installed. However, if you must remove it, use the following command.

To remove EPEL repository:

sudo dnf remove epel-release

To remove EPEL Next repository:

sudo dnf remove epel-next-release

Comments and Conclusion

In the tutorial, you have learned how to import the EPEL repository on CentOS 9 Stream, along with various options and tips in using EPEL to your advantage on your system.

Overall, EPEL is a well-known and highly used repository. You will likely need to install this on downstream versions of RHEL as it often contains essential packages every day, especially on servers.

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
adplus-dvertising
0
Would love your thoughts, please comment.x
()
x