编辑epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
#mirrorlist=https://mirrors.Fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
这些做完以后要删除/etc/pki/rpm-gpg/的文件
把epel中新的文件下载放入其中
[root@linuxidc ~]# ls /etc/pki/rpm-gpg/
RPM-GPG-KEY-EPEL-7
RPM-GPG-KEY-CentOS-7
更多YUM相关教程见以下内容:
RHEL7 本地yum源配置 https://www.linuxidc.com/Linux/2017-01/139140.htm
CentOS 6.5 配置本地Yum源 https://www.linuxidc.com/Linux/2017-04/143127.htm
CentOS 7 使用阿里云的yum源、PIP源 https://www.linuxidc.com/Linux/2017-01/13966.htm
CentOS及Red Hat Linux安装yum源 https://www.linuxidc.com/Linux/2017-02/140205.htm
CentOS 7更改yum源与更新系统 https://www.linuxidc.com/Linux/2017-01/140067.htm
RedHat7.0配置本地yum源 https://www.linuxidc.com/Linux/2017-01/139148.htm
RedHat Linux 7安装CentOS 7 yum源 https://www.linuxidc.com/Linux/2017-04/142444.htm
软件包管理之前端管理工具yum https://www.linuxidc.com/Linux/2017-02/140270.htm
CentOS 7 使用阿里云的yum源、PIP源 https://www.linuxidc.com/Linux/2017-01/13966.htm
Linux yum的配置使用和程序包的编译安装 https://www.linuxidc.com/Linux/2017-09/146903.htm
YUM命令使用示例 https://www.linuxidc.com/Linux/2018-01/150690.htm
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx