Remi’s RPM repository is a free and stable YUM repository mainly for the PHP stack. It contains packages for the latest versions of PHP. The Remi repository can be used on on Fedora and Enterprise Linux (RHEL / Alma / Rocky and other clones).
Prerequisites
To follow along this guide, ensure you have the following:
- A RHEL Based Server with root access or a user who can execute sudo commands
- Internet access
- Some packages in the Remi Repository depends on
epel-release
so if you don’t have install it with
|
|
For older versions of RHEL/Centos, checkout:
Enabling the remi repo
To enable the remi repo, Install the rpm
provided by remi in this url http://rpms.remirepo.net/enterprise/remi-release-<version>.rpm
, version being the RHEL Release version.
Example:
For RHEL / Alma / Rocky Linux 8:
|
|
Or you can use this
|
|
For RHEL / Alma / Rocky Linux 9:
|
|
Or you can use this
|
|
Once the installation is done, confirm that the repo is enabled with this command:
|
|
If you see remi in the list then it means its been installed.
Installing packages from Remi repository
To use packages from the remi repository, you need to enable them. Lets list modules providing php using this command:
|
|
If you want to install php 8.2 for instance, enable it with this command:
|
|
You can then install it with the dnf install command:
|
|
To search all packages, use this command:
|
|
That is it!
We managed to enable and set up REMI release on RHEL 8 and 9 and its derivatives.