1、直接安装报错 当前系统为rhel7.0
[root@localhost home]# yum install epel-release
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package epel-release available.
Error: Nothing to do
2、下载安装包
[root@localhost home]# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
--2021-01-31 13:11:28-- http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.60.24, 38.145.60.22, 38.145.60.23
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.60.24|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15448 (15K) [application/x-rpm]
Saving to: ‘epel-release-latest-7.noarch.rpm’
100%[===========================================================================================>] 15,448 3.76KB/s in 4.0s
2021-01-31 13:11:33 (3.76 KB/s) - ‘epel-release-latest-7.noarch.rpm’ saved [15448/15448]
[root@localhost home]# ls
epel-release-latest-7.noarch.rpm liujiaxin01
3、安装
[root@localhost home]# yum install epel-release-latest-7.noarch.rpm
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Examining epel-release-latest-7.noarch.rpm: epel-release-7-13.noarch
Marking epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-13 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Installing:
epel-release noarch 7-13 /epel-release-latest-7.noarch 25 k
Transaction Summary
=====================================================================================================================================
Install 1 Package
Total size: 25 k
Installed size: 25 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-13.noarch 1/1
Verifying : epel-release-7-13.noarch 1/1
Installed:
epel-release.noarch 0:7-13
Complete!