linux使用阿里yum镜像

1.验证网络
ping mirrors.aliyun.com
2.删除原yum源
rm -rf /etc/yum.repos.d/*
3. 下载
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4.清缓存
yum clean all
5.缓存阿里源
yum makecache
6.查询源列表
yum repolist
7.更新
yum update

posted @ 2024-08-15 17:32  IT小菜鸟11  阅读(15)  评论(0)    收藏  举报