Last Updated on 1 week by Sachin G

For anyone managing Red Hat Enterprise Linux (RHEL), CentOS Stream, or Fedora Workstation, working with the default package repositories can sometimes feel limiting, especially when trying to install updated versions of software like PHP or MySQL. That’s where third-party repositories like Remi come in. Learning how to install the Remi repository was one of the best decisions I made when managing LAMP stacks in production environments.

These steps walk you through installing the Remi repository on various versions of CentOS, RHEL, and Fedora. It explains its importance for accessing updated PHP and software stacks, and provides commands to install the appropriate RPM packages based on your OS version.

I’ve personally used the Remi repo for dozens of setups, particularly when I needed to install or upgrade to the latest PHP versions from Remi. It’s fast, reliable, and actively maintained by Remi Collet, a well-known contributor to the Fedora and PHP communities.

You can download Remi’s RPM repository for your different Operating systems from its official page Remi’s RPM repository. Remi repository is focused on the latest version of the PHP stack and other software for Fedora, CentOS, RHEL, and other Linux-based OS. Remi-safe repository on Enterprise Version of Linux 8,9, and 10 is enabled by default. You can also update your Fedora with remi repository enabled but you have to take some minor precautions before the update. You can also follow remirepo blog.

Prerequisites: EPEL and Remi Together

Before installing Remi, it’s important to know that EPEL is often required. If you’re wondering, do I need EPEL before installing Remi, the answer is yes—Remi depends on some packages from the Extra Packages for Enterprise Linux (EPEL) repository.

In almost every CentOS or RHEL server I’ve configured, I’ve always had to install Remi and EPEL repositories together. For example, on RHEL 9, here are the typical steps I use:

Below are steps to install the remi repo for different versions of CentOS / Fedora and RHEL.

Install Remi on RHEL 9 / CentOS 9

sudo dnf install epel-release
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

How to Enable Remi Repository

Once the Remi RPM is installed, you need to explicitly enable it. This was a point of confusion for me initially—I thought installation was enough, but repo enablement must be done manually.

To enable Remi repository on Fedora Linux, CentOS, or RHEL:

sudo dnf module enable php:remi-8.2

Alternatively, for RHEL and CentOS:

sudo dnf config-manager --set-enabled remi

This is how I’ve enabled PHP modules from Remi for production applications that needed performance features only available in newer PHP versions.

Install PHP 8 or MySQL from Remi

A common use case I’ve seen (and used myself) is how to install PHP 8 using Remi repo. Once the repo is enabled, installation is straightforward:

sudo dnf install php php-cli php-fpm

This fetches the latest PHP version configured via Remi. It’s also possible to install Remi repo for latest PHP and MySQL on RHEL using this same approach, just by targeting additional packages like php-mysqlnd or mysql-server.

Using Remi on Fedora

If you’re asking, can I use Remi on Fedora Linux?—yes, absolutely. The process is similar, and Fedora even ships some of the packages directly depending on the version. I’ve used it on Fedora Workstation with dnf without issues.

Here’s the command I typically run:

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

After installing, remember to enable the desired Remi repository using dnf config-manager

Checking and Disabling Remi Temporarily

To verify whether Remi is enabled, I use:

dnf repolist enabled | grep remi

This shows all active Remi modules and repositories. So if you’ve ever asked, how to check if Remi repo is enabled, this is the command I recommend.

And in situations where I needed to troubleshoot package conflicts or prevent Remi from overriding defaults,

Here I’ve learned how to disable Remi repository temporarily using:

sudo dnf config-manager --set-disabled remi

This lets you revert to default packages without uninstalling anything.