CentOS7换源
程序员文章站
2022-06-02 18:51:36
...
1. 备份源
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# mv ./CentOS-Base.repo ./CentOS-Base.repo.bak
2. 下载网易163源
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
3. 清除旧包
yum clean all
4. 设置成默认源并生成缓存
[[email protected] yum.repos.d]# mv CentOS7-Base-163.repo CentOS-Base.repo
[[email protected] yum.repos.d]# yum makecache