How to Enable Remi Repository to Install Latest LAMP Stack

If you are a system administrator, a developer, or a DevOps engineer, chances are that at some point you’ve had to set up (or work with) a LAMP (Linux / Apache / MySQL or MariaDB / PHP) stack.

The web and database servers, along with the well-known server-side language, are not available in their latest versions from the major distributions’ official repositories. If you like to play or work with cutting-edge software, you will need to either install them from source, or use a third-party repository.

In this article we will introduce Remi, a third-party repository that includes up-to-date versions of Apache, MySQL / MariaDB, PHP, and related software, for RPM-based distributions. It is important to note, however, that Remi is currently available (at the time of this writing – June 2017) for the following distributions:

  • CentOS 6/7
  • Red Hat Enterprise Linux 6/7
  • Fedora 23/24/25/26

With that in mind, let’s begin.

Installing the Remi Repository in CentOS, RHEL and Fedora

Before we can actually install Remi, we need to enable the EPEL repository first. In Fedora it should be enabled by default, but in CentOS and RHEL 7 you will need to do:

# yum update && yum install epel-release
# yum install http://rpms.remirepo.net/enterprise/remi-release-6.rpm   #CentOS/RHEL 6
# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm   #CentOS/RHEL 7

For RHEL 7 only:

# subscription-manager repos --enable=rhel-7-server-optional-rpms

For Fedora 23/24/25/26, do:

# dnf install http://rpms.remirepo.net/fedora/remi-release-23.rpm # Fedora 23
# dnf install http://rpms.remirepo.net/fedora/remi-release-24.rpm # Fedora 24
# dnf install http://rpms.remirepo.net/fedora/remi-release-25.rpm # Fedora 25
# dnf install http://rpms.remirepo.net/fedora/remi-release-26.rpm # Fedora 26

By default, Remi is not enabled. To change this temporarily when you need it, you can do:

# yum --enablerepo=remi install package

where package represents the package you want to install.
If you want to enable Remi permanently, edit /etc/yum.repos.d/remi.repo and replace

enabled=0

with

enabled=1

A Closer Look at this Remi Repository

If you decided to enable the repository permanently as suggested earlier, it should be listed when you run:

# yum repolist

As you can see in the following image, another repository named remi-safe is available as well:

List Yum Repositories

List Yum Repositories

This repository provides extensions that are either deprecated (but still used in legacy applications), under work-in-process, or that do not comply with Fedora’s policies.

Now let’s search the newly added repositories for PHP-related packages as an example:

# yum list php*

Please note that packages in Remi have the same name as in the official repositories. Consider, for example, php:

List PHP Packages

List PHP Packages

If you need to install PHP 5.4, make sure to enable the right repository and disable the other.

To install the latest stable version of PHP (7.1), you can do:

# yum install php71

Similarly, to install latest version of LAMP Stack, do:

# yum --enablerepo=remi install php71 httpd mariadb-server mariadb
Summary

In this article we have explain how to enable and use Remi, a third-party repository that provides the latest versions of components of the LAMP stack and related software.

The official website provides a configuration wizard that can be very useful to set it up in other RPM-based distributions.

As always, don’t hesitate to let us know if you have questions or comments about this article. Just drop us a line using the form below and we will respond as soon as possible.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.