Enable and Use Remi Repository on RHEL 10 | CentOS 10

Enable Remi repository RHEL 10

Learn to enable and use the Remi repository on RHEL 10 / CentOS 10 for installing modern PHP, MariaDB, and LAMP‑stack components safely and selectively.

Table of Contents

🔈Introduction

The Remi repository offers up-to-date versions of popular server-side software—such as PHP, MySQL, and MariaDB—not typically included in the default Enterprise Linux distributions. Combining Remi with EPEL and the CodeReady Builder (CRB) repository lets you access cutting-edge packages while maintaining system stability on RHEL 10 or CentOS 10.

In this guide, you’ll find:

  • Step-by-step CLI instructions for enabling Remi
  • Configurable installation options for PHP and LAMP stack components
  • Comparison tables for different workflow methods
  • Best practices and troubleshooting advice

Let’s dive in.


✅ Why Use Remi?

Remi provides:

BenefitDescription
Latest BuildsAccess to modern PHP, MySQL, and MariaDB versions
Software CollectionsMaintain multiple versions side-by-side
Selective EnablingEnable the repo only when needed to avoid conflicts
Wide CoverageSupports Enterprise Linux 10 (RHEL, CentOS Stream, etc.)

✅ Prerequisites: Enable EPEL & CRB

Before enabling Remi, ensure two vital repositories are active:

				
					# 1. EPEL (Extra Packages for Enterprise Linux)
sudo dnf install -y epel-release

# 2. Enable CodeReady Builder (CRB) for RHEL systems
sudo subscription-manager repos --enable codeready-builder-for-rhel-10-$(uname -m)-rpms
				
			

These are required because Remi’s packages often depend on components within EPEL and CRB.


▶️ Step‑by‑Step: Enable Remi Repository

🔄 Option 1: Install Remi for RHEL 10 / CentOS 10

				
					# 1. Install Remi repository
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm

# 2. Optional: Clean cache
sudo dnf clean all && sudo dnf makecache
				
			

🔄 Option 2: Temporarily Enable Remi for Specific Packages

				
					# Install a specific package using Remi without enabling it permanently
sudo dnf --enablerepo=remi install <package-name>
				
			

🔄 Option 3: Permanently Enable Remi

Edit /etc/yum.repos.d/remi.repo:

				
					[remi]
enabled=1

[remi-safe]
enabled=1  # if needed
				
			

Then run:

				
					sudo dnf repolist
				
			

This shows active Remi repositories alongside base repos.


📁 Available Remi Repositories for Enterprise Linux 10

  • remi: Standard repository
  • remi-safe: Additional or legacy-compatible packages (including software collections)
  • remi-modular: Modular repository containing specific PHP/MariaDB/Redis versions

▶️ Installing PHP via Remi

🖥️ Example: Switch to Remi PHP 8.3

				
					sudo dnf module reset php
sudo dnf module enable php:remi-8.3/common
sudo dnf install -y php php-cli php-fpm php-mysqlnd
				
			

🖥️ Example: Install PHP 8.4 as Software Collection

				
					sudo dnf install -y php84-php php84-php-fpm php84-php-mbstring
				
			

These commands leverage Remi’s modular structure to safely manage parallel versions.


▶️ Installing LAMP Stack Components

				
					# Enable Remi temporarily for installation
sudo dnf --enablerepo=remi install httpd mariadb-server php

# Start services
sudo systemctl enable --now httpd
sudo systemctl enable --now mariadb
				
			

📊 Comparison Table: Repo Strategies

StrategyProsCons
Temporary enable (--enablerepo)Avoids overrides, safeMore typing, manual each time
Permanent enable (enabled=1)Convenient for frequent useRisk of accidental system-wide overrides
Using modules (php:remi-8.3)Enables version control, stableRequires familiarity with modular workflows

🧰 Troubleshooting Tips

🔧 Metadata or GPG issues?

				
					sudo dnf clean all && sudo dnf makecache
				
			

🔧 Dependency conflicts?

				
					sudo dnf --disablerepo="*" --enablerepo=remi install <package>
				
			

🔧 Module version misalignment?

				
					sudo dnf module reset php
sudo dnf module list php
				
			

🏁 Conclusion

The Remi repository is an invaluable resource for developers and system administrators on RHEL 10 or CentOS 10 wanting access to modern PHP, MySQL/MariaDB, and related packages. By carefully pairing Remi with EPEL and CRB—and leveraging modular workflows—you can keep your system current without sacrificing stability.

This guide walked you through:

  • Enabling prerequisite repositories
  • Installing and managing Remi
  • Setting up PHP via modular streams
  • Building a LAMP stack with Remi’s latest packages
  • Troubleshooting common issues

Use Remi with intentionality—enabling only what’s needed—to enhance your enterprise Linux environment safely and effectively.

Did you find this article helpful? Your feedback is invaluable to us! Feel free to share this post with those who may benefit, and let us know your thoughts in the comments section below.


👉 Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *