美文网首页
CentOS 7 使用国内yum和epel源

CentOS 7 使用国内yum和epel源

作者: 萧萧飞叶 | 来源:发表于2019-03-08 21:34 被阅读0次
1、备份

首先进入/etc/yum.repos.d/目录下,新建一个repo_backup目录,用于保存系统中原来的repo文件

$ cd /etc/yum.repos.d

$ mkdir repo_backup

$ mv *.repo ./repo_backup

2、下载阿里云和网易 yum源

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

$ wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

3、安装epel源

$ yum install -y epel-release

$ wget https://mirrors.aliyun.com/repo/epel-7.repo

4、清除缓存

$ yum clean all && yum makecache

5、查看系统可用的源

$ yum repolist enabled


附录:Yum 命令参考

相关文章

网友评论

      本文标题:CentOS 7 使用国内yum和epel源

      本文链接:https://www.haomeiwen.com/subject/dygdpqtx.html