# 操作1、安装EPEL官方源
yum install -y epel-release
# 操作2、配置EPEL国内源
# 下载阿里epel配置文件
wget -O /etc/yum.repos.d/epel.repo \
http://mirrors.aliyun.com/repo/epel-7.repo
# 刷新缓存
yum clean all && yum makecache && yum repolist
# 将 CentOS 7 的官方 GPG 公钥导入到 RPM 数据库中
# 这个公钥用于验证来自 CentOS 7 官方仓库的软件包的签名
# 导入公钥后,在执行 yum install 或 yum update 命令就不会遇到
# 关于缺少公钥的警告
# CentOS 7 的官方 GPG 公钥一般存放在/etc/pki/rpm-gpg/
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# 验证EPEL国内源是否配置成功
yum install -y nginx
# 将EPEL软件包更新到最新版
yum update -y