[2018-08-26]-[CentOS]CentOS更新yum源为阿里云

本文演示CentOS_7.x_64系统更新yum源为阿里云
本文属于我的技术分享,如有错误或遗漏,请联系并在作更改。

CentOS更新yum源

安装wget(若已安装了wget,则跳过此步)

第一步:安装wget;缓存

yum install wget -y

image.png

CentOS更新yum源为阿里云

第一步:备份/etc/yum.repos.d/CentOS-Base.repo;阿里云

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

image.png

第二步:进入yum源配置文件所在文件夹;spa

cd /etc/yum.repos.d/

第三步:下载aliyun的yum源配置文件,放入/etc/yum.repos.d/下,并更更名称为CentOS-Base.repo;code

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

image.png

第四步:运行yum makecache生成缓存;rem

yum makecache

image.png

第四步:更新yumget

yum -y update

第五步: 完毕it

相关文章
相关标签/搜索