How to install REMI repository on CentOS or RHEL

Last updated on August 15, 2020 by Dan Nanni

Question: How can I configure the REMI repository on CentOS or RHEL, and install packages from the REMI repository?

The REMI repository offers updated versions of core CentOS and RHEL packages, notably the latest PHP/MySQL stack.

One thing to remember before installing the REMI repository is that it is not recommended to run "yum update" with the REMI repository. Since the package names of the REMI repository are the same as those used in the official RHEL/CentOS repositories, running "yum update" may trigger accidental upgrades of core packages. It is a good idea to keep the REMI repository disabled, and enable it only when you need to install packages that are only available in REMI.

Prerequisite

Before installing REMI repository, you first need to enable the EPEL repository because some packages in REMI depend on EPEL. Follow this guide to set up EPEL repository on CentOS or RHEL.

Install REMI Repository

Now go ahead and install REMI repository as follows.

On CentOS 8:

$ sudo rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi2018
$ sudo rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-8.rpm

On CentOS 7:

$ sudo rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi
$ sudo rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

By default, the REMI repository is set disabled. To check whether the REMI repository is successfully installed, use this command. You will see several REMI repositories such as remi, remi-php55 and remi-php56.

$ yum repolist disabled | grep remi

Install a Package from REMI Repository

As clarified, it is a good idea to keep the REMI repository disabled, and use it only when necessary.

To search or install a package in the REMI repository, use these commands:

$ sudo yum --enablerepo=remi search <keyword>
$ sudo yum --enablerepo=remi install <package-name>

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean