Red Hat Enterprise Linux (RHEL) is a widely used and popular distribution of Linux, known for its stability and security. However, the default package repositories provided by Red Hat may not always include the latest software versions or additional software that you may need. This is where additional repositories such as the Remi and EPEL repositories come in. These repositories provide a wide range of additional software packages that can be easily installed on your system.
In this article, we will go over a step-by-step guide on how to configure the REMI repositories on an RHEL-based system.
Step 1: Install the Required Dependencies
Before we can configure the Remi and EPEL repositories, we first need to install some required dependencies. Open a terminal and enter the following command:
- On RHEL 9/8 : Use the following command on CentOS Stream 9/8, /RHEL 9/8, AlmaLinux 9/8 and Rocky Linux 9/8 systems
sudo dnf install -y epel-release
- CentOS/RHEL 7:
sudo yum install -y epel-release
This command installs the Extra Packages for Enterprise Linux (EPEL) repository, which is required to install the Remi repository.
Step 2: Configure the Remi Repository
Next, we will configure the Remi repository. To do this, we need to download the Remi repository configuration file and install it on our system. Enter the following command in the terminal:
- On RHEL 9: Use the following command on CentOS Stream 9, RHEL 9, AlmaLinux 9, and Rocky Linux 9 systems
sudo dnf install -y http://rpms.remirepo.net/enterprise/remi-release-9.rpm
- On RHEL 8: Use the following command on CentOS Stream 8, RHEL 8, AlmaLinux 8, and Rocky Linux 8 systems.
sudo dnf install -y http://rpms.remirepo.net/enterprise/remi-release-8.rpm
- On RHEL 7:
sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
This command downloads and installs the Remi repository configuration file for Red Hat Enterprise Linux 7. If you are using a different version of RHEL, you will need to use the appropriate configuration file.
Step 3: Enable the Remi Repository
After the Remi repository configuration file is installed, we need to enable it. Enter the following command in the terminal:
sudo yum-config-manager --enable remi
This command enables the Remi repository, making it available for use on your system.
Step 4: Installing Pacakges
Now that the Remi and EPEL repositories are configured and enabled on your system, you can easily install additional software packages. For example, to install PHP 7.4, you can use the following command:
sudo yum install -y php74
You can also use the yum search command to search for available packages in the Remi and EPEL repositories. For example, to search for all available PHP packages, you can use the following command:
yum search php
Conclusion
By configuring the Remi and EPEL repositories on your RHEL-based system, you can easily access a wide range of additional software packages that are not included in the default Red Hat package repositories. This can save you time and effort, as you no longer have to manually download and install software packages. Remember to use the appropriate Remi repository configuration file for your version of RHEL and always use caution when installing new software on your system.