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
Run another system update to confirm that EPEL is installed and enabled.
$ sudo dnf update
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
Run another system update to enable the Remi repo.
$ sudo dnf update
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 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
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
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
For demonstration, let us try and install PHP 8.1 packages.
$ sudo dnf module install php:remi-8.1
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.