How To Install Remi Repository on AlmaLinux 8

This guide intends to teach you How To Install Remi Repository on AlmaLinux 8.

REMI is an RPM package repository that allows us to install newer versions of applications that are either not in the RHEL / AlmaLinux 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 are to have recent versions of PHP. 

Install Remi RPM Repository on AlmaLinux 8

To install the Remi repository, you must log n to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with AlmaLinux 8.

Now follow the steps below to complete this guide.

Installing Remi Repository on AlmaLinux 8

First, you need to update and upgrade your local package index with the command below:

sudo dnf update -y && sudo dnf upgrade -y

Then, you need to install the Epel repository on your server. The EPEL repository is an additional package repository that provides easy access to install packages for commonly used software.

To do this, run the following commands:

#sudo dnf config-manager --set-enabled powertools
#sudo dnf install epel-release

Now you can use the following command to enable the Remi repository on your server:

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

Enable PHP Remi Repository on AlmaLinux 8

At this point, you can use the following command to see the available PHP options in the Remi repo on AlmaLinux 8:

dnf module list php

You will be prompted to import the GPG key for Remi’s repository. Type (Y) to proceed if you encounter it.

In your output you will see:

Output
AlmaLinux 8 - AppStream
Name      Stream       Profiles                       Summary
php       7.2 [d]      common [d], devel, minimal     PHP scripting language
php       7.3          common [d], devel, minimal     PHP scripting language
php       7.4          common [d], devel, minimal     PHP scripting language
php       8.0          common [d], devel, minimal     PHP scripting language

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name      Stream       Profiles                       Summary
php       remi-7.2     common [d], devel, minimal     PHP scripting language
php       remi-7.3     common [d], devel, minimal     PHP scripting language
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

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

For example, if you want to enable Remi PHP 8.1 on AlmaLinux 8, you can use the following command:

sudo dnf module enable php:remi-8.1 -y

Then, use the command below to install PHP 8.1:

sudo dnf install php

Note: You can also install development alpha or beta versions. The module, until fully released, which is in alpha status at the time of the tutorial, is PHP 8.2 and is ported, so you can search for it as follows:

dnf search php82
Output
========================= Name Exactly Matched: php82 ==========================
php82.x86_64 : Package that installs PHP 8.2
======================== Name & Summary Matched: php82 =========================
php82-php-pecl-psr-devel.x86_64 : php82-php-pecl-psr developer files (header)
php82-php-pecl-raphf-devel.x86_64 : php82-php-pecl-raphf developer files
                                  : (header)
php82-php-pecl-xmldiff-devel.x86_64 : php82-php-pecl-xmldiff developer files
                                    : (header)
php82-php-zstd-devel.x86_64 : php82-php-zstd developer files (header)
php82-runtime.x86_64 : Package that handles php82 Software Collection.
php82-scldevel.x86_64 : Package shipping development files for php82
php82-syspaths.x86_64 : System-wide wrappers for the php82 package
============================= Name Matched: php82 ==============================
php82-build.x86_64 : Package shipping basic build configuration
php82-libzip.x86_64 : C library for reading, creating, and modifying zip
                    : archives
php82-php.x86_64 : PHP scripting language for creating dynamic web sites
php82-php-ast.x86_64 : Abstract Syntax Tree
php82-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
                        : library
php82-php-brotli.x86_64 : Brotli Extension for PHP
php82-php-cli.x86_64 : Command-line interface for PHP
php82-php-common.x86_64 : Common files for PHP
....

Next, you can install specific versions side by side using the php{version}, then the modules with php{version}-php-{module}. Below is an example install PHP and PHP-FPM.

sudo dnf install php82 php82-php-fpm

Important Note: Installing alpha PHP versions are for upstream testing for websites or developers; do not deploy this on a live website unless you have particular reasons.

Enable Additional Remi Repositories

As you know Remi repository’s main focus is on PHP. But it can also support Redis and Memcached for the latest or LTS versions that are still supported.

To enable the Memcached Remi repository on AlmaLinux 8, you can use the command below:

sudo dnf module enable memcached:remi

To enable the Redis Remi repository, you can use the command below:

sudo dnf module enable redis:remi-{version}

Replace {version} with your desired version. For example:

sudo dnf module enable redis:remi-7.0 -y

Conclusion

At this point, you learn to Install Remi Repository on AlmaLinux 8 and you also learn to enable PHP, Memcached, and Redis Remi repositories.

Hope you enjoy it.

You may be interested in these articles:

How To Set up MySQL Workbench on AlmaLinux 8

How To Install PHP 7.4 on AlmaLinux 8

Enable EPEL and PowerTools on AlmaLinux 8

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular