Guides 11792 Published by

The guide explains how to add the Remi repository to a CentOS 9 Stream system so you can install newer PHP, MariaDB, and other packages that the base repositories do not provide yet. It begins with prerequisites—root or sudo access and a clean environment—then shows installing EPEL, downloading the signed remi-release‑9.rpm to populate /etc/yum.repos.d, resetting any existing PHP module, and enabling the desired Remi stream such as php:remi‑8.2. After confirming that the repository is listed as enabled with dnf repolist, cleaning the cache, and updating, the article lists common pitfalls like omitting EPEL or using legacy yum-config-manager commands that can cause module conflicts. Finally, it weighs the benefits of quick access to cutting‑edge software against potential compatibility issues, noting that hobby projects may stick with default repos while developers needing PHP 8.2 or newer MariaDB will find importing Remi a simple and reliable solution.



How to Import Remi Repository on CentOS 9 Stream

If you want newer PHP, MariaDB, or other packages that the base repositories lag behind on CentOS 9 Stream, you’ll need to add Remi’s repo first. This guide walks through the quick steps and why each one matters.

Prerequisites: Have a Clean System and Root Access

Before diving in, make sure you’re logged in as root or using sudo. I’ve seen users try to run dnf commands without proper permissions and end up with a half‑configured repo that just bounces errors back at them. Nothing beats a clean starting point.

Step 1: Install the EPEL Repository (It’s a Must)
dnf install -y epel-release

Why this matters? Remi relies on some of EPEL’s helper packages, such as `yum-utils`, to manage module streams. Skipping it will give you cryptic “no match for argument” messages later.

Step 2: Grab the Remi Repo RPM
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm

The URL points to a signed package that sets up all the repo files under `/etc/yum.repos.d/`. I’ve noticed people download the wrong release for RHEL or CentOS 8, which leads to an unusable `.repo` file. Make sure you’re using `remi-release-9.rpm`.

Step 3: Enable the Desired Module Stream

Remi ships multiple streams (e.g., PHP 7.4, 8.1, 8.2). If you want the latest stable PHP:

dnf module reset php -y && dnf module enable php:remi-8.2 -y

This clears any previous module selections that might conflict and explicitly tells DNF to pull PHP 8.2 from Remi. Skipping this step often results in the base repo’s PHP 7.4 sneaking back in.

Step 4: Verify the Repo is Active
dnf repolist all | grep remi

You should see entries like `remi-php82` marked as enabled. If you still see them disabled, double‑check `/etc/yum.repos.d/remi.repo` and look for `[remi]` or `[remi-php82]` lines that set `enabled=1`.

Step 5: Clean the Cache and Update
dnf clean all && dnf update -y

Cleaning removes any stale metadata that could cause DNF to think the Remi repo isn’t there. After this, your system’s package database knows about the newer versions.

Common Pitfalls & My Take on Them

* Leaving EPEL out – You’ll hit a wall when trying to enable modules; it throws “module not found” errors.

* Using `yum-config-manager` instead of `dnf config-manager` – The former is legacy and can get confused by the new repo file format on CentOS 9 Stream.

* Forgetting to reset the module – I’ve seen users try to enable a second PHP stream while the first one remains active, leading to broken binaries. Resetting wipes the slate clean.

Why Remi Is Worth It (And When It Might Not Be)

Remi gives you cutting‑edge software without waiting for the base repo’s slow update cycle. That said, it can bloat your repo list and occasionally bring in packages that depend on libraries no longer shipped with CentOS 9 Stream. If you’re running a mission‑critical server that needs stability, weigh the trade‑off between newer features and potential compatibility headaches.

If all this feels like overkill for a hobby machine, stick with the default repos. But if you need PHP 8.2 or the latest MariaDB to keep your stack fresh, importing Remi is a quick win—and it’s nothing more than a handful of commands that I’ve run dozens of times without issue.