CENTOS_7_x86_64换yum源

1:查看当前yum源:

yum repolist

2:更换yum源

2-1:备份原yum源

cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2-2:下载华为云yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo

2-3:清理原yum源缓存

yum clean all

2.4:建立元数据

yum makecache

posted @ 2024-02-29 11:48  Tangikru  阅读(75)  评论(0编辑  收藏  举报