How to Install the IUS Community Repository on RHEL and CentOS

IUS stands for Inline With Upstream Stable.

It began as an internal experiment at Rackspace before it was turned into a community project.

The IUS Community Repository is a Centos community approved third party RPM repository that provides the latest upstream versions of selected packages, such as PHP, Python, MySQL, MariaDB, Kit, Redis.

It provides packages for Enterprise Linux and CentOS including RHEL 6 / RHEL 7 / CentOS 6 / CentOS 7.

When we wrote this article they did not provide any packages for RHEL 8 / CentOS 8.

IUS packages use different names than their stock equivalents in order to avoid stock obsolescence.

They are labeled according to what they consider to be a “major version” or “branch” of upstream. The Python 3.6 package is named Python36.

So this may be the first segment of the version (i.e. 3) or the first and second segments (i.e. 3.6).

It is compatible with EPEL Repository, so you must install the EPEL repository before installing the IUS repository.

Otherwise, it will automatically install the EPEL repository as part of the dependency package.

You can find a list of packages offered by IUS community by navigating to the following URL.

1) How to Install/Enable IUS Community Repository on RHEL and CentOS

Run the below script in your terminal to install/enable the EPEL repository and the IUS Community Repository to CentOS and Red Hat systems. Also, it will automatically import the GPG keys.

The EPEL package is included in the CentOS Extras repository and is enabled by default, so you can install it by running the below command.

# yum install epel-release

Download IUS Community Repository Shell script by using the curl command from

# curl 'https://setup.ius.io/' -o setup-ius.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1914  100  1914    0     0   6563      0 --:--:-- --:--:-- --:--:--  133k

Install and enable the IUS community repository.

# sh setup-ius.sh

It drops below three repositories in the /etc/yum.repos.d/ directory and only enabled main IUS repo.

# ls -lh /etc/yum.repos.d/ius*

-rw-r--r--. 1 root root 669 May  1  2019 /etc/yum.repos.d/ius-archive.repo
-rw-r--r--. 1 root root 591 May  1  2019 /etc/yum.repos.d/ius.repo
-rw-r--r--. 1 root root 669 May  1  2019 /etc/yum.repos.d/ius-testing.repo

Alternatively, you can install IUS Community Repository using the yum command as described below.

For RHEL/CentOS 6

# yum install \
https://repo.ius.io/ius-release-el6.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

For RHEL/CentOS 7

# yum install \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

2) How Can i check if the IUS Community Repository is Enabled or Not?

Run the below command to verify and confirm the IUS Community Repository is installed in your system. This repo is currently having 867 packages.

# yum repolist ius

repo id                repo name                                        status
ius/x86_64             IUS for Enterprise Linux 7 - x86_64              867
repolist: 867

3) How to Search a Specific Package in the IUS Community Repository

Use the below command to search whether the given package is available from IUS Community repo.

# yum --disablerepo="*" --enablerepo="ius" search php7

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
================================== N/S matched: php7 ==================================
mod_php71u.x86_64 : PHP module for the Apache HTTP Server
mod_php72u.x86_64 : PHP module for the Apache HTTP Server
mod_php73.x86_64 : PHP module for the Apache HTTP Server
php71u-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php71u-cli.x86_64 : Command-line interface for PHP
php71u-common.x86_64 : Common files for PHP
php71u-dba.x86_64 : A database abstraction layer module for PHP applications
php71u-dbg.x86_64 : The interactive PHP debugger
php71u-devel.x86_64 : Files needed for building PHP extensions

  Name and summary matches only, use "search all" for everything.

4) How to Install a Package From the IUS Community Repository

Use the yum command with the following format to install the given package from the IUS Repository. To demonstrate this, we will be installing the python36u command package using the IUS community repository.

Make a note:

If the stock equivalent of an IUS package is not already installed, you can install the IUS Community Packages directly on your system.

For example, if the Python3 package is not already installed on the machine, you can simply install the Python36U package.

# yum install --enablerepo=ius python36u
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.piconets.webwerks.in
 * epel: my.fedora.ipserverone.com
 * extras: mirrors.piconets.webwerks.in
 * remi-safe: ftp.riken.jp
 * updates: mirrors.piconets.webwerks.in
Package python36u is obsoleted by python3, trying to install python3-3.6.8-10.el7.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package python3.x86_64 0:3.6.8-10.el7 will be installed
--> Processing Dependency: python3-libs(x86-64) = 3.6.8-10.el7 for package: python3-3.6.8-10.el7.x86_64
--> Processing Dependency: python3-setuptools for package: python3-3.6.8-10.el7.x86_64
--> Processing Dependency: python3-pip for package: python3-3.6.8-10.el7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-10.el7.x86_64
--> Running transaction check
---> Package python3-libs.x86_64 0:3.6.8-10.el7 will be installed
---> Package python3-pip.noarch 0:9.0.3-5.el7 will be installed
---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================
 Package                    Arch           Version                Repository    Size
=====================================================================================
Installing:
 python3                    x86_64         3.6.8-10.el7           base          69 k
Installing for dependencies:
 python3-libs               x86_64         3.6.8-10.el7           base         7.0 M
 python3-pip                noarch         9.0.3-5.el7            base         1.8 M
 python3-setuptools         noarch         39.2.0-10.el7          base         629 k

Transaction Summary
=====================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 9.4 M
Installed size: 48 M
Is this ok [y/d/N]:

If the stock equivalent of an IUS package is already installed, you must first uninstall.

If other packages depend on the installed stock package, you can perform the removal and installation in a single transaction using the below steps.

# yum shell

> erase php-common php-fpm
> install php73-common php73-fpm
> run

If you are using DNF on RHEL 7/CentOS 7 system, use the --allowerasing flag with the DNF command, which allows you to erase conflicting packages on the same transaction.

# dnf --allowerasing install php73-common php73-fpm

5) How to Check whether the package is installed from the IUS Community Repository

Use the below command to check if the package is installed from the IUS Community repo.

# yum info php73-common

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.piconets.webwerks.in
 * epel: my.fedora.ipserverone.com
 * extras: mirrors.piconets.webwerks.in
 * remi-safe: ftp.riken.jp
 * updates: mirrors.piconets.webwerks.in
Installed Packages
Name        : php73-common
Arch        : x86_64
Version     : 7.3.13
Release     : 1.el7.ius
Size        : 6.4 M
Repo        : installed
From repo   : ius
Summary     : Common files for PHP
URL         : http://www.php.net/
License     : PHP and BSD
Description : The php-common package contains files used by both the php
            : package and the php-cli package.

6) How to Check the List of Packages Available in the IUS Community Repository

Use the below command to list available packages from the IUS Community repo.

# yum --disablerepo="*" --enablerepo="ius" list available | more

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Available Packages
apr15u.x86_64                                 1.5.2-2.ius.el7                ius
apr15u-devel.x86_64                           1.5.2-2.ius.el7                ius
apr15u-util.x86_64                            1.5.4-3.ius.el7                ius
apr15u-util-devel.x86_64                      1.5.4-3.ius.el7                ius
apr15u-util-ldap.x86_64                       1.5.4-3.ius.el7                ius
apr15u-util-mysql.x86_64                      1.5.4-3.ius.el7                ius
apr15u-util-nss.x86_64                        1.5.4-3.ius.el7                ius
apr15u-util-odbc.x86_64                       1.5.4-3.ius.el7                ius
apr15u-util-openssl.x86_64                    1.5.4-3.ius.el7                ius
apr15u-util-pgsql.x86_64                      1.5.4-3.ius.el7                ius
apr15u-util-sqlite.x86_64                     1.5.4-3.ius.el7                ius
dovecot22u.x86_64                             1:2.2.36.4-1.el7.ius           ius
dovecot22u-devel.x86_64                       1:2.2.36.4-1.el7.ius           ius
dovecot22u-mysql.x86_64                       1:2.2.36.4-1.el7.ius           ius
dovecot22u-pgsql.x86_64                       1:2.2.36.4-1.el7.ius           ius
dovecot22u-pigeonhole.x86_64                  1:2.2.36.4-1.el7.ius           ius
emacs-git2u.noarch                            2.16.5-1.ius.el7               ius
emacs-git2u-el.noarch                         2.16.5-1.ius.el7               ius
git216.x86_64                                 2.16.6-2.el7.ius               ius
git216-all.noarch                             2.16.6-2.el7.ius               ius
git216-core.x86_64                            2.16.6-2.el7.ius               ius
git216-core-doc.noarch                        2.16.6-2.el7.ius               ius
.
.

RHEL and CentOS users can install the latest version of PHP7, MySQL/MariaDB and Python packages without any problems.

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

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