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

Hướng dẫn cài đặt EPEL Repository trên CentOS/RHEL 5/6/7Cuongquach.com | Bài hướng dẫn này sẽ miêu tả cách thức để bạn có thể cài đặt EPEL Repository trên CentOS/RHEL 5/6/7 . Kèm theo là cách kiểm tra việc cài đặt EPEL và xoá EPEL nếu cần.

EPEL Repository là gì ?

EPEL (Extra Packages for Enterprise Linux) là một kho chứa chương trình cộng đồng mở và miễn phí được Fedora phát triển và duy trì. EPEL cung cấp 100% các gói chương trình chất lượng cao dành cho các hệ điều hành Linux như Redhat, CentOS, Fedora,..

Tại sao nên dùng EPEL Repository ?

  • Cung cấp một số lượng lớn phần mềm mã nguồn mở thông qua việc cài đặt với “yum”.
  • 100% mã nguồn mở và miễn phí sử dụng.
  • Không có vấn đề về sự không tương thích hệ thống.
  • Các chương trình thường được cập nhật tới các bản ổn định nhất.

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

Cách 1. Cài đặt qua Repo mặc định của CentOS/RHEL

Cách này cực kì đơn giản và thường được cài đặt nhanh chóng. Nếu cách 1 này thất bại hãy xuống cách 2.

# yum install epel-release

Cách 2. Cài đặt qua gói package từ EPEL Server

2.1 Cài đặt thông tin GPG Key tương ứng của EPEL Package

Bạn nên download thông tin GPG key dành cho package EPEL để giúp hệ thống OS có thể xác thực được phần mềm download từ hệ thống Fedora là an toàn và chính chủ nhé. Bạn truy cập link trang chủ dưới để download hoặc thực hiện các thao tác command mình làm dưới.

Nên cài đặt thông tin GPG key trước khi cài đặt package EPEL.

Trang chủ : 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 và cài đặt package EPEL

Với cách này chúng ta sẽ cài đặt thông qua gói package được download tương ứng phiên bản version OS và kiến trúc 32bit hay 64bit của Hệ Điều Hành. Gói phần mềm EPEL lúc này sẽ luôn là phiên bản mới nhất.

+ 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 Kiểm tra xem EPEL đã được cài đặt chưa

Epel Repo mặc định được kích hoạt và file cấu hình của EPEL nằm ở đường dẫn “/etc/yum.repos.d/epel.repo .

Tìm EPEL trong danh sách repo của yum.

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

2.4 Xoá EPEL Repository

Tìm EPEL package và tiến hành xoá gói EPEL nếu cài đặt thông qua ‘rpm’ .

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

Xoá gói package bằng command “rpm -e” .

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

 Vậy là ta đã hoàn tất việc cài đặt EPEL Repository trên CentOS/RHEL 6/7/8 .

Nguồn: https://cuongquach.com

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

Quách Chí Cường: 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 !
Related Post