[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

相關文章
相關標籤/搜索