Have a Question?

If you have any question you can ask below or enter what you are looking for!

How to enable remi repo on CentOS


Remi repo is a free and stable YUM repository mainly for the PHP stack. It contains packages for the latest versions of PHP. This article describes how to use Remi repo on CentOS 5/6/7.


Root user privilege is required in the server to run the commands used here.

Some of the packages in Remi repo depend on packages available from EPEL repo. To enable EPEL repo, refer to our previous article on Using EPEL repo on CentOS.

Enabling Remi repo

Remi repo has a ‘remi-release’ package that includes gpg key for package signing and repository information. Use following RPM command to install this package to enable Remi repo in your server.

for CentOS 5,

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

for CentOS 6,

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

for CentOS 7,

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

The repository configuration file is /etc/yum.repos.d/remi.repo and it has all repositories disabled by default. Following are the important repositories defined in remi.repo:

remi - contains PHP 5.4 packages
remi-php55 - contains PHP 5.5 packages
remi-php56 - contains PHP 5.6 packages

To enable a repository, set enabled=1 in the corresponding repository configuration section in /etc/yum.repos.d/remi.repo. Note that remi-php55 and remi-php56 repositories depend on remi repository. So if you enable either remi-php55 or remi-php56, enable remi as well.

After enabling the required Remi repositories, verify it with yum repolist command. Following command shows list of available repositories in a CentOS 6 server which has remi and remi-php56 repositories enabled:

[root@server ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.cc.columbia.edu
 * epel: mirror.redsox.cc
 * extras: centos.mirror.lstn.net
 * remi: mirrors.mediatemple.net
 * remi-php56: mirrors.mediatemple.net
 * updates: repos.mia.quadranet.com
repo id			repo name							status
base			CentOS-6 - Base 						6,518
epel			Extra Packages for Enterprise Linux 6 - x86_64			11,381
extras			CentOS-6 - Extras						37
remi			Les RPM de remi pour Enterprise Linux 6 - x86_64		2,527
remi-php56		Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - x86_64	355
updates			CentOS-6 - Updates						1,044
repolist: 21,862

Installing packages from Remi repo

To install packages from Remi repo, use yum install package_name command. For example, to install PHP 5.6, enable remi and remi-php56 repositories, then use following command which installs PHP base package and packages for MySQL and GD extensions of PHP:

yum install php php-mysql php-gd

You may run following command to search and find out the available packages which have the keyword php in package name:

yum search php

More information on Remi repo is available on http://rpms.famillecollet.com.

Leave a Reply

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

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>