Are you looking to install Remi RPM on Rocky Linux to unlock the latest versions of PHP, Memcached, Redis, and more? Remi’s RPM repository is a must-have for anyone running web servers or enterprise applications on Rocky Linux, offering fast access to up-to-date software that the default repositories often lack.
By following this guide, you’ll learn how to quickly add and enable the Remi RPM repository on Rocky Linux 10, 9, or 8. This ensures your system stays secure, compatible, and high-performing, whether you’re a developer needing the newest PHP features or a sysadmin focused on stability and security.
Updating Rocky Linux Before Importing the Remi RPM
Before installing new packages, make sure your Rocky Linux system is up to date. Upgrading existing packages minimizes the risk of conflicts during installation. Next, run the following command to refresh your system:
sudo dnf upgrade --refresh -y
This command upgrades all installed packages to their latest available versions.
Import the Remi RPM Repository on Rocky Linux
Remi requires the Code Ready Builder (CRB) repository (PowerTools on Rocky Linux 8) and EPEL (Extra Packages for Enterprise Linux) as dependencies. CRB provides development tools and libraries, while EPEL supplies additional packages Remi needs to function.
Choose the appropriate commands for your Rocky Linux version (10, 9, or 8) below.
Install dnf-plugins-core so the dnf config-manager commands work on minimal Rocky Linux systems:
sudo dnf install -y dnf-plugins-core
Importing the Remi PHP Repository for Rocky Linux 10
Rocky Linux 10 targets EL10 compatibility. First, enable the Code Ready Builder (CRB) repository:
sudo dnf config-manager --set-enabled crb
Next, install EPEL:
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
Finally, install the Remi repository:
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm
Importing the Remi PHP Repository for Rocky Linux 9
Rocky Linux 9 targets RHEL 9 compatibility and requires both the EPEL release and EPEL Next release packages. First, enable the Code Ready Builder (CRB) repository:
sudo dnf config-manager --set-enabled crb
Next, install both EPEL release packages:
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel{,-next}-release-latest-9.noarch.rpm
Finally, install the Remi repository:
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
Importing the Remi PHP Repository for Rocky Linux 8
Rocky Linux 8 targets RHEL 8 compatibility and uses the PowerTools repository. First, enable the PowerTools repository:
sudo dnf config-manager --set-enabled powertools
If PowerTools is not recognized on your system, use the crb label instead:
sudo dnf config-manager --set-enabled crb
Next, install EPEL:
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Finally, install the Remi repository:
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Rocky Linux is an RHEL-compatible distribution and does not require subscription management. Rocky Linux 10 and 9 use the
crb(Code Ready Builder) repository, while Rocky Linux 8 usespowertools. Rocky Linux 9 requires bothepel-releaseandepel-next-releasepackages per EPEL 9 requirements, while versions 10 and 8 only require the singleepel-releasepackage.
Enable Remi PHP Modules
Listing Available PHP Modules
With Remi enabled, you can access multiple PHP versions through DNF modules. This is particularly essential for developers supporting legacy applications on older PHP versions or leveraging the latest PHP features.
To see all available PHP versions, run 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 Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
The output shows both the default Rocky Linux PHP modules and the additional versions available through Remi’s repository.
Choose Your PHP Version
| PHP Version | Primary Focus | Best For | Active Support Until |
|---|---|---|---|
| PHP 8.2 | Latest stable features and optimizations | New projects and actively maintained applications | December 2025 |
| PHP 8.3 | Cutting-edge features and performance improvements | Greenfield projects requiring the latest PHP capabilities | November 2026 |
| PHP 8.4 | Newest stable release with latest enhancements | Development environments and forward-looking production systems | November 2027 |
Enable your chosen PHP version. For example, to enable PHP 8.3:
sudo dnf module enable php:remi-8.3 -y
For other versions, replace 8.3 with 8.2 or 8.4 as needed.
Enable only one PHP module version at a time. If you have previously enabled a different PHP version, you must disable it first with
sudo dnf module disable php:remi-[old-version] -ybefore enabling a new version to avoid module conflicts.
Verify the PHP module is enabled:
sudo dnf module list php | grep remi
Install and Verify PHP
Install the enabled PHP version:
sudo dnf install -y php
Verify the installation succeeded:
php --version
Once verified, if you’re running a web server, start the PHP-FPM service and enable it to start on boot:
sudo systemctl enable --now php-fpm
Verify PHP-FPM is running:
sudo systemctl status php-fpm
Enable Redis and Memcached from Remi RPM
Beyond PHP, Remi provides up-to-date versions of Redis and Memcached, two critical caching tools that improve application performance. In many cases, these packages are newer than what’s available in the default Rocky Linux repositories.
Enable and Install Memcached via Remi RPM
Memcached is a high-performance, distributed memory caching system that speeds up dynamic web applications by reducing database load. To begin, check available Memcached versions in Remi:
sudo dnf module list memcached
Next, enable the Memcached module and install it:
sudo dnf module enable memcached:remi -y
sudo dnf install -y memcached
Then, start and enable Memcached:
sudo systemctl enable --now memcached
Verify Memcached is running:
sudo systemctl status memcached
Enable and Install Redis via Remi RPM
Redis is an open-source, in-memory data structure store used as a cache, database, and message broker. To begin, check which Redis versions are available in Remi:
sudo dnf module list redis
Next, enable your desired Redis version. For example, to enable Redis 7.0:
sudo dnf module enable redis:remi-7.0 -y
Then install and verify Redis:
sudo dnf install -y redis
redis-cli --version
Finally, start the Redis service and enable it to start on boot:
sudo systemctl enable --now redis
Verify Redis is running:
sudo systemctl status redis
For deeper configuration and usage guidance for these tools, see the dedicated guides on installing PHP on Rocky Linux.
Troubleshooting Common Issues
If you encounter issues while installing or enabling Remi repositories, here are solutions to common problems:
Module Not Found Error When Enabling PHP
This occurs when you try to enable a PHP version that Remi doesn’t provide. Verify available versions:
sudo dnf module list php
Check that the version you want exists in the Remi repository list. Only enable versions shown with the remi- prefix (for example, remi-8.3, not just 8.3).
CRB Repository Not Enabled
EPEL installation fails if CRB isn’t enabled first. Verify CRB status:
sudo dnf repolist enabled | grep crb
If no output appears, CRB is disabled. Enable it:
sudo dnf config-manager --set-enabled crb
Verify it’s enabled:
crb Rocky Linux 9 - CRB enabled
Remi Repository Not Recognized
After installing Remi RPM, verify it’s properly enabled:
sudo dnf repolist | grep remi
Expected output shows multiple Remi repositories:
remi Remi's RPM repository enabled remi-modular Remi's Modular repository enabled remi-safe Safe Remi's RPM repository enabled
If missing, reinstall the Remi release package that matches your Rocky Linux version (replace 9 with 10 or 8 as needed):
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
Module Enable Fails with Conflicting Versions
Attempting to enable a new PHP version while another is active produces this error:
Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch. It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can install the other stream.
Check which PHP module is currently enabled:
sudo dnf module list php | grep '\[e\]'
Disable the currently enabled version before enabling a new one:
sudo dnf module disable php:remi-8.2 -y
Then enable your desired version:
sudo dnf module enable php:remi-8.3 -y
Apply the same disable-then-enable approach if you encounter module conflicts when switching Redis or Memcached streams.
EPEL or Remi Repository Installation Fails
Download failures typically indicate URL mismatches or connectivity issues. Verify your Rocky Linux version:
cat /etc/rocky-release
Match the version number in the repository URL to your system version (8, 9, or 10). Test connectivity to the repository:
curl -I https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
A successful response shows HTTP/2 200. Network errors or 404 responses indicate URL problems or connectivity issues.
Conclusion
You now have access to the Remi RPM repository on Rocky Linux, unlocking multiple PHP versions (8.2, 8.3, 8.4), up-to-date Redis and Memcached packages, and other enterprise-grade tools. This setup lets developers support legacy applications while using modern PHP features and helps system administrators maintain current caching infrastructure for high-performance deployments. Remember to enable only one PHP module version at a time and verify installations with the --version checks shown above to ensure your system is ready for production workloads.