Centos7 更换国内的yum源

Centos7 更换国内的yum源

游戏|数码彩彩2024-04-09 7:42:32437A+A-

Centos7 更换国内的yum源

 

1、下载wget工具

yum install –y wget

2、进入yum源配置文件所在文件夹

cd /etc/yum.repos.d/

3、备份本地yum源

mv centos-Base.repo CentOS-Base.repo_bak

4、获取国内yum源(阿里、163二选一)

阿里云:

wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

163:

wget -O CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

5、清理缓存、重建缓存、升级linux系统
清理yum缓存:

yum clean all

重建缓存:

yum makecache

升级Linux系统:

yum -y update 
点击这里复制本文地址 版权声明:本文内容由网友提供,该文观点仅代表作者本人。本站(https://www.angyang.net.cn)仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

昂扬百科 © All Rights Reserved.  渝ICP备2023000803号-3网赚杂谈