Remi’s RPM repository is a free and stable RPM repository, maintained by Remi Collet, mainly for the PHP stack. It contains packages for the latest versions of PHP — far newer than the ones your distribution ships. It can be used on Fedora and on Enterprise Linux (RHEL, CentOS Stream, Alma Linux, Rocky Linux and other clones).
Read this first if you are on CentOS. CentOS Linux is end of life — CentOS 8 on 31 December 2021 and CentOS 7 on 30 June 2024 — and Remi has followed suit. In February 2026 the repositories for Enterprise Linux 7 and older were closed, and those for EL 6 and older were moved to the Remi archives. No new packages, no security updates. The original CentOS steps are still below, but on an EOL box a newer PHP is treating the symptom — see the migration path first.
You are on EOL CentOS: the migration path
If your server is CentOS 6, 7 or 8, no repository configuration will get you security updates again — the distro itself is dead. Move to a supported Enterprise Linux first, then come back and enable Remi on it:
- CentOS 8 → Rocky Linux 8: How to migrate from Centos 8 to Rocky Linux 8
- CentOS 8 → Alma Linux 8: How to convert Centos 8 Linux to Alma Linux 8
- CentOS 8 → CentOS Stream 8: How to convert from CentOS Linux 8 to CentOS Stream 8 — note Stream 8 itself ended on 31 May 2024, so treat this as a stepping stone, not a destination
- CentOS 6 or 7: there is no in-place conversion to a same-version clone, because there is no supported EL 6/7 left to convert to. Either rebuild on Alma Linux, Rocky Linux or RHEL 9/10, or do a leapp-based major upgrade with AlmaLinux ELevate
Once you are on a supported release, the EL 8/9/10 instructions below apply as written. For the same guide framed around the modern clones, checkout:
Prerequisites
To follow along this guide, ensure you have the following:
- An Enterprise Linux server (RHEL, CentOS Stream, Alma Linux or Rocky Linux 8/9/10) with root access or a user who can execute sudo commands
- Internet access
- Many packages in the Remi repository depend on EPEL, so enable it first. See How to Install and Enable EPEL Repo on Rocky Linux and Alma Linux 9, or install it directly:
sudo dnf install epel-release
- Some Remi packages also need the CodeReady Builder (CRB) repository, which provides build-time dependencies:
sudo crb enable
Enabling the remi repo
To enable the remi repo, install the rpm provided by remi at this url https://rpms.remirepo.net/enterprise/remi-release-<version>.rpm, version being the Enterprise Linux release version.
Example:
For RHEL 8/Alma Linux 8/Rocky Linux 8:
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
For RHEL 9/CentOS Stream 9/Alma Linux 9/Rocky Linux 9:
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
For RHEL 10/CentOS Stream 10/Alma Linux 10/Rocky Linux 10:
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-10.rpm
Use dnf install <url> rather than rpm -ivh <url> — dnf resolves dependencies and imports the GPG key for you, which bare rpm does not.
Legacy releases (EL 5, 6 and 7)
These are kept for readers maintaining old systems. They are no longer supported and you should not build anything new on them — if this is your server, take the migration path above.
The EL 5 and EL 6 release packages have been removed from the main repository — the URLs below now return 404 — and only exist under rpms.remirepo.net/archives/:
# Both of these now 404 — kept only to show what the old guides told you to run
sudo rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-5.rpm
sudo rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-6.rpm
The EL 7 release package still downloads, but the repository behind it was closed in February 2026 and receives no further updates:
sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Once the installation is done, confirm that the repo is enabled with this command:
$ sudo dnf repolist
repo id repo name
appstream Rocky Linux 9 - AppStream
baseos Rocky Linux 9 - BaseOS
cloud-kernel Rocky Linux 9 - Cloud Kernel
epel Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
extras Rocky Linux 9 - Extras
google-cloud-sdk Google Cloud SDK
google-compute-engine Google Compute Engine
remi-modular Remi's Modular repository for Enterprise Linux 9 - x86_64
remi-safe Safe Remi's RPM repository for Enterprise Linux 9 - x86_64
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:
$ sudo dnf module list php
Rocky Linux 9 - AppStream
Name Stream Profiles Summary
php 8.1 common [d], devel, minimal PHP scripting language
php 8.2 common [d], devel, minimal PHP scripting language
Remi's Modular repository for Enterprise Linux 9 - x86_64
Name Stream Profiles Summary
php remi-7.4 common [d], devel, minimal PHP scripting language
php remi-8.0 common [d], devel, minimal PHP scripting language
php remi-8.1 common [d], devel, minimal PHP scripting language
php remi-8.2 common [d], devel, minimal PHP scripting language
php remi-8.3 common [d], devel, minimal PHP scripting language
php remi-8.4 common [d], devel, minimal PHP scripting language
php remi-8.5 common [d], devel, minimal PHP scripting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
The streams you actually want today are remi-8.4 (active support until December 2026) or remi-8.5 (active support until December 2027). Everything at 8.1 and below is end of life and gets no security fixes — do not stand up a new server on remi-7.4 or remi-8.0 just because an old tutorial says so.
If you want to install PHP 8.4 for instance, reset the module first so the distro’s default stream doesn’t conflict, then enable the Remi stream:
sudo dnf module reset php
sudo dnf module enable php:remi-8.4
On systems with dnf4 you can collapse both steps into one:
sudo dnf module switch-to php:remi-8.4/common
You can then install it with the dnf install command:
sudo dnf install php php-cli
To search all packages, use this command:
sudo dnf search php
On EL 10,
dnf moduleprints a deprecation warning: modularity is being phased out and dnf5 only partially supports it. The module streams above still work there today, but for anything long-lived prefer the Software Collection below, and check the Remi configuration wizard for the current recommendation for your release.
Installing PHP as a Software Collection
Module streams replace the system PHP, so you only get one version at a time. If you need a specific PHP version alongside the one your distro ships — handy when you are migrating an app one version at a time — install it as a Software Collection instead. The packages are versioned (php84-*, php85-*) and live under /opt/remi:
sudo dnf install php85
Run it without touching the system php:
scl enable php85 'php -v'
Or call the binary directly, which is what you would point a web server or systemd unit at:
/opt/remi/php85/root/usr/bin/php -v