正常情况下,除Redhat系统授权之后才可以正常使用网络yum配置,Centos等衍生版系统只能使用本地yum源,使用时会报错如下:

这时我们就需要先下载epel源,下载后即可正常使用
cd /etc/yum.repos.d/
rm -rf *
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum repolist all
原创文章,作者:AIRF,如若转载,请注明出处:http://www.ai-rf.com/index.php/2022/10/07/centos7%e4%b8%8b%e8%bd%bd%e7%bd%91%e7%bb%9cyum%e6%ba%90%e5%8f%8aepel%e6%ba%90/