LinuxRHEL Based

How To Install REMI Repository on CentOS, Rocky Linux and AlmaLinux

Install REMI Repository on CentOS, Rocky Linux and AlmaLinux

In the world of Linux distributions, CentOS, Rocky Linux, and AlmaLinux have emerged as popular choices for enterprise-level systems. These operating systems provide stability and security, but they often lack the latest software versions. This is where third-party repositories like REMI come into play, offering users access to up-to-date software packages while maintaining system integrity.

The REMI repository, short for “RPM Enterprise Multimedia Install,” is a valuable resource for system administrators and developers who need to keep their software current without compromising system stability. This comprehensive guide will walk you through the process of installing the REMI repository on CentOS, Rocky Linux, and AlmaLinux, ensuring you have access to the latest software packages for your system.

Understanding REMI Repository

Before diving into the installation process, it’s crucial to understand what the REMI repository is and why it’s beneficial for your Linux system. REMI is a third-party repository maintained by Remi Collet, a respected member of the Fedora community. It provides up-to-date versions of various software packages, including PHP, MySQL, and other web development tools.

Key features and benefits of using the REMI repository include:

  • Access to the latest stable versions of popular software
  • Regular updates and security patches
  • Compatibility with Enterprise Linux distributions
  • Easy integration with existing package management systems

The REMI repository offers a wide range of software packages, including but not limited to:

  • PHP (multiple versions)
  • MySQL and MariaDB
  • Redis
  • Nginx
  • Various PHP extensions and libraries

Prerequisites

Before proceeding with the installation of the REMI repository, ensure that your system meets the following requirements:

  • A fresh installation of CentOS 8/9, Rocky Linux 8/9, or AlmaLinux 8/9
  • SSH access to your server
  • Root access or a non-root user with sudo privileges
  • A stable internet connection

It’s important to note that while these instructions are tailored for CentOS, Rocky Linux, and AlmaLinux, the process is similar for other Enterprise Linux distributions. However, always refer to the official documentation for your specific distribution to ensure compatibility.

Step-by-Step Installation Guide

Now that we understand the importance of the REMI repository and have ensured our system meets the prerequisites, let’s proceed with the installation process. Follow these steps carefully to successfully install and configure the REMI repository on your system.

Updating the System

Before installing any new software or repository, it’s crucial to ensure your system is up-to-date. This helps prevent conflicts and ensures a smooth installation process. Open your terminal and run the following commands:

sudo dnf update -y
sudo dnf install dnf-utils -y

The first command updates all installed packages to their latest versions, while the second installs the DNF utilities package, which provides additional functionality for managing repositories.

Installing EPEL Release

The Extra Packages for Enterprise Linux (EPEL) repository is a prerequisite for installing the REMI repository. EPEL provides additional packages that are not included in the standard Enterprise Linux repositories. To install EPEL, run the following command:

sudo dnf install epel-release -y

This command will download and install the EPEL release package, which adds the EPEL repository to your system’s package manager.

Installing REMI Repository

With EPEL installed, we can now proceed to install the REMI repository. The installation process varies slightly depending on your specific Enterprise Linux version. Here are the commands for different versions:

For CentOS 8, Rocky Linux 8, or AlmaLinux 8:

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

For CentOS 9, Rocky Linux 9, or AlmaLinux 9:

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

These commands will download and install the appropriate REMI release package for your system version.

After the installation is complete, verify that the REMI repository has been successfully added by running:

sudo dnf repolist

You should see “remi” listed among the enabled repositories.

Enabling REMI Repository for Specific Packages

By default, the REMI repository is not enabled for all packages. This is to prevent conflicts with the base system packages. To use REMI for specific software, you’ll need to enable the appropriate module. For example, to enable PHP 8.0, you would use the following command:

sudo dnf module enable php:remi-8.0 -y

This command enables the PHP 8.0 module from the REMI repository. You can replace “8.0” with other versions like “8.1” or “8.2” depending on your requirements.

For other software packages, you may need to enable different modules. Always refer to the official REMI documentation for the most up-to-date information on available modules and their activation commands.

Installing Software Packages from REMI

Now that the REMI repository is installed and enabled for specific modules, you can start installing software packages. Here’s how to search for and install packages from the REMI repository:

To search for available packages:

sudo dnf --enablerepo=remi search <keyword>

Replace <keyword> with the name of the software you’re looking for. For example, to search for PHP-related packages:

sudo dnf --enablerepo=remi search php

To install a specific package, use the following command:

sudo dnf --enablerepo=remi install <package-name>

For example, to install PHP 8.2 and PHP-FPM:

sudo dnf --enablerepo=remi install php82 php82-php-fpm

After installation, you can verify the installed package version using:

php --version

This command will display the installed PHP version, confirming that you’ve successfully installed the package from the REMI repository.

Troubleshooting Common Issues

While installing and using the REMI repository is generally straightforward, you may encounter some issues. Here are some common problems and their solutions:

  1. GPG key errors: If you encounter GPG key verification errors, you may need to manually import the REMI GPG key. Use the following command:
    sudo rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi
  2. Conflicts with existing packages: Sometimes, packages from REMI may conflict with existing system packages. In such cases, consider using the “–allowerasing” option with dnf to resolve conflicts:
    sudo dnf --enablerepo=remi --allowerasing install <package-name>
  3. Repository not found: If you receive a “repository not found” error, ensure that you’ve installed the correct REMI release package for your system version. Double-check the installation commands provided earlier in this guide.

Congratulations! You have successfully installed Remi Repo. Thanks for using this tutorial for installing REMI Repository on Linux system. For additional help or useful information, we recommend you check the official REMI website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button