How to Install Remi RPM on CentOS Stream (10, 9)

The Remi repository delivers current PHP, Redis, and Memcached packages that the default CentOS Stream repositories do not provide. When your web application requires PHP 8.4 property hooks, the latest Redis data structures, or Memcached performance improvements, Remi’s packages fill the gap between what AppStream offers and what modern development demands.

This guide walks through adding the Remi repository to CentOS Stream, selecting and enabling PHP module streams, and optionally installing Redis or Memcached from Remi’s updated packages. After completing these steps, your system can access PHP versions ranging from legacy 7.4 support through the current 8.5 release, with consistent packaging quality across CentOS Stream 9 and 10.

This guide covers CentOS Stream 9 and CentOS Stream 10. Commands work identically on both versions unless noted otherwise. CentOS Stream 8 reached end-of-life in May 2024 and is no longer covered.

Refresh System Packages Before Adding Remi

Update your existing packages before adding new repositories. This step resolves potential dependency conflicts and ensures your base system packages match current repository metadata:

sudo dnf upgrade --refresh -y

The --refresh flag forces DNF to download fresh repository metadata, and -y confirms the transaction automatically.

Add the Remi Repository to CentOS Stream

Remi requires two prerequisite repositories: CRB (CodeReady Builder) for development libraries, and EPEL for additional dependency packages. CRB provides headers and development files that Remi’s compiled packages link against, while EPEL supplies supporting utilities not included in base CentOS Stream.

Install the DNF plugins package. On minimal CentOS Stream installations, the config-manager command may not exist without this package:

sudo dnf install -y dnf-plugins-core

Enable CRB and Install EPEL

Enable the CRB repository. Both CentOS Stream 9 and 10 use the crb repository name:

sudo dnf config-manager --set-enabled crb

This command produces no output on success. Verify CRB is active:

dnf repolist | grep crb
crb                 CentOS Stream 10 - CRB

On CentOS Stream 9, the output shows CentOS Stream 9 - CRB instead.

Install EPEL. Both CentOS Stream versions include epel-release in the extras repository:

sudo dnf install -y epel-release

Install the Remi Release Package

With prerequisites in place, add the Remi repository by installing the release package that matches your CentOS Stream version.

For CentOS Stream 10:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm

For CentOS Stream 9:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm

Verify the Remi repositories are now available:

dnf repolist | grep remi
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

The remi-modular repository provides PHP and other software as DNF module streams. The remi-safe repository contains packages that do not replace base system components.

Select and Enable a PHP Module Stream

View Available PHP Versions

With Remi enabled, list all PHP module streams to see which versions are available. DNF module streams let you switch between major PHP versions without package conflicts:

sudo dnf module list php

On CentOS Stream 10, this command displays:

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

CentOS Stream 9 shows similar output. In addition to Remi’s modules, AppStream provides PHP 8.1, 8.2, and 8.3 from the distribution directly.

CentOS Stream 10 displays a modularity deprecation notice during module operations. This warning indicates that DNF5 will eventually replace module streams. The warning does not affect current functionality, and module commands continue working normally with DNF4.

PHP Version Recommendations

Select a PHP version based on your application’s requirements and the support timeline you need:

PHP VersionStatusRecommended ForSecurity Support Ends
PHP 8.3Stable with mature ecosystemProduction workloads requiring wide compatibilityDecember 2027
PHP 8.4Current stable releaseNew projects using property hooks and recent featuresDecember 2028
PHP 8.5Newly released (Nov 2025)Development testing and early adoptersDecember 2029

For most production deployments, PHP 8.4 provides the best balance of new features and ecosystem maturity. PHP 8.5, while fully supported, is newly released and some libraries may not yet declare compatibility. PHP 8.3 remains the conservative choice for maximum third-party compatibility.

Enable Your Chosen PHP Version

Enable a specific Remi PHP stream using the dnf module enable command. This example enables PHP 8.4:

sudo dnf module enable php:remi-8.4 -y

Replace 8.4 with your preferred version (for example, 8.3 or 8.5).

DNF allows only one PHP module stream at a time. If you previously enabled a different PHP version, reset it first with sudo dnf module reset php -y, then enable the new version.

Confirm the module stream is enabled by checking for the [e] indicator:

sudo dnf module list php | grep remi-8.4
php  remi-8.4 [e] common [d], devel, minimal PHP scripting language

The [e] marker confirms the stream is active and ready for package installation.

Install PHP and Verify the Installation

Install PHP from the enabled module stream:

sudo dnf install -y php

Check the installed version to confirm Remi’s package was used:

php --version
PHP 8.4.17 (cli) (built: Jan 13 2026 17:17:10) (NTS gcc x86_64)
Copyright (c) The PHP Group
Built by Remi's RPM repository  #StandWithUkraine
Zend Engine v4.4.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.17, Copyright (c), by Zend Technologies

For web server integration, start PHP-FPM and configure it to launch automatically:

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 Thu 2026-01-16 08:00:00 UTC; 3s ago
   Main PID: 12345 (php-fpm)
      Tasks: 6 (limit: 23129)
     Memory: 18.0M
        CPU: 120ms
     CGroup: /system.slice/php-fpm.service
             ├─12345 "php-fpm: master process (/etc/php-fpm.conf)"
             └─12346 "php-fpm: pool www"

Optional: Install Redis and Memcached from Remi

Beyond PHP, Remi provides up-to-date versions of Redis and Memcached. These in-memory data stores accelerate web applications by caching database queries, storing session data, and reducing response times for frequently accessed content. Common use cases include WordPress object caching with W3 Total Cache, Laravel session and queue backends, and Magento full-page cache storage.

Install Memcached via Remi

List available Memcached module streams:

sudo dnf module list memcached
Remi's Modular repository for Enterprise Linux 10 - x86_64
Name      Stream Profiles   Summary
memcached remi   common [d] High Performance, Distributed Memory Object Cache

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Remi provides a single Memcached stream with the latest stable release. Enable it and install the package:

sudo dnf module enable memcached:remi -y
sudo dnf install -y memcached

Start Memcached and enable it on boot:

sudo systemctl enable --now memcached

Confirm the installed version:

memcached -h | head -1
memcached 1.6.40

Verify the service is running:

sudo systemctl status memcached --no-pager
● memcached.service - memcached daemon
     Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled)
     Active: active (running) since Thu 2026-01-16 08:15:00 UTC; 5s ago
   Main PID: 12567 (memcached)
      Tasks: 10 (limit: 23129)
     Memory: 1.5M
        CPU: 15ms
     CGroup: /system.slice/memcached.service
             └─12567 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024

Install Redis via Remi

List available Redis module streams to see the version options:

sudo dnf module list redis
Remi's Modular repository for Enterprise Linux 10 - x86_64
Name  Stream   Profiles   Summary
redis remi-7.2 common [d] Redis persistent key-value database
redis remi-8.0 common [d] Redis persistent key-value database
redis remi-8.2 common [d] Redis persistent key-value database
redis remi-8.4 common [d] Redis persistent key-value database

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Remi provides multiple Redis streams. Redis 7.2 is the current stable branch with long-term support, while 8.x streams include newer features. For production environments, 7.2 offers the most mature ecosystem:

sudo dnf module enable redis:remi-7.2 -y
sudo dnf install -y redis

Replace 7.2 with 8.0, 8.2, or 8.4 if you need newer Redis features for your application.

Verify the installed version:

redis-cli --version
redis-cli 7.2.12

Start Redis and configure it to launch on boot:

sudo systemctl enable --now redis

Check that Redis is running:

sudo systemctl status redis --no-pager
● redis.service - Redis persistent key-value database
     Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; preset: disabled)
     Active: active (running) since Thu 2026-01-16 08:20:00 UTC; 3s ago
   Main PID: 12789 (redis-server)
      Tasks: 5 (limit: 23129)
     Memory: 7.2M
        CPU: 50ms
     CGroup: /system.slice/redis.service
             └─12789 "/usr/bin/redis-server 127.0.0.1:6379"

For PHP extension installation and web server integration with Apache or Nginx, see the PHP setup guide for CentOS Stream.

Troubleshoot Remi Repository Issues

The following solutions address problems that commonly occur during Remi setup and PHP module management.

Module Stream Not Found

If DNF cannot find a requested PHP stream, verify the stream name matches exactly what Remi provides:

sudo dnf module list php

Remi streams use the remi- prefix. Enable remi-8.4, not just 8.4.

CRB Repository Missing

Some EPEL package installations fail when CRB is not enabled. Verify CRB status:

dnf repolist enabled | grep crb

If no output appears, enable CRB:

sudo dnf config-manager --set-enabled crb
crb                 CentOS Stream 10 - CRB

Remi Repositories Not Appearing

Confirm the Remi release package installed correctly:

dnf repolist | grep remi

If missing, reinstall the release package for your CentOS Stream version:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm

Replace 10 with 9 for CentOS Stream 9.

Cannot Switch PHP Module Streams

DNF blocks direct module stream switches to prevent broken dependencies. If you see 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 ' command.

Check which stream is currently enabled:

sudo dnf module list php | grep '\[e\]'

Reset the module, then enable the desired stream:

sudo dnf module reset php -y
sudo dnf module enable php:remi-8.4 -y

The same reset-then-enable pattern works for Redis and Memcached module conflicts.

Repository Download Failures

Connection errors during Remi or EPEL installation usually indicate URL issues or network problems. Verify your CentOS Stream version to ensure you are using the correct repository URL:

cat /etc/centos-release

Test repository connectivity:

curl -I https://rpms.remirepo.net/enterprise/remi-release-10.rpm

A successful response includes HTTP/2 200. If the connection fails, check firewall rules and DNS resolution.

Remove the Remi Repository

Removing EPEL may affect other packages on your system that depend on it. Before removing, check for EPEL dependencies with dnf repoquery --installed --repo=epel. If other packages rely on EPEL, remove only remi-release and keep EPEL installed.

To remove the Remi repository and revert to AppStream packages, first reset any enabled module streams. Reset all streams you enabled from Remi:

sudo dnf module reset php redis memcached -y

Remove the Remi release package. Optionally remove EPEL if no other packages depend on it:

sudo dnf remove remi-release epel-release -y

Clean up orphaned dependencies:

sudo dnf autoremove -y

If you installed PHP, Redis, or Memcached from Remi and want to remove them:

sudo dnf remove php php-cli php-fpm php-common redis memcached -y
sudo dnf autoremove -y

Verify the Remi repository is gone:

dnf repolist | grep remi

No output confirms you have removed the repository. Future PHP installations will use CentOS Stream’s default AppStream packages.

Conclusion

Your CentOS Stream system now has access to the Remi repository, providing PHP versions from 7.4 through 8.5 along with current Redis and Memcached packages. This setup lets you run legacy applications requiring older PHP while developing new projects on the latest language features. Keep your PHP installation current with sudo dnf upgrade --refresh, and confirm package sources with dnf info php to verify Remi is serving your PHP packages. For comprehensive PHP module installation and Apache or Nginx integration, see the CentOS Stream PHP configuration guide.

Leave a Comment

Let us know you are human: