Centos-7修改yum源为国内的yum源

 

国外地址yum源下载慢,下到一半就断了,就这个缘由就修改它为国内yum源地址centos

 

国内也就是ali 与 网易centos7

 

以centos7为例 ,以 修改成阿里的yum源spa

 

1. 备份本地yum源.net

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

 

2.获取阿里yum源配置文件blog

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

 

3.更新cacheclass

 yum makecache 配置

 

4.查看date

 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 

 

能够借鉴centos修改默认yum源地址  

相关文章
相关标签/搜索