In this tutorial, we will show you how to install REMI Repository on CentOS, Rocky Linux, and AlmaLinux. For those of you who didn’t know, For those of you who didn’t know, REMI is a free-to-use repository created and maintained by Remi Collect. The REMI repository’s main goal is to provide the latest versions of the PHP/MySQL stack on Enterprise Linux such as Fedora, Centos, Rocky Linux, and AlmaLinux.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the REMI Repository on CentOS, Rocky Linux, and AlmaLinux.
- A server running one of the following operating systems: CentOS, Rocky Linux, or AlmaLinux.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install REMI Repository on CentOS, Rocky Linux, and AlmaLinux
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo dnf update sudo dnf install dnf-utils sudo dnf install epel-release
Step 2. Installing Remi Repository on CentOS, Rocky Linux, and AlmaLinux.
By default, REMI Repository is not available on CentOS, Rocky Linux, and AlmaLinux base repository. Now run the following command below to install and enable REMI Repository:
sudo dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm -y
Once the installation is done, confirm that the repo is enabled with this command:
sudo dnf update sudo dnf repolist
repo id repo name appstream CentOS Linux 9 - AppStream baseos CentOS Linux 9 - BaseOS epel Extra Packages for Enterprise Linux 9 - x86_64 epel-modular Extra Packages for Enterprise Linux Modular 9 - x86_64 extras CentOS Linux 9 - Extras remi-modular Remi's Modular repository for Enterprise Linux 9 - x86_64 remi-safe Safe Remi's RPM repository for Enterprise Linux 9 - x86_64
Step 3. Installing Package from REMI Repository.
To search or install a package in the REMI repository, use these commands:
sudo dnf --enablerepo=remi search <keyword> sudo dnf --enablerepo=remi install <package-name>
For example, let us try and install PHP 8.2 packages:
sudo dnf --enablerepo=remi install php82 php82-php-fpm
Congratulations! You have successfully installed Remi Repo. Thanks for using this tutorial for installing REMI Repository on CentOS 8 system. For additional help or useful information, we recommend you check the official REMI website.