[root@centos7 yum.repos.d]# vim base.repo
[base]
name=cdrom base
baseurl=file:///misc/cd
#gpgcheck=0
gpgkey=file:///misc/cd/RPM-GPG-KEY-CentOS-7 ### 启用key:安全检查,第一次安装软件会装上key
[epel]
name=aliyun epel
baseurl=https://mirrors.aliyun.com/epel/
r
e
l
e
a
s
e
v
e
r
/
releasever/
releasever/basearch/
gpgcheck=0
enabled=1
[root@localhost home]# yum clean all ### 清理缓存
[root@localhost home]# yum repolist ### 查看yum软件包列表