yum配置阿里云源

打开centos的yum文件夹 cd /etc/yum.repos.d/
用wget下载repo文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo
如果wget命令不生效,说明还没有安装wget工具 yum -y install wget
备份系统原来的repo文件 mv CentOs-Base.repo CentOs-Base.repo.bak 即是重命名 CentOs-Base.repo -> CentOs-Base.repo.bak
替换系统原理的repo文件 mv Centos-7.repo CentOs-Base.repo 即是重命名 Centos-7.repo -> CentOs-Base.repo
执行yum源更新命令 yum clean all yum makecache yum update

猜你喜欢

转载自blog.csdn.net/weixin_45521583/article/details/113140929