How to enable EPEL repository on RHEL 7

sysadmin
rhel7

#1

I am trying to enable epel repo on RHEL 7 server hosted in Amazon cloud as told here.

yum install epel-release

I am getting error :frowning:

Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package epel-release available.
Error: Nothing to do

How can I enable EPEL repo in RHEL 7? Is this AWS problem?


#2

Never mind I find answer on my own. All you have to do is run yum command:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

I refreshed it:

yum update
yum repolist all
yum repoinfo epel

I got info:

Loaded plugins: product-id, search-disabled-repos, subscription-manager
repolist: 0
[root@rhel7-nixcraft ~]# yum repoinfo epel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Repo-id      : epel/x86_64
Repo-name    : Extra Packages for Enterprise Linux 7 - x86_64
Repo-status  : enabled
Repo-revision: 1517183628
Repo-updated : Mon Jan 29 05:25:27 2018
Repo-pkgs    : 12,254
Repo-size    : 13 G
Repo-metalink: https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64
  Updated    : Mon Jan 29 05:25:27 2018
Repo-baseurl : https://mirrors.ustc.edu.cn/epel/7/x86_64/ (17 more)
Repo-expire  : 21,600 second(s) (last: Tue Jan 30 00:12:44 2018)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/epel.repo

repolist: 12,254

#3

Nice post keep post like this.