Linux更换阿里yum源,银河麒麟v10更换yum源,centos更换yum源

 

1.备份本地yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak

 

2.获取阿里yum源配置文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或者手动下载http://mirrors.aliyun.com/repo/Centos-7.repo上传到 /etc/yum.repos.d 并重名为CentOS-Base.repo

或使用  sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

注:银河麒麟v10 操作系统需要centos8的repo

 

3.更新yum缓存
[root@bogon ~]# yum makecache

 

4.查看当前yum源
[root@bogon ~]# yum repolist

 

posted @ 2024-09-26 10:24  程序猿网友666  阅读(1267)  评论(0编辑  收藏  举报