Hướng dẫn cài đặt EPEL Repository trên CentOS/RHEL 5/6/7

How to install EPEL Repository on CentOS/RHEL 6/7/5

In this post, i will show you how to install EPEL Repository on CentOS/RHEL 5/6/7, then you will also know how to check EPEL installed successfuly or not.

What is EPEL Repository?

EPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux

Why you should use EPEL Repository?

  • Provides lots of open source packages to install via Yum.
  • Epel repo is 100% open source and free to use.
  • It does not provide any core duplicate packages and no compatibility issues.
  • All epel packages are maintained by Fedora repo.

Method 1: install by default repo of CentOS

– This method’s very simple and people usually use this method. However if you fail at this stage, please go to method 2.

# yum install epel-release

Method 2: install by download package of EPEL

2.1 Import GPG Key of EPEL packageg ứng của EPEL Package

– You should import GPG key information of EPEL package for verifying package that downloaded from Fedora server. Ok so you can access the below link to get GPG key or execute below commands to do that instead of.

Homepage : https://getfedora.org/keys/

+ CentOS/RHEL 7.x

# wget --no-check-certificate -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 https://getfedora.org/static/352C64E5.txt
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

 + CentOS/RHEL 6.x

# wget --no-check-certificate -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 https://getfedora.org/static/0608B895.txt
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

 + CentOS/RHEL 5.x

# wget --no-check-certificate -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5 https://getfedora.org/static/217521F6.txt
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5

2.2 Download and install EPEL package

You should determine version architecture of CentOS to download package .rpm EPEL as same as architecture info. We will install the latest package EPEL of each CentOS/RHEL version.

+ CentOS/RHEL 7.x

# rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

+ CentOS/RHEL 6.x

# rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

+ CentOS/RHEL 5.x

# rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

2.3 Check EPEL is installed or not

EPEL Repo default will be enabled and configured at file ‘/etc/yum.repos.d/epel.repo’, then you can check with command ‘yum repollist’ to list the avaiable repos on CentOS.

# yum repolist | grep "^epel\|repo id"
repo id repo name status
epel Extra Packages for Enterprise Linux 6 - x86_64 12,257

2.4 Remove EPEL Repository

Find EPEL package with tool ‘rpm’ then remove it with ‘rpm’ too.

# rpm -qa | grep epel
epel-release-6-8.noarch

Remove it.

# rpm -e epel-release-6-8.noarch

Ok, so you have known that you can install EPEL Repository on CentOS/RHEL.

Nguồn: https://cuongquach.com

1
2
Previous article[Ebook] Docker Series 5 ebooks – The New Stack – Download PDF
Next article[Tech] Tìm hiểu về công nghệ Blockchain thông qua Infographic
Bạn đang theo dõi website "https://cuongquach.com/" nơi lưu trữ những kiến thức tổng hợp và chia sẻ cá nhân về Quản Trị Hệ Thống Dịch Vụ & Mạng, được xây dựng lại dưới nền tảng kinh nghiệm của bản thân mình, Quách Chí Cường. Hy vọng bạn sẽ thích nơi này !