Essential YUM Repositories for RHEL Based Linux

Share on Social Media

Explore essential YUM repositories for RHEL-based Linux, including EPEL, RPM Fusion, and Remi. Learn how to install, configure, and manage third-party repositories to access extra software, multimedia codecs, and hardware drivers while maintaining system stability and security. #centlinux #linux


Table of Contents


1. Introduction

Red Hat Enterprise Linux (RHEL) and its derivatives like CentOS, Rocky Linux, and AlmaLinux primarily rely on YUM and DNF package managers for installing and managing software. While the official repositories provide essential system packages, they often lack some popular applications, drivers, or the latest versions of certain software.

This is where third-party repositories come in! These external repositories offer a wider range of software, including multimedia codecs, proprietary drivers, and updated software versions, enhancing the overall functionality of an RHEL-based system.

However, before jumping into third-party repositories, it’s essential to understand the benefits, risks, and proper methods of enabling and managing them. In this guide, we’ll cover everything you need to know about using third-party repositories with YUM and DNF.

Essential Yum Repositories for RHEL based Linux
Essential Yum Repositories for RHEL based Linux

2. Understanding YUM and DNF in RHEL-Based Systems

What is YUM?

YUM (Yellowdog Updater, Modified) is a package manager traditionally used in RHEL-based distributions. It simplifies package installation, updates, and dependency resolution. YUM was the standard until RHEL 7, after which it was replaced by DNF.

What is DNF?

DNF (Dandified YUM) is an improved version of YUM introduced in RHEL 8 and later. It provides better performance, improved dependency resolution, and lower memory usage.

Differences Between YUM and DNF

FeatureYUMDNF
PerformanceSlowerFaster
Dependency ResolutionBasicAdvanced
Memory UsageHigherLower
Plugin SupportYesYes
Default inRHEL 7 and olderRHEL 8 and newer

Both YUM and DNF allow users to manage repositories, install software, and keep the system up to date.

Recommended Training: Linux Administration: The Complete Linux Bootcamp in 2025 from Andrei Dumitrescu, Crystal Mind Academy

3371848 9ea9 18

3. Why Use Third-Party Repositories?

Although RHEL-based distributions offer official repositories, they often lack:

  • Multimedia codecs (MP3, MP4, H.264, etc.)
  • GPU drivers (NVIDIA, AMD, Intel proprietary drivers)
  • The latest versions of PHP, MySQL, Python, and other software
  • Extra utilities and desktop applications

Third-party repositories fill this gap by offering:

Updated software versions
Additional tools and drivers
Support for non-free software (proprietary codecs, GPU drivers, etc.)

However, using third-party repositories should be done with caution to avoid stability issues.


4. Risks and Considerations of Third-Party Repositories

Before enabling an external repository, consider the following risks:

Security Risks

  • Unofficial repositories may contain malware or untrusted software.
  • Always verify the repository’s GPG key before installation.

Dependency Conflicts

  • Some repositories overwrite system libraries, leading to breakages.
  • Use priority settings to prevent conflicts.

Stability Issues

  • Some software may not be tested for RHEL-based distros, causing instability.
  • Enable third-party repositories only when necessary.

Read Also: How to Configure Automated Updates in Linux


Here are some of the most trusted third-party repositories:

RepositoryPurpose
EPEL (Extra Packages for Enterprise Linux)Additional software packages
RPM FusionMultimedia codecs, GPU drivers
RemiLatest PHP, MySQL
ElrepoHardware drivers, latest kernel
Nux DextopExtra multimedia support

Each of these repositories serves a specific purpose, which we will explore in detail.


6. How to Enable and Configure EPEL Repository

The EPEL (Extra Packages for Enterprise Linux) repository is one of the most essential third-party repositories for RHEL-based distros. It provides extra software packages not included in the official repositories.

How to Install EPEL on RHEL, CentOS, AlmaLinux, and Rocky Linux

Run the following command based on your OS version:

sudo dnf install epel-release -y

For older systems (CentOS 7, RHEL 7), use:

sudo yum install epel-release -y

Verify EPEL Installation

Check if EPEL is enabled:

dnf repolist | grep epel

You can now install software from EPEL, such as htop, neofetch, and ffmpeg.


7. Installing RPM Fusion for Multimedia and Proprietary Software

While EPEL provides additional software packages, it does not include proprietary software or restricted codecs. This is where RPM Fusion comes in. RPM Fusion offers both free and non-free software, including multimedia codecs, GPU drivers, and other essential applications.

How to Enable RPM Fusion on RHEL, AlmaLinux, and Rocky Linux

To enable both Free and Non-Free repositories, run:

sudo dnf install \
    https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm \
    https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y

For CentOS 7 or RHEL 7, use:

sudo yum install \
    https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm \
    https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm -y

Verify RPM Fusion Installation

Check if RPM Fusion is enabled:

dnf repolist | grep rpmfusion

Installing Multimedia Codecs and GPU Drivers

Once RPM Fusion is enabled, you can install:

  • Multimedia codecs: sudo dnf groupinstall "Multimedia" -y
  • NVIDIA drivers: sudo dnf install akmod-nvidia -y
  • Intel/AMD GPU drivers: sudo dnf install xorg-x11-drv-intel xorg-x11-drv-amdgpu -y

RPM Fusion is essential for users who require media playback, gaming, and hardware acceleration on RHEL-based systems.


8. Using Remi Repository for Latest PHP and MySQL Versions

The Remi repository is the go-to choice for developers looking for the latest PHP, MySQL, and MariaDB versions on RHEL-based distributions.

How to Enable Remi Repository

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-$(rpm -E %rhel).rpm

For CentOS 7 and RHEL 7:

sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Enabling Specific PHP Versions

By default, RHEL ships with older PHP versions. To enable a newer version from Remi, use:

sudo dnf module reset php
sudo dnf module enable php:remi-8.1 -y

Replace 8.1 with the desired version (e.g., 7.4, 8.0).

Installing Latest PHP and MySQL

After enabling Remi, install PHP and MySQL:

sudo dnf install php php-cli php-mysqlnd php-fpm php-json php-opcache -y
sudo dnf install mysql-server -y

Restart the services:

sudo systemctl enable --now php-fpm
sudo systemctl enable --now mysqld

The Remi repository is vital for web developers needing the latest software without waiting for RHEL’s default updates.


9. Elrepo: Installing Hardware Drivers and Kernel Modules

Elrepo specializes in providing hardware-related packages, including network drivers, storage drivers, and the latest Linux kernel versions.

How to Enable Elrepo on RHEL-Based Systems

sudo dnf install https://www.elrepo.org/elrepo-release-$(rpm -E %rhel).el$(rpm -E %rhel).elrepo.noarch.rpm -y

For CentOS 7 and RHEL 7:

sudo yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm -y

Installing the Latest Kernel from Elrepo

Elrepo provides two main kernel versions:

  • Long-Term (kernel-lt)
  • Mainline (kernel-ml)

To install the latest LTS kernel, run:

sudo dnf install kernel-lt -y

To install the latest Mainline kernel, run:

sudo dnf install kernel-ml -y

After installation, reboot and select the new kernel from the GRUB menu:

reboot

Verify the installed kernel:

uname -r

Elrepo is critical for users with newer hardware or those needing cutting-edge kernel features.

Read Also: How to remove Old Linux Kernels


10. Nux Dextop for Extra Multimedia Support

The Nux Dextop repository provides additional media players, codecs, and desktop utilities missing from RHEL’s default repositories.

Installing Nux Dextop Repository

For RHEL 7 and CentOS 7:

sudo yum install https://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm -y

Note: Nux Dextop is not available for RHEL 8+, but similar packages are in RPM Fusion.

Installing Multimedia Tools from Nux Dextop

Once enabled, you can install:

  • FFmpeg: sudo yum install ffmpeg -y
  • VLC Media Player: sudo yum install vlc -y
  • MPlayer and Codecs: sudo yum install mplayer mplayer-gui -y

Nux Dextop is perfect for users needing extended multimedia support on RHEL 7-based systems.


11. Manually Adding a Third-Party Repository

If a required repository is not available by default, you can add it manually by creating a .repo file.

Creating a Custom Repository File

Navigate to the repository directory:

sudo nano /etc/yum.repos.d/custom.repo

Add the following details:

[custom-repo] 
name=Custom Repository 
baseurl=http://example.com/repo/ 
enabled=1 
gpgcheck=1 
gpgkey=http://example.com/repo/RPM-GPG-KEY

Save and exit (CTRL+X, then Y and Enter).

Clear metadata and enable the repository:

sudo dnf clean all sudo dnf makecache

This method is useful when adding private repositories or corporate package sources.


12. Managing Repositories Using YUM and DNF

To list all enabled repositories:

dnf repolist

To disable a repository:

sudo dnf config-manager --set-disabled repository-name

To enable it again:

sudo dnf config-manager --set-enabled repository-name

Proper repository management ensures system stability and prevents package conflicts.


13. Troubleshooting Third-Party Repositories Issues

Using third-party repositories can sometimes lead to issues such as GPG key errors, dependency conflicts, or package mismatches. Here’s how to troubleshoot these problems effectively.

Fixing GPG Key Errors

If you get a GPG key error when installing packages, manually import the repository’s GPG key:

sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-<repository-name>

Alternatively, you can find the correct GPG key URL from the repository’s official website and import it:

sudo rpm --import https://example.com/repo/RPM-GPG-KEY

Resolving Dependency Issues

If installing a package results in dependency conflicts, try:

sudo dnf install --allowerasing <package-name>

This forces DNF to resolve dependency mismatches by replacing conflicting packages.

For YUM users:

sudo yum install --skip-broken <package-name>

If conflicts persist, check which repository provides the problematic package:

dnf repoquery --info <package-name>

Then, disable the conflicting repository and try again:

sudo dnf --disablerepo=conflicting-repo install <package-name>

Handling Repository Conflicts

If multiple repositories provide the same package, prioritize the preferred one by editing /etc/yum.repos.d/repository-name.repo:

priority=1

Alternatively, exclude a package from being installed by a specific repo:

sudo dnf config-manager --setopt=repository-name.exclude=package-name --save

Troubleshooting repository issues ensures smooth system operation and prevents unexpected breakages.


14. Best Practices for Using Third-Party Repositories

Using external repositories can enhance your system’s capabilities, but improper management can lead to security risks and system instability. Here are the best practices to follow.

Keep Your System Stable and Secure

  • Enable only necessary repositories – avoid installing too many.
  • Verify repository sources before enabling them.
  • Regularly update GPG keys to ensure authenticity.

Use Priority and Exclude Options

  • Assign priority values in .repo files to control package sources.
  • Use exclude directives to prevent conflicts between repositories.

Clean Up Unused Repositories

To remove an unwanted repository:

sudo dnf remove repository-package-name

Or manually delete its .repo file from /etc/yum.repos.d/.

Monitor Installed Packages from Third-Party Repositories

List all installed packages from a specific repository:

dnf list installed | grep repository-name

This helps identify which software comes from non-official sources.

Following these best practices ensures that your system remains secure, stable, and efficient.


15. Conclusion

Using third-party repositories in RHEL-based distributions expands software availability, providing latest applications, multimedia codecs, and proprietary drivers. However, it’s crucial to manage them properly to avoid security risks and dependency conflicts.

Key Takeaways

EPEL for extra open-source software
RPM Fusion for multimedia and proprietary drivers
Remi for latest PHP and MySQL versions
Elrepo for hardware drivers and new kernels
Nux Dextop for additional multimedia tools

By following best practices and troubleshooting tips, you can safely use third-party repositories while maintaining system stability and security.

From setting up scalable AWS solutions to managing complex Linux environments, I’ve got you covered. Visit my Fiverr profile to get started.


Frequently Asked Questions (FAQs)

1. Are third-party repositories safe to use?

Yes, but only if they come from trusted sources like EPEL, RPM Fusion, and Remi. Always verify the GPG key before enabling a repository.

2. Can I enable multiple third-party repositories at the same time?

Yes, but be cautious of package conflicts. If two repositories provide the same package, set priorities or exclude specific packages to avoid issues.

3. How do I remove a third-party repository?

You can remove a repository by deleting its .repo file from /etc/yum.repos.d/:

sudo rm -f /etc/yum.repos.d/repository-name.repo

Alternatively, if the repository was installed via RPM, remove it using:

sudo dnf remove repository-package-name

4. What should I do if a package from a third-party repository breaks my system?

Try rolling back to a previous version using:

sudo dnf downgrade package-name

If that doesn’t work, disable the problematic repository and reinstall the package from the official RHEL repositories.

5. Can I use YUM and DNF together?

On RHEL 8 and newer, YUM is a symlink to DNF, so both commands work similarly. However, on RHEL 7 and older, YUM is the preferred package manager.


Looking for something?

Leave a Reply