标签:code make yum comm ash bash repo dream centos7
以下为修改Centos7的yum源:
1. 备份原镜像文件,便于后期恢复
[root@keepmydream ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载新的CentOS-Base.repo 到/etc/yum.repos.d/
Centos6 阿里云yum源地址:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Centos7 阿里云yum地址:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
Centos6 163yum源地址:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
Centos7 163yum源地址:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
3. 清除缓存
yum clean all
4. 生成缓存
yum makecache
yum makecache
标签:code make yum comm ash bash repo dream centos7
原文地址:https://www.cnblogs.com/leelice/p/12299932.html