How to enable the REMI repository on Rocky Linux 8

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. With the death of CentOS, many people feel they have to start over. So today, in this short and brief post, you will learn how to enable the REMI repository on Rocky Linux 8.

What is REMI?

REMI is an RPM package repository that allows us to install newer versions of applications that are either not in the RHEL / Rocky Linux repositories, or are in deprecated versions.

Although it was originally intended to offer the latest versions of PHP, it has been gradually including more and more software, including more updated versions and other entirely new packages.

However, it is true that the fame and use of this repository is to have recent versions of PHP. For example, thanks to this repository, we can install PHP 8.1 on Rocky Linux.

So, let’s go for it.

Enable the REMI repository on Rocky Linux 8

Although the packages in the REMI repository are very secure, it is best to enable it only if you really need it.

First enable the EPEL repository.

sudo dnf install epel-release
1.- Enable the EPEL repository
1.- Enable the EPEL repository

Now you can enable the REMI repository by executing the following command

sudo dnf install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
2.- Enabling the REMI repository on Rocky Linux
2.- Enabling the REMI repository on Rocky Linux

If you want to check the changes, you can then run

sudo dnf repolist
3.- Repo List on the system
3.- Repo List on the system

As you can see, the REMI repository has been successfully enabled.

Using the REMI repository

If you are curious, you can check the list of packages available in the REMI repository with the following command

sudo dnf --disablerepo="*" --enablerepo="remi" list available

Moreover, you can see the remi-safe one

sudo dnf --disablerepo="*" --enablerepo="remi" list available

Remi-safe is a division of the REMI repository where packages do not require external dependencies and therefore do not replace any package distributed by RHEL or Rocky Linux. Let’s say it’s much more secure.

Installing PHP from the REMI repository

REMI has many packages but is still useful for installing recent versions of PHP. In this post, we will install PHP 8.1 on a trial basis.

So, list the PHP modules on the system.

sudo dnf module list php
4.- Using the REMI repository on Rocky Linux 8
4.- Using the REMI repository on Rocky Linux 8

And now install and enable the PHP 8.1 module from REMI.

sudo dnf module install php:remi-8.1
5.- Install PHP using the REMI repository
5.- Install PHP using the REMI repository

This enables REMI and installs PHP 8.1 at once.

You can verify the installation by running

php -v
PHP 8.1.1 (cli) (built: Dec 15 2021 02:00:45) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.1, Copyright (c) Zend Technologies

It’s that simple to use.

Disable REMI repository

The quickest and easiest way to do this is by installing the dnf-utils utility

sudo dnf install dnf-utils

So, to temporarily disable it you can run

sudo dnf --disablerepo=remi update

And

sudo dnf --disablerepo=remi-safe update

If you want to disable it permanently, you have to go to the repository configuration archive and assign the value 0 to the enabled directive.

For example,

sudo nano /etc/yum.repos.d/remi.repo
enabled=0

Save the changes and refresh the whole system.

sudo dnf update

So, enjoy it

Conclusion

Throughout this post, you have learned how to enable the REMI repository on Rocky Linux 8, so you can get packages that are not in the official repositories. Furthermore, this repository is used by many sysadmins to update the PHP version of the system.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook