CentOS 6 如何切换阿里云源 yum源

2020-12-18  本文已影响0人  草帽路飞S

cd/etc/yum.repos.d/

mkdir bak

mv * bak/

vi /etc/yum.repos.d/CentOS-Base.repo

内容如下:

=====================================================================================

[base]name=CentOS-6.10enabled=1failovermethod=priority

baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/os/$basearch/

gpgcheck=1gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6[updates]name=CentOS-6.10enabled=1failovermethod=priority

baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/updates/$basearch/

gpgcheck=1gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6[extras]name=CentOS-6.10enabled=1failovermethod=priority

baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/extras/$basearch/

gpgcheck=1gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

=====================================================================================

执行命令:

yum clean all

yum makecache

上一篇下一篇

猜你喜欢

热点阅读