The Remi RPM repository provides up-to-date versions of PHP, Redis, Memcached, and other web server components that Rocky Linux default repositories typically lag behind. Whether you need the latest PHP 8.5 features for a new project, PHP 8.4 for production stability, or an older version for legacy application compatibility, Remi delivers these packages with consistent quality across Rocky Linux 8, 9, and 10.
By following this guide, you will add the Remi RPM repository to your Rocky Linux system, enable PHP module streams, and optionally install updated Redis or Memcached packages. This setup ensures your web applications have access to current PHP releases with security patches, new language features, and performance improvements that the default AppStream modules may not yet include.
Updating Rocky Linux Before Importing the Remi RPM
Before adding third-party repositories, update your existing packages to minimize potential conflicts during installation. Run the following command to refresh your system:
sudo dnf upgrade --refresh -y
This command upgrades all installed packages to their latest available versions and refreshes the repository metadata cache.
Import the Remi RPM Repository on Rocky Linux
Remi depends on the Code Ready Builder (CRB) repository and EPEL (Extra Packages for Enterprise Linux) as prerequisites. CRB provides development tools and libraries that Remi packages require for compilation and linking, while EPEL supplies additional dependency packages not available in the base repositories.
Choose the appropriate commands for your Rocky Linux version below. Rocky Linux 10 and 9 use the crb repository name, while Rocky Linux 8 uses powertools.
First, install dnf-plugins-core to ensure the dnf config-manager commands work correctly on minimal Rocky Linux installations:
sudo dnf install -y dnf-plugins-core
Importing the Remi PHP Repository for Rocky Linux 10
Rocky Linux 10 targets EL10 compatibility and uses the CRB repository for development dependencies. First, enable the Code Ready Builder repository:
sudo dnf config-manager --set-enabled crb
Next, install EPEL from the extras repository:
sudo dnf install -y epel-release
Finally, install the Remi repository package:
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. Like version 10, it uses the CRB repository. First, enable the Code Ready Builder repository:
sudo dnf config-manager --set-enabled crb
Next, install EPEL from the extras repository:
sudo dnf install -y epel-release
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 instead of CRB. First, enable the PowerTools repository:
sudo dnf config-manager --set-enabled powertools
If your system does not recognize the powertools repository, some Rocky 8 installations 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 10 and 9 use the
crb(Code Ready Builder) repository, while Rocky Linux 8 usespowertools. For Rocky 9 and 10,epel-releaseis available directly from the extras repository, so a simplednf install epel-releaseworks. Rocky 8 requires the direct RPM URL shown above.
Enable Remi PHP Modules
Listing Available PHP Modules
With Remi enabled, you can access multiple PHP versions through DNF module streams. This is particularly useful for developers supporting legacy applications on older PHP versions or leveraging the latest PHP features in new projects. To see all available PHP versions, run:
sudo dnf module list php
On Rocky Linux 10, this command produces output similar to:
Remi's Modular repository for Enterprise Linux 10 - 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 output shows all available PHP versions from Remi’s repository. Rocky Linux 9 also includes PHP 8.1, 8.2, and 8.3 in its default AppStream repository, giving you the choice between distribution-tested packages and Remi’s latest releases.
Rocky Linux 10 displays a modularity deprecation warning during module operations. This warning indicates that DNF modularity will be removed in a future DNF5 release. The warning does not affect current functionality, and module commands continue to work normally on Rocky Linux 10 with DNF4.
Choose Your PHP Version
Select a PHP version based on your application requirements and the level of support you need. The following table summarizes the currently supported versions:
| PHP Version | Primary Focus | Best For | Security Support Until |
|---|---|---|---|
| PHP 8.3 | Stable production release with mature tooling | Production applications requiring proven stability | December 2027 |
| PHP 8.4 | Current stable with latest features | New projects and applications ready for recent enhancements | December 2028 |
| PHP 8.5 | Latest release with newest language features | Development environments and forward-looking projects | December 2029 |
Enable your chosen PHP version using the appropriate module stream. For example, to enable PHP 8.5 from Remi:
sudo dnf module enable php:remi-8.5 -y
For other versions, replace 8.5 with your desired version number (for example, 8.4 or 8.3).
Enable only one PHP module version at a time. If you have previously enabled a different PHP version, you must reset or disable it first with
sudo dnf module reset php -ybefore enabling a new version to avoid module conflicts.
Verify the PHP module is enabled by checking for the [e] indicator:
sudo dnf module list php | grep remi-8.5
php remi-8.5 [e] common [d], devel, minimal PHP scripting language
The [e] marker confirms you have enabled the module stream and it is ready for package installation.
Install and Verify PHP
With the module enabled, install PHP:
sudo dnf install -y php
After installation completes, verify the installed version:
php --version
PHP 8.5.0 (cli) (built: Jan 2 2026 10:15:30) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.5.0, Copyright (c) Zend Technologies
The version output confirms that PHP installed correctly from the Remi repository. If you are running a web server, start the PHP-FPM service and enable it to launch automatically on boot:
sudo systemctl enable --now php-fpm
Verify PHP-FPM is running:
sudo systemctl status php-fpm --no-pager
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; preset: disabled)
Active: active (running) since Mon 2026-01-06 08:15:00 UTC; 5s ago
Main PID: 12345 (php-fpm)
Tasks: 6 (limit: 23129)
Memory: 18.2M
CPU: 125ms
CGroup: /system.slice/php-fpm.service
├─12345 "php-fpm: master process (/etc/php-fpm.conf)"
└─12346 "php-fpm: pool www"
Enable Redis and Memcached from Remi RPM
Beyond PHP, Remi provides current versions of Redis and Memcached. These in-memory caching systems improve application performance by reducing database load and speeding up data retrieval. In many cases, Remi’s packages are more recent than the default Rocky Linux repository versions.
Enable and Install Memcached via Remi RPM
Memcached is a high-performance, distributed memory caching system commonly used to reduce database queries in dynamic web applications. First, check available Memcached versions in Remi:
sudo dnf module list memcached
Enable the Memcached module from Remi and install it:
sudo dnf module enable memcached:remi -y
sudo dnf install -y memcached
Start and enable Memcached to launch on boot:
sudo systemctl enable --now memcached
Verify Memcached is running:
sudo systemctl status memcached --no-pager
To confirm the installed Memcached version:
memcached -h | head -1
memcached 1.6.32
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. First, check available Redis versions in Remi:
sudo dnf module list redis
On Rocky Linux 10, Remi provides Redis 7.2, 8.0, 8.2, and 8.4 streams. Enable your desired Redis version. For the latest stable release:
sudo dnf module enable redis:remi-7.2 -y
Then install Redis:
sudo dnf install -y redis
Verify the installed version:
redis-cli --version
redis-cli 7.2.7
Start the Redis service and enable it to launch on boot:
sudo systemctl enable --now redis
Verify Redis is running:
sudo systemctl status redis --no-pager
For deeper PHP configuration and web server integration guidance, see the dedicated guide on installing PHP on Rocky Linux.
Troubleshooting Common Issues
If you encounter issues while installing or enabling Remi repositories, the following solutions address common problems:
Module Not Found Error When Enabling PHP
This error occurs when you attempt to enable a PHP version that Remi does not provide or that is misspelled. Verify the available versions:
sudo dnf module list php
Check that the version you want appears in the Remi repository section with the remi- prefix. For example, use remi-8.5 rather than just 8.5.
CRB Repository Not Enabled
EPEL package installation may fail if CRB (or PowerTools on Rocky 8) is not enabled. Verify CRB status:
sudo dnf repolist enabled | grep -E 'crb|powertools'
If no output appears, you have not enabled the repository. Enable it with the appropriate command for your version:
sudo dnf config-manager --set-enabled crb
Verify it is now enabled:
crb Rocky Linux 10 - CRB enabled
Remi Repository Not Recognized
After installing the Remi RPM, verify that you have enabled the repositories correctly:
sudo dnf repolist | grep remi
Expected output shows the active Remi repositories:
remi-modular Remi's Modular repository for Enterprise Linux 10 - x86_64 remi-safe Safe Remi's RPM repository for Enterprise Linux 10 - x86_64
If missing, reinstall the Remi release package that matches your Rocky Linux version (replace 10 with 9 or 8 as needed):
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm
Module Enable Fails with Conflicting Versions
Attempting to enable a new PHP version while another is active produces an error about module stream switching:
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\]'
Reset the PHP module before enabling a different version:
sudo dnf module reset php -y
Then enable your desired version:
sudo dnf module enable php:remi-8.5 -y
Apply the same reset-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
Ensure the version number in the repository URL matches your system (8, 9, or 10). Test connectivity to the repository:
curl -I https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
A successful response shows HTTP/2 200. Network errors or 404 responses indicate URL problems, firewall restrictions, or connectivity issues.
Remove Remi RPM Repository from Rocky Linux
If you no longer need the Remi repository, you can remove it along with any packages installed from it. First, disable and reset any enabled PHP modules:
sudo dnf module reset php -y
Remove the Remi release package. You can also remove EPEL if no other packages require it:
sudo dnf remove remi-release epel-release -y
Clean up any orphaned dependencies that DNF installed automatically:
sudo dnf autoremove -y
If you installed PHP, Redis, or Memcached from Remi and want to remove them completely:
sudo dnf remove php php-cli php-fpm php-common redis memcached -y
sudo dnf autoremove -y
Verify the Remi repository is no longer listed:
sudo dnf repolist | grep remi
No output confirms you have removed the repository. After removal, your system will use the default Rocky Linux AppStream PHP packages for future installations.
Conclusion
You now have access to the Remi RPM repository on Rocky Linux, providing multiple PHP versions including PHP 8.3, 8.4, and 8.5, along with current Redis and Memcached packages. This setup allows developers to 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 confirm your system is ready for production workloads.