How to Install Remi RPM on Rocky Linux EL9 or EL8

Remi’s RPM repository emerges as a pivotal resource for those utilizing Rocky Linux and seeking enhanced software flexibility. This repository, curated by Remi Collet, offers many RPM packages tailored to amplify your Linux capabilities. If you aim to install Remi RPM on Rocky Linux 9 or the older stable Enterprise Linux release of Rocky Linux 8, this guide is tailored for you.

Key Attributes of Remi’s Repository:

  • Extensive Software Selection: Beyond the default Rocky Linux repositories, Remi’s RPM provides a broad spectrum of packages, especially those related to PHP and web development tools.
  • Regular Maintenance: Remi’s repository stands out for its consistent updates, encompassing security patches, software enhancements, and bug resolutions.
  • Diverse PHP Offerings: Catering to varied needs, Remi’s repository hosts multiple PHP versions, from legacy releases to the latest iterations.

Why Opt for Remi’s RPM on Rocky Linux?:

  • Enhanced Software Choices: Access to Remi’s repository translates to greater software flexibility, a boon for developers and system administrators.
  • State-of-the-Art Tools: With Remi, users can access the most recent and stable versions of essential tools.
  • Optimized User Experience: The repository’s vast package range and consistent updates ensure a seamless experience for Rocky Linux users.
  • Assured Compatibility: Remi’s repository’s array of PHP versions ensures alignment with diverse project needs, from personal endeavors to enterprise-grade systems.

In the dynamic realm of digital technology, the availability of diverse, updated software becomes paramount. Remi’s RPM repository, with its rich offerings, promises to elevate the Rocky Linux user experience. The subsequent guide will detail the steps to seamlessly integrate Remi RPM on Rocky Linux 9 or its older stable release of Rocky Linux 8. Dive in to harness the full potential of this repository.

Import Remi RPM Repository on Rocky Linux 9 or 8

Step 1: Updating Rocky Linux Before Remi RPM Import

Embarking on this journey, the first step we must take is to ensure our Rocky Linux system is up to date. Upgrading existing packages minimizes the risk of conflicts arising during new installations. This essential prerequisite sets a clean stage for the subsequent steps. Let’s go ahead and refresh our system:

sudo dnf upgrade --refresh

This command will upgrade all the packages in your Rocky Linux system to their latest versions.

Step 2: Import Remi Repository on Rocky Linux 9 or 8

Having updated our system, it’s time to import the Remi repository. However, before we get to that, there is an intermediate step we must take — installing the EPEL (Extra Packages for Enterprise Linux) repository.

The EPEL repository is a beneficial resource for distributions like Rocky Linux that are built on RHEL. It presents a treasure trove of software packages frequently employed in Enterprise Linux environments.

Let’s note that we must import the Remi RPM corresponding to our specific distribution version, as this guide covers Rocky Linux 8 and Rocky Linux 9. Let’s get into the specifics.

Importing the Remi PHP Repository for Rocky Linux 9

We need to activate the CRB (Code Ready Builder) to kick things off. This is achieved through the following command:

sudo dnf config-manager --set-enabled crb

Having activated the Code Ready Builder (CRB), it’s time to install both versions of the Extra Packages for Enterprise Linux (EPEL) repository. Let’s do that with this command:

sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm

With EPEL installed, we can now add the Remi repository for Enterprise Linux 9 to our system by executing the following command:

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

Importing the Remi PHP Repository for Rocky Linux 8

For Rocky Linux 8, we follow a similar sequence, starting with the activation of the EPEL repository. The following command will get that done:

sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm

Upon successful activation of EPEL, we proceed to import the Remi Enterprise Linux 8 repository using the command:

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

Enable Remi PHP Repository on Rocky Linux 9 or 8

Step 1: Listing Available PHP Modules

By integrating the Remi RPM repository into our system, we have unlocked the door to the latest versions of the PHP branch that we might want to use in our server stack. This is an essential capability, especially for developers who need to switch between different PHP versions for various projects.

To gain an understanding of the supported PHP versions, let’s execute the following command. This will provide us with a comprehensive list of all available PHP modules:

sudo dnf module list php
Screenshot showcasing PHP module listings from Remi RPM repository on Rocky Linux 9 or 8.
Example screenshot displaying PHP module listings sourced from the Remi RPM repository on Rocky Linux.

The command above queries the DNF module and fetches a list of all PHP versions that are available for installation through our recently integrated Remi repository.

Step 2: Select and Enable the Desired PHP Version on Rocky Linux via Remi RPM

After perusing the available PHP modules, we are now in a position to make an informed choice on the PHP version that best suits our needs. We can then enable the selected version on our Rocky Linux system.

Below are examples of commands to enable different PHP versions. Choose the one that corresponds to your desired PHP version:

sudo dnf module enable php:remi-7.4 -y
sudo dnf module enable php:remi-8.0 -y
sudo dnf module enable php:remi-8.1 -y
sudo dnf module enable php:remi-8.2 -y
sudo dnf module enable php:remi-8.3 -y

Step 3: Install Enabled PHP Version on Rocky Linux

Once the desired version of PHP has been selected and enabled, we’re ready to proceed with the installation process. To install the enabled PHP version, we execute the usual installation command:

sudo dnf install php

This command kicks off the installation process for the PHP version that we have enabled. Once the process is completed, the chosen PHP version will be ready for use on our Rocky Linux system.

Enable Additional Remi RPM Repositories on Rocky Linux 9 or 8

The Remi RPM repository is not a one-trick pony. Apart from PHP, it also provides support for the latest versions of two very popular caching tools, Redis and Memcached. By tapping into these additional repositories, we can streamline our setup process and ensure we are using the most up-to-date and efficient tools in our server stack.

Enable and Install Memcached on Rocky Linux 9 or 8 via Remi RPM

Memcached is a high-performance, distributed memory object caching system, generic in nature but intended for use in speeding up dynamic web applications by alleviating database load.

Let’s enable the Memcached repository from Remi RPM using the following command:

sudo dnf module enable memcached:remi

This command is instructing our system to activate the Memcached repository within Remi RPM.

Following the enablement, we proceed with the installation process of Memcached:

sudo dnf install memcached

With this command, we initiate the installation of Memcached on our Rocky Linux system.

Enable and Install Redis on Rocky Linux 9 or 8 via Remi RPM

Redis is an open-source, in-memory data structure store used as a database, cache, and message broker. It supports various data structures and is known for its speed and flexibility.

To enable Redis from the Remi repository, use the following command, replacing {version} with your desired version:

sudo dnf module enable redis:remi-{version}

For instance, if you intend to use Redis 7.0, replace {version} with 7.0 as follows:

sudo dnf module enable redis:remi-7.0 -y

If you prefer to use Redis 6.2 or 5.0, replace {version} accordingly:

sudo dnf module enable redis:remi-6.2 -y
sudo dnf module enable redis:remi-5.0 -y

The above commands instruct the system to activate the Redis branch within Remi RPM.

Once the desired Redis branch has been enabled, we can now proceed with the usual installation command:

sudo dnf install redis

This will either install the chosen Redis version or upgrade your existing Redis installation, if any.

Closing Thoughts

Through the course of this article, we have walked together on a journey of integrating the Remi RPM repository into a Rocky Linux system. With our teacher-student engagement, we’ve covered the installation of the Remi repository, enabling specific PHP versions tailored to your needs and integrating additional powerful caching tools such as Memcached and Redis.

The Remi repository is more than just a toolbox for PHP, it is a Swiss army knife for open-source software packages, offering up-to-date versions to help you streamline your workflows and keep your technology stack fresh. The convenience and versatility it brings to Rocky Linux cannot be overstated, making it a must-have for any developer or system administrator who wishes to keep their server environments agile and robust.

Leave a Comment


Your Mastodon Instance
Share to...