Install / Enable IUS Community Repository on RHEL & CentOS

IUS Community is a CentOS Community Approved third-party RPM repository which contains latest upstream versions of PHP, Python, MySQL, etc.., packages for Enterprise Linux (RHEL & CentOS) 5, 6 & 7. IUS Community Repository have dependency with EPEL Repository so we have to install EPEL repository prior to IUS repository installation. Follow the below steps to install & enable EPEL & IUS Community Repository to RPM systems and install the packages. You can view all the available packages from IUS Community.

Also you can read the below additional third party repo for RPM based systems.

1) Install/Enable IUS Community Repository on RHEL & CentOS

Run the below scripts on your terminal to Install/Enable EPEL IUS Community Repository to CentOS/RHEL 5, 6 & 7 Systems. It will automatically import GPG keys.

[Download IUS Community Repository Shell script]
# curl 'https://setup.ius.io/' -o setup-ius.sh

[Install/Enable IUS Community Repository]
# sh setup-ius.sh

2) How to check whether IUS Community Repository is Enabled or not

Run the below command to verify and confirm the IUS Community Repository is installed in your system.

# yum repolist
ius       IUS Community Packages for Enterprise Linux 6 - x86_64         362

3) How to Check whether the package is available from IUS Community Repository

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

# yum --enablerepo=ius list php70u-*
Available Packages
php70u-bcmath.x86_64            7.0.5-1.ius.centos6            ius
php70u-cli.x86_64               7.0.5-1.ius.centos6            ius
php70u-common.x86_64            7.0.5-1.ius.centos6            ius
php70u-dba.x86_64               7.0.5-1.ius.centos6            ius
php70u-dbg.x86_64               7.0.5-1.ius.centos6            ius

4) How to install package from IUS Community Repository

Use yum command format like below to install package from IUS Repository. For example, i’m going to install php7.0 using IUS Repository.

# yum --enablerepo=ius install php70u-common php70u-fpm php70u-gd php70u-mbstring php70u-pdo

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

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

# yum info php70u-common
Installed Packages
Name        : php70u-common
Arch        : x86_64
Version     : 7.0.5
Release     : 1.ius.centos6
Size        : 8.0 M
Repo        : installed
From repo   : ius
Summary     : Common files for PHP
URL         : http://www.php.net/
License     : PHP and BSD and ASL 1.0
Description : The php-common package contains files used by both the php
            : package and the php-cli package.

6) Upgrade installed packages to IUS versions

We can easily upgrade installed packages to IUS package versions without un install, using yum replace plugin which is maintaining by IUS Community. For Example, if you already installed PHP 5.x and you want to replace with php 7.x package from the IUS repository. Just follow the below procedure.

[Install yum plugin-replace package from IUS Community Repository]
# yum install yum-plugin-replace

[Replace php 5.x to php 7.x]
# yum replace php --replace-with php70u-*

[Replace php 5.x to php 7.x]
# dnf --allowerasing install php70u-*

By default the option are available in DNF package manager. The flag --allowerasing allows you erase conflicting packages in the same transaction.
Note : Dnf is not yet available in base RHEL, but has been back ported to EPEL 7.

7) How to list out the packages available from IUS Community Repository

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

# yum --disablerepo="*" --enablerepo="ius" list available | more
Available Packages
apcu-panel55u.noarch                             4.0.10-1.ius.centos6        ius
apcu-panel56u.noarch                             4.0.10-1.ius.centos6        ius
apr15u.x86_64                                    1.5.2-1.ius.centos6         ius
apr15u-debuginfo.x86_64                          1.5.2-1.ius.centos6         ius
apr15u-devel.x86_64                              1.5.2-1.ius.centos6         ius
apr15u-util.x86_64                               1.5.4-3.ius.centos6         ius
apr15u-util-debuginfo.x86_64                     1.5.4-3.ius.centos6         ius
apr15u-util-devel.x86_64                         1.5.4-3.ius.centos6         ius
apr15u-util-ldap.x86_64                          1.5.4-3.ius.centos6         ius
apr15u-util-mysql.x86_64                         1.5.4-3.ius.centos6         ius
apr15u-util-nss.x86_64                           1.5.4-3.ius.centos6         ius
apr15u-util-odbc.x86_64                          1.5.4-3.ius.centos6         ius
apr15u-util-openssl.x86_64                       1.5.4-3.ius.centos6         ius
apr15u-util-pgsql.x86_64                         1.5.4-3.ius.centos6         ius
apr15u-util-sqlite.x86_64                        1.5.4-3.ius.centos6         ius
emacs-git2u.noarch                               2.8.0-1.ius.centos6         ius
emacs-git2u-el.noarch                            2.8.0-1.ius.centos6         ius
git2u.x86_64                                     2.8.0-1.ius.centos6         ius
git2u-all.noarch                                 2.8.0-1.ius.centos6         ius

Now, Everybody can install latest version of PHP, MySQL & Python package without any trouble…)

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...

Shares
Close
Please support the site
By clicking any of these buttons you help our site to get better