Centos7将yum源更换为国内源
Centos7将yum源更换为国内源
安装步骤
更换源
- 阿里云
1
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 清华源
1
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tuna.tsinghua.edu.cn/repo/Centos-7.repo
清理 YUM 缓存
1
2
sudo yum clean all
sudo yum makecache
验证新源
1
sudo yum repolist
epel包
1
yum install -y epel-release
本文由作者按照
CC BY 4.0
进行授权