Last Updated on 4 weeks by Sachin G

Managing YUM repositories is essential for any Linux system administrator using CentOS, Red Hat Enterprise Linux (RHEL), Fedora, or Oracle Linux. This guide walks through how to configure YUM Repository, including Remi, IUS, and Oracle’s own YUM repos. These third-party and vendor-supported repositories are vital for accessing updated packages, especially for PHP, MySQL, NGINX, and developer tools.

Why Configure YUM Repository?

By default, your system uses a limited set of official Red Hat software sources or CentOS Stream repos. But what if you need newer versions of PHP, NGINX, or MariaDB?

This is where third-party YUM repositories like Remi, IUS, and EPEL come in. They extend your software catalog and give you access to community-supported or vendor-maintained packages that are often more current than official ones.

Prerequisites

Before adding repos:

  • Ensure your system is up-to-date
  • Have sudo/root privileges
  • Understand the RPM package manager and repo trust policies
sudo yum update -y

How to Add Additional YUM Repositories in CentOS and RHEL

The steps are nearly identical for CentOS 7/8, RHEL 7/8, and Oracle Linux. The Remi repository is a valuable resource for users of CentOS, Alma, and Rocky RPM-based Linux distributions, providing access to additional packages and updated versions of software.

Enable EPEL Repository (if not already enabled)

The Remi repository often depends on the EPEL repository. If you haven’t enabled it yet, you can do so by running the following command:

sudo yum install epel-release

Install & Configure Remi Repository Configuration Package

Download and install the Remi repository configuration package using the following commands:

yum install -y https://rpms.remirepo.net/enterprise/remi-release-$(rpm -E '%{rhel}').rpm 

yum-config-manager --enable remi-php82

This command fetches and installs the Remi repository configuration package suitable for your CentOS or Operating System version.

Once the package is installed, enable the Remi repository. You can do this by editing the repository configuration file /etc/yum.repos.d/remi.repo. In the [remi] section, change enabled=0 to enabled=1. Save and exit the editor.

Installing the YUM IUS Repository on CentOS/RHEL/Oracle :

The IUS (in line with Upstream Stable) repository provides updated versions of various software packages for CentOS, Red Hat, and Oracle Linux 7.

The below steps should work on any Linux RPM-based version 7 distribution like Oracle Linux, CentOs, Red Hat, etc.


# Install the EPEL repository (Extra Packages for Enterprise Linux)
sudo yum install epel-release

# Install the IUS repository package
sudo yum install https://repo.ius.io/ius-release-el7.rpm

# Enable the IUS repository
sudo yum-config-manager --enable ius

# Verify the installation
sudo yum list | grep ius

Note that commands may vary slightly depending on the specific version of the operating system.

Verify the Repository Configuration

 sudo yum repolist 

You can use– enabled or– disabled with the repo list command to check which repository is enabled or disabled.

Difference Between Remi and IUS Repo

FeatureRemi RepoIUS Repo
FocusPHP, MySQL, NGINXPython, Git, Redis
MaintainerRemi Collet (Fedora)Community + Rackspace
CompatibilityCentOS, RHELCentOS, RHEL
PHP VersionsMultiple (7.x to 8.x)Limited

Common Issues & Real-World Scenarios

  • GPG Key Import Errors: Always ensure the GPG key is available via gpgkey= in the repo config.
  • Repo Conflicts: Avoid enabling multiple repos with overlapping packages.
  • dnf vs yum: On Fedora and newer RHEL versions, dnf is the default package manager but supports yum commands as symlinks.

Once, I accidentally enabled two repos offering different versions of PHP. It broke my Laravel app until I fixed the priorities! Always check with yum repolist and set clear priorities.

FAQs

How do I add a third-party YUM repo?


Use yum install [repo-release-url].rpm or manually create .repo files in /etc/yum.repos.d/

What is the EPEL repository?

The EPEL repository (Extra Packages for Enterprise Linux) provides additional open-source packages for RHEL/CentOS.

Can I enable Remi and IUS at the same time?

Yes, but be cautious with overlapping packages. Use yum plugin priorities to avoid conflicts.

How do I list all enabled YUM repos?

Run: yum repolist or dnf repolist on newer systems.

What’s the safest way to configure repo file settings?

Always specify gpgcheck=1Provide a valid gpgkey=, and use priority values where needed.

Whether you’re a Linux admin deploying enterprise apps or a developer needing up-to-date tools, learning to configure YUM repository is a must-have skill.