CentOS7修改为国内yum源

CentOS7修改为国内yum源

命令

cd /etc/yum.repos.d/
mv *.repo /tmp/yum
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all # 清除系统所有的yum缓存
yum makecache # 生成yum缓存
yum list | grep epel-release
yum install -y epel-release
yum clean all
yum makecache
yum repolist enabled
yum repolist all

猜你喜欢

转载自blog.csdn.net/qq_43645782/article/details/108838972