先把原来的yum源改名让他失效
mv public-yum-ol7.repo public-yum-ol7.repo.bak
然后新建个yum源
[root@localhost yum.repos.d]# cat oel-media.repo [oel7.6-media] name=Oracle Linux $releasever Latest ($basearch) baseurl=file:///mnt/cdrom gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle [root@localhost yum.repos.d]#
然后重刷yum缓存即可 yum clean all yum makecache