How to Enable and Install Third Party Packages Using EPEL Repository on CentOS/RHEL

Centos 7Red HatSoftware & Coding

In this article we shall try to learn, how to add EPEL Repository for Linux. EPEL (Extra Package for Enterprise Linux) is an open source and free community based repository from the Fedora community team which provides high quality and good add-on software’s for Linux distributions. It has Red Hat Enter Linux, CentOS, Scientific Linux and most of the repositories which are maintained by the Fedora team only.

Why we use EPEL Repositories for Packages

  • Provides a lot of open source packages which are installed using yum.
  • EPEL repositories are open source and they are 100% free to use.
  • There will not be any compatibility issues and they don’t provide any core duplicate packages.
  • These are maintained by Fedora team.

To Enable Repository in CentOS/RHEL

We need to download the file using Wget to get the ‘.rpm’ and install using RPM command. As a root user we needed to run the below command.

For Centos 7 or RHEL 7

# wget http://dl.fedoraprokect.org/pub/epl/7/x86_64/e/epel-release-7.6.noarch.rpm
# rpm –ivh epelrelease-7-6.noarch.rpm

For Centos 6.x 64-Bit or 32-Bit

32-Bit

# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

64-Bit

# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

Verifying the EPEL Repo

As the above command will install the EPEL repository in our yum repositories, we can verify that the EPEL repositories are enabled or not by using the below command.

# yum repolist
yum repoli
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink                                        | 12 kB 00:00
   * base: linux.cc.lehigh.edu
   * epel: ftp.osuosl.org
   * extras: mirror.fusioncloud.co
   * remi-safe: fr.mirror.babylon.network
   * rpmforge: mirror.lug.udel.edu
* updates: centos.mirror.constant.com
WandiscoSVN | 951 B 00:00
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.8 MB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 36 kB 00:00
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 285 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 726 kB 00:00
repo id                                repo name status
WandiscoSVN                            Wandisco SVN Repo 73
base                                   CentOS-6 - Base 6,696
epel                                   Extra Packages for Enterprise Linux 6 - x86_64 12,156
extras                                 CentOS-6 - Extras 60
remi-safe                              Safe Remi's RPM repository for Enterprise Linux 6 - x86_64 659
rpmforge                               RHEL 6 - RPMforge.net - dag 245
updates                                CentOS-6 - Updates 111
repolist:
20,000
As we install the repositories all the yum repositories are located at /etc/yum.repos.d/epel.repo

How to use EPEL Repository

We use the YUM command to search and install the packages. If we want to install MySQL using EPEL repos, we can execute the below command to see if it is available or not

# yum --enablerepo=epel info mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
   * base: linux.cc.lehigh.edu
   * epel: ftp.osuosl.org
   * extras: mirror.fusioncloud.co
   * remi-safe: fr.mirror.babylon.network
   * rpmforge: mirror.lug.udel.edu
   * updates: centos.mirror.constant.co
Installed Packages
Name          : mysql
Arch          : x86_64
Version       : 5.1.73
Release       : 5.el6_6
Size          : 2.4 M
Repo          : installed
From repo     : base
Summary       : MySQL client programs and shared libraries
URL           : http://www.mysql.com
License       : GPLv2 with exceptions
Description   : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
              : client/server implementation consisting of a server daemon (mysqld)
              : and many different client programs and libraries. The base package
              : contains the standard MySQL client programs and generic MySQL files
Available Packages
Name          : mysql
Arch          : x86_64
Version       : 5.1.73
Release       : 7.el6
Size          : 894 k
Repo          : base
Summary       : MySQL client programs and shared libraries
URL           : http://www.mysql.com
License       : GPLv2 with exceptions
Description   : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
              : client/server implementation consisting of a server daemon (mysqld)
              : and many different client programs and libraries. The base package
              : contains the standard MySQL client programs and generic MySQL files.

To install the MySQL using EPEL repo we needed to run the below command –

Some time the repos are not updated automatically, then we needed to add the repo’s list to our local yum repository, here for demo purpose I am adding MySQL Community edition version 5.6 to our local repository.

# vi /etc/yum. reposes. d/mysql. reports
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Now we will install the mysql using EPEL repo

# yum --enablerepo-epel install mysql
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
   * base: linux.cc.lehigh.edu
   * epel: ftp.osuosl.org
   * extras: mirror.fusioncloud.co
   * remi-safe: fr.mirror.babylon.network
   * rpmforge: mirror.lug.udel.edu
   * updates: centos.mirror.constant.com
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-5.el6_6 will be updated
--> Processing Dependency: mysql = 5.1.73-5.el6_6 for package: mysql-server-5.1. 73-5.el6_6.x86_64
---> Package mysql.x86_64 0:5.1.73-7.el6 will be an update
--> Processing Dependency: mysql-libs = 5.1.73-7.el6 for package: mysql-5.1.73-7 .el6.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.73-5.el6_6 will be updated
---> Package mysql-libs.x86_64 0:5.1.73-7.el6 will be an update
---> Package mysql-server.x86_64 0:5.1.73-5.el6_6 will be updated
---> Package mysql-server.x86_64 0:5.1.73-7.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
mysql x86_64 5.1.73-7.el6 base 894 k
Updating for dependencies:
mysql-libs x86_64 5.1.73-7.el6 base 1.2 M
mysql-server x86_64 5.1.73-7.el6 base 8.6 M

Transaction Summary
================================================================================
Upgrade 3 Package(s)

Total download size: 11 M
Is this ok [y/N]:

By using the EPEL, we can install the trusted and safe Third party packages from the EPEL repository on CentOS / RHEL (Red Hat Enterprises Linux)

raja
Published on 21-Jan-2020 10:42:03
Advertisements