linux - 更新阿里的镜像源 -记录


可能需要安装wget
yum install wget

更新阿里的数据源
1、yum源进行备份
进入到yum源的配置文件中
执行命令如下:cd /etc/yum.repos.d
将yum源进行备份:mv Centos-Base.repo Centos-Base.repo.bak
2、获取阿里的yum源配置文件
执行命令:wget -O Centos-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、对yum源生成缓存
执行命令:yum makecache
4、更新yum源
执行命令:yum -y install update

 

posted @ 2023-05-29 15:07  岑惜  阅读(349)  评论(0)    收藏  举报