超简单CentOS7配置yum源
1.打开centos的yum文件夹
cd /etc/yum.repos.d/
2.安装wget
yum -y install wget
3.用wget下载repo文件,选择下面其中一个即可
wget http://mirrors.aliyun.com/repo/Centos-7.repo wget http://mirrors.163.com/.help/CentOS7-Base-163.repo wget http://mirrors.163.com/.help/CentOS6-Base-163.repo wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
4.备份系统原来的repo文件
当前目录是/etc/yum.repos.d/,刚刚下载的Centos-7.repo也在这个目录上
mv CentOs-Base.repo CentOs-Base.repo.bak
5.替换系统原理的repo文件
mv Centos-7.repo CentOS-Base.repo
6.执行yum源更新命令
yum clean all
yum makecache
yum update