美文网首页
(转)CentOS 7 国内源配置

(转)CentOS 7 国内源配置

作者: 北游_ | 来源:发表于2018-05-26 17:41 被阅读11次

CentOS 7 国内源配置

#### 1. 备份自带源
# 首先要确认你有 wget 命令, 并且连着网
# cd /etc/yum.repos.d/
# mkdir repo
# mv *.repo repo

2. 下载国内源文件

# cd /etc/yum.repos.d/

# 1). 下载 CentOS7 源文件地址
# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

# 2). 因为网易没有 epel 源 所以要从阿里下载
# wget http://mirrors.aliyun.com/repo/epel-7.repo

3. 清除并初始化源数据缓存

# 1). 清除源数据缓存
# yum clean all

# 2). 初始化源数据缓存
# yum makecache

相关文章

网友评论

      本文标题:(转)CentOS 7 国内源配置

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