Centos7 yum源修改

1. 备份本地yum源

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

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

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

3.更新cache

yum makecache

4.查看

yum -y update

5.全过程

 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 

你可能感兴趣的:(Centos7 yum源修改)