成都ECS | 电信
CentOS7 修改yum源为阿里源
发布时间:2022-11-06 23:29
阅读量:3725
1.备份本地yum源
[root@bogon ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.获取阿里yum源配置文件
[root@bogon ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新yum缓存
[root@bogon ~]# yum makecache