Home AlmaLinux How to Install Remi Repo in RHEL, CentOS, Rocky, & AlmaLinux

How to Install Remi Repo in RHEL, CentOS, Rocky, & AlmaLinux

RHEL Linux, Rocky Linux, AlmaLinux, and CentOS systems are all familiar with the YUM package manager, which is used to easily search, download, install, and delete various targeted software packages. Also, we need the YUM package manager for frequent system updates that lead to recent and better OS versions.

[ You might also like: How to Set Date, Time and Timezone in RHEL ]

On the other hand, the Remi repository is somewhat associated with the YUM repository’s attributes like it being free and stable. Remi repo is strongly allied to the provision of the latest PHP stack versions and other specific software packages for system users.

Why Consider Remi Repo?

Remi repo is ideal for the system user that still wants to prioritize the use of EPEL repo for fetching system packages but is facing issues trying to access packages not supported under EPEL.

This user, therefore, requires additional extensions to access such packages. Remi repo is an ideal candidate under this scenario since it is extremely safe and non-intrusive. Already existing or future EPEL packages and distributions will not in any way clash with it.

A fresh install of the listed operating systems are unlikely to host the needed number of Remi packages as those present either lack the latest features or are obsolete.

Installing and Enabling EPEL and Remi Repo in Linux

Before proceeding with this tutorial article, ensure that you are the root user of the Linux system you are using or that you have Sudoer privileges on that system.

Install EPEL Repo in Linux

The EPEL repository needs to be installed and enabled on your Linux system, before installing Remi Repo.

First, update your system.

$ sudo dnf update

Next, proceed to install the EPEL repo with the following command:

--------- RHEL 9, CentOS Stream 9, AlmaLinux 9 and Rocky Linux 9 ---------
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

--------- RHEL 8, CentOS Stream 8, AlmaLinux 8 and Rocky Linux 8 ---------
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

--------- RHEL 7 and CentOS 7 ---------
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install EPEL Repo in Linux
Install EPEL Repo in Linux

Run another system update to confirm that EPEL is installed and enabled.

$ sudo dnf update
Confirm EPEL Installation
Confirm EPEL Installation

Install Remi Repo in Linux

Once the EPEL repo is installed and enabled, now you need to install and enable the Remi repo on your Linux system.

--------- RHEL 9, CentOS Stream 9, AlmaLinux 9 and Rocky Linux 9 ---------
# dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

--------- RHEL 8, CentOS Stream 8, AlmaLinux 8 and Rocky Linux 8 ---------
# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

--------- RHEL 7 and CentOS 7 ---------
# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Install Remi Repo in Linux
Install Remi Repo in Linux

Run another system update to enable the Remi repo.

$ sudo dnf update
Confirm Remi Repo Installation
Confirm Remi Repo Installation

Checking EPEL and Remi Repositories

To check if EPEL and Remi repositories are enabled, execute the following command on your system terminal.

$ sudo yum repolist
List Yum Repositories
List Yum Repositories

List Remi Software Packages

Now that we have the Remi repository installed on your system, it’s time to learn some basics on how to put it to use. The first step is to list the installable packages under the repository.

$ sudo dnf --disablerepo="*" --enablerepo="remi" list available  
List Remi Repo Software Packages
List Remi Repo Software Packages

You can alternatively check the remi-safe repository for another list of available packages for your system.

$ sudo dnf --disablerepo="*" --enablerepo="remi-safe" list available  
List Remi Safe Packages
List Remi Safe Packages

Install Packages Using Remi Repository

To use remi and remi-safe repositories to install targeted packages like PHP modules, we first need to list them.

$ sudo dnf module list PHP
List PHP Module
List PHP Module

For demonstration, let us try and install PHP 8.1 packages.

$ sudo dnf module install php:remi-8.1
Install PHP 8 Packages
Install PHP 8 Packages

Remi repo saves you from having to find workarounds on installing system packages it already supports. There is a lot to harvest from its long list of available packages.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.