How to Install Remi RPM on Rocky Linux 10, 9 and 8

Last updated Friday, May 15, 2026 5:13 pm Joshua James 7 min read

Rocky Linux keeps web-stack packages conservative, which is exactly what many servers need until an application asks for a newer PHP branch, a current Redis server, or cache extensions that match a newer PHP stream. To install the Remi RPM repository on Rocky Linux, add EPEL plus the matching CRB or PowerTools dependency repository, then install Remi’s major-version release package for Rocky Linux 10, 9, or 8.

Remi’s repository is especially useful for PHP 8.5, 8.4, and 8.3 module streams, including extension packages such as php-pecl-redis6. Older streams still exist for migration work, but upstream PHP support has ended for several of them, so keep legacy branches temporary unless your application vendor requires them.

Install Remi RPM Repository on Rocky Linux

Update Rocky Linux Before Adding Remi RPM

Refresh package metadata and apply available updates before adding a third-party repository:

sudo dnf upgrade --refresh

Commands that start with sudo need an administrator account. DNF shows the package transaction before it changes the system, so review the update list before confirming the prompt.

Choose the Remi RPM Package for Rocky Linux

Remi publishes stable major-version release RPMs in its Enterprise Linux repository directory, so use the remi-release-10.rpm, remi-release-9.rpm, or remi-release-8.rpm permalink instead of hard-coding a minor-release file such as remi-release-9.7.rpm. The permalink follows the latest supported Remi release package for that Enterprise Linux branch.

Rocky Linux ReleaseDependency RepositoryEPEL Package SourceRemi Release RPM
Rocky Linux 10crbRocky Extrasremi-release-10.rpm
Rocky Linux 9crbRocky Extrasremi-release-9.rpm
Rocky Linux 8powertoolsRocky Extrasremi-release-8.rpm

Rocky Linux 10 still uses the DNF4 config-manager workflow for enabling repositories. Fedora DNF5 examples such as dnf config-manager setopt do not apply to Rocky Linux 10, 9, or 8.

Install EPEL and Remi RPM Automatically

Use version detection to enable the right dependency repository, install EPEL from Rocky Extras, and add the matching Remi release RPM:

source /etc/os-release
rocky_major="${VERSION_ID%%.*}"

case "$rocky_major" in
  10 | 9)
    dependency_repo=crb
    ;;
  8)
    dependency_repo=powertools
    ;;
  *)
    dependency_repo=
    echo "Unsupported Rocky Linux version: $VERSION_ID"
    ;;
esac

if [[ -n "$dependency_repo" ]]; then
  sudo dnf install -y dnf-plugins-core
  sudo dnf config-manager --set-enabled "$dependency_repo"
  sudo dnf install -y epel-release
  sudo dnf install -y "https://rpms.remirepo.net/enterprise/remi-release-${rocky_major}.rpm"
fi

The dnf-plugins-core package provides dnf config-manager, which toggles CRB or PowerTools. EPEL is required because some Remi packages depend on libraries outside the base Rocky repositories.

Verify Remi RPM Repository on Rocky Linux

Confirm that the Remi release package is installed and the normal Remi repositories are enabled:

rpm -q remi-release
dnf repolist --enabled | grep -E '^remi-(modular|safe)[[:space:]]'

Relevant output on Rocky Linux 10 includes:

remi-release-10.1-3.el10.remi.noarch
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

Inspect the repository files and branch-specific signing key file installed by remi-release:

source /etc/os-release
rocky_major="${VERSION_ID%%.*}"
rpm -ql remi-release | grep -E "/(RPM-GPG-KEY-remi\.el${rocky_major}|remi-(modular|safe)\.repo)$"

Relevant output on Rocky Linux 10 includes:

/etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el10
/etc/yum.repos.d/remi-modular.repo
/etc/yum.repos.d/remi-safe.repo

The exact Remi package version changes as Rocky minor releases move forward, but the enabled repositories should include remi-modular and remi-safe. Remi publishes signing-key fingerprints in its KEYS.txt file, which is useful when DNF prompts to import a Remi key during the first signed package transaction. If EPEL was not already configured, the EPEL setup guide for Rocky Linux explains the dependency repository relationship in more detail.

Enable Remi PHP Modules on Rocky Linux

List Available PHP Streams from Remi

List the PHP module streams after the Remi RPM repository is enabled:

dnf module list php

Relevant output on Rocky Linux 10 includes the Remi streams and the DNF modularity notice:

WARNING: modularity is deprecated, and functionality will be removed in a future release of DNF5.
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 modularity warning appears on Rocky Linux 10 because future DNF5 releases will remove DNF module support. Rocky Linux 10 currently uses DNF4 for this workflow, and the Remi module commands remain functional.

Choose a Remi PHP Version

Use a PHP branch that matches your application support matrix. Remi exposes older streams for migration, but new deployments should stay on a branch that PHP upstream still supports. PHP’s supported versions page is the source of truth for active and security-support windows.

PHP BranchRemi StreamSupport StatusBest Fit
PHP 8.5php:remi-8.5Active support until December 31, 2027; security support until December 31, 2029New projects that can target the latest stable PHP branch
PHP 8.4php:remi-8.4Active support until December 31, 2026; security support until December 31, 2028Production workloads that need a current branch with broad extension compatibility
PHP 8.3php:remi-8.3Security support until December 31, 2027Applications pinned to PHP 8.3 or frameworks that have not moved to newer branches
PHP 8.2php:remi-8.2Security support until December 31, 2026Short-term compatibility work while planning an upgrade

PHP 8.1 and older streams are visible in Remi, but upstream support has ended for those branches. Use them only when a legacy application forces the choice, then plan a migration to a maintained branch.

Enable PHP 8.5 from Remi RPM

Reset any previous PHP stream before enabling PHP 8.5 from Remi:

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

For another maintained branch, replace remi-8.5 with remi-8.4, remi-8.3, or remi-8.2. Enable only one PHP module stream at a time.

Check for the enabled marker beside the stream you selected:

dnf module list php | grep 'remi-8.5'

Relevant output includes:

php  remi-8.5 [e] common [d], devel, minimal PHP scripting language

Install PHP and PHP-FPM from Remi

Install the base PHP package, command-line tools, and PHP-FPM service from the enabled Remi stream:

sudo dnf install -y php php-cli php-fpm

Verify the installed PHP branch:

php --version

Example output from PHP 8.5 on Rocky Linux 10:

PHP 8.5.6 (cli) (built: May  5 2026 21:19:36) (NTS gcc x86_64)
Copyright (c) The PHP Group
Built by Remi's RPM repository <https://rpms.remirepo.net/> #StandWithUkraine
Zend Engine v4.5.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.6, Copyright (c), by Zend Technologies

If your web stack uses PHP-FPM, enable and start the service:

sudo systemctl enable --now php-fpm

Confirm the service is active:

systemctl is-active php-fpm
active

For full web-server pool configuration, socket handling, and extension choices, use the separate PHP installation guide for Rocky Linux as a baseline, then keep the Remi stream names when you need newer branches.

Install PHP Redis or Memcached Extensions from Remi

Reader searches often mix up the Redis server package with the PHP Redis extension. For Remi PHP streams, install the PHP extension as php-pecl-redis6, not php-redis:

sudo dnf install -y php-pecl-redis6
php -m | grep -i '^redis$'
redis

If your application uses Memcached through PHP, install the matching PECL extension:

sudo dnf install -y php-pecl-memcached
php -m | grep -i '^memcached$'

The server packages are separate from the PHP extensions. Install redis or memcached only when the Rocky Linux host also needs to run that cache service locally.

Use Redis and Memcached Streams from Remi RPM

Install Redis Server from Remi

Remi provides Redis module streams for Rocky Linux 8, 9, and 10. Check the available streams first:

dnf module list redis

Rocky Linux 10 currently exposes Redis 7.2, 8.0, 8.2, 8.4, and 8.6 streams through Remi. Enable the stream your application supports; this command set uses Redis 8.6:

On Rocky Linux 10, check for the default Valkey package before replacing it with Redis from Remi:

rpm -q valkey >/dev/null 2>&1 && echo "Valkey is installed" || echo "Valkey is not installed"

If Valkey is installed, back up its data and plan the migration before switching this host to Redis. Do not remove a live cache service just to test a Remi stream.

sudo dnf module reset redis -y
sudo dnf module enable redis:remi-8.6 -y
sudo dnf install -y redis

Verify the Redis client version:

redis-cli --version

The version string should begin with redis-cli 8.6 when you selected the Redis 8.6 stream. Start the service when this host will run Redis locally:

sudo systemctl enable --now redis
systemctl is-active redis
active

If you need the default Rocky Linux Redis or Valkey behavior instead of Remi’s Redis stream, the Redis guide for Rocky Linux covers the AppStream path and Rocky Linux 10 Valkey difference.

Install Memcached Server from Remi

Remi exposes a Memcached module stream on Rocky Linux 10 and 9. Current Remi metadata for Rocky Linux 8 does not expose a Memcached module, so keep the default Rocky package there unless you have a separate package source requirement.

dnf module list memcached

On Rocky Linux 10 or 9, enable the Remi stream and install Memcached:

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

Verify the installed version:

memcached -h | head -n 1

The output should begin with memcached followed by the installed version. Start the service when this host will run Memcached locally:

sudo systemctl enable --now memcached
systemctl is-active memcached
active

Update or Remove Remi RPM Repository

Update Packages from Remi

Remi packages update through normal DNF transactions alongside the rest of the system:

sudo dnf upgrade --refresh

DNF will show whether packages come from remi-modular or remi-safe before you confirm the transaction.

Remove Remi Packages and Module Streams

Remove only the packages you installed from Remi. This helper checks the PHP, Redis, and Memcached packages used earlier, then removes only the matching packages currently installed:

remi_examples=(php php-cli php-fpm php-common php-pecl-redis6 php-pecl-memcached redis memcached)
installed_packages=()

for package in "${remi_examples[@]}"; do
  if rpm -q "$package" >/dev/null 2>&1; then
    installed_packages+=("$package")
  fi
done

if ((${#installed_packages[@]})); then
  sudo dnf remove "${installed_packages[@]}"
else
  echo "No Remi example packages are installed"
fi

Reset any Remi module streams you enabled:

sudo dnf module reset php -y
sudo dnf module reset redis -y

If you enabled the Memcached module on Rocky Linux 10 or 9, reset it as well:

sudo dnf module reset memcached -y

After package removal, run DNF’s cleanup step interactively if you want to review unused dependencies:

sudo dnf autoremove

Remove the Remi Repository Package

Remove the repository configuration package after Remi packages and module streams are cleaned up:

sudo dnf remove remi-release

Verify that no Remi repository remains enabled:

dnf repolist --enabled | grep -E '^remi-' || echo "Remi repositories are not enabled"
Remi repositories are not enabled

Also confirm that the repository files were removed:

find /etc/yum.repos.d -maxdepth 1 -name 'remi*.repo' -print | grep . || echo "Remi repository files are removed"
Remi repository files are removed

Leave EPEL installed if other packages still use it. Remove epel-release only when you added it solely for Remi and no other EPEL packages remain on the system.

If you installed signed packages from Remi, DNF may leave Remi’s imported RPM signing key in the RPM database. Check for it after removing Remi packages:

rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE} %{SUMMARY}\n' | grep -i "Remi's RPM repository" || echo "Remi RPM key is not imported"

If a Remi key remains and you want a full trust cleanup, remove the exact gpg-pubkey-... package name printed by that command. Do not delete RPM keys by a broad pattern because other repositories may use different keys in the same RPM database.

Troubleshoot Remi RPM Repository Issues

Remi Repository Is Not Listed

If DNF cannot find Remi streams, first confirm the release package and enabled repositories:

rpm -q remi-release
dnf repolist --enabled | grep -E '^remi-(modular|safe)[[:space:]]'

If remi-release is missing, rerun the version-aware install block that installs remi-release-${rocky_major}.rpm. If the package exists but the repositories are disabled, enable them again:

sudo dnf config-manager --set-enabled remi-safe
sudo dnf config-manager --set-enabled remi-modular

CRB or PowerTools Is Not Enabled

Missing dependency errors often point back to CRB or PowerTools being disabled. Check the enabled repository list:

dnf repolist --enabled | grep -E '^(crb|powertools)[[:space:]]'

Enable the repository that matches your Rocky Linux version:

sudo dnf config-manager --set-enabled crb        # Rocky Linux 10 or 9
sudo dnf config-manager --set-enabled powertools # Rocky Linux 8

PHP Module Enable Fails Because Another Stream Is Active

DNF blocks module stream switches when another PHP stream is already enabled. The error can look like this:

It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch.

Check the active stream:

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

If you do not need the existing PHP packages, remove them, reset the stream, and enable the Remi branch you want:

sudo dnf remove php php-cli php-fpm php-common
sudo dnf module reset php -y
sudo dnf module enable php:remi-8.5 -y

DNF Cannot Find php-redis

The Remi PHP Redis extension package is named php-pecl-redis6. Install it after enabling the matching PHP module stream:

sudo dnf install -y php-pecl-redis6
php -m | grep -i '^redis$'
redis

Conclusion

Remi RPM is now available on Rocky Linux with the matching EPEL and CRB or PowerTools dependencies in place. PHP can run from Remi’s maintained streams, while Redis, Memcached, and PHP cache extensions are available when your application needs newer packages than AppStream provides. For broader repository maintenance, optimize DNF on Rocky Linux after your package sources are settled.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show more of our fresh Linux tutorials in Top Stories and From your sources when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: