centos 6更改yum

环境:

OS:Centos 6

 

1.备份现有repo仓库
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup


2.使用阿里云仓库repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo --insecure
curl http://www.xmpan.com/Centos-6-Vault-Aliyun.repo
#https链接报错就用http


3.更新yum
yum clean all
yum makecache

posted @ 2023-11-07 09:40  slnngk  阅读(24)  评论(0编辑  收藏  举报