Centos-7修改yum源爲國內的yum源

國外地址yum源下載慢,下到一半就斷了,就這個緣由就修改它爲國內yum源地址

 

國內也就是ali 與 網易centos

 

以centos7爲例 ,以 修改成阿里的yum源post

 

1. 備份本地yum源centos7

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

 

2.獲取阿里yum源配置文件code

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

 

3.更新cacheget

 yum makecache it

 

4.查看class

 yum -y update 配置

 

5.最後你就能夠連接國內鏡像了,其實就是那個什麼城XXX的 。。。

 

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

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

yum makecache

yum -y update 

相關文章
相關標籤/搜索