百度很多文章说删掉/etc/yum.repos.d目录下所有的原来的文件,
好点的让你备份一下。
其实我觉得没有必要,留着原始源总归踏实一些。
要国内源和原始国外源并存,需要安装一个选最快的源的程序:
sudo dnf install yum-fastestmirror
然后就可以安装国内源了:
cd /etc/yum.repos.d
下载(用其中一个就行,全用也不错,链接来自网络):
阿里巴巴的
sudo wget -O /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo
sudo wget -O /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo
网易:
sudo wget http://mirrors.163.com/.help/fedora-163.repo
sudo wget http://mirrors.163.com/.help/fedora-updates-163.repo
搜狐
sudo wget http://mirrors.sohu.com/help/fedora-sohu.repo
sudo wget http://mirrors.sohu.com/help/fedora-updates-sohu.repo
IDC云
sudo wget http://mirrors.yun-idc.com/fedora-cds.repo
sudo wget http://mirrors.yun-idc.com/fedora-updates-cds.repo
做完上述动作或许还要更新缓存:
yum makecache
然后再用DNF安装就能用这些国内源了,速度都很快。
又:清华和中科大的源也是非常好的,怎样添加在他们开源镜像网站上都有。
地址如下:
https://mirrors4.tuna.tsinghua.edu.cn/help/fedora/
http://mirrors.ustc.edu.cn/help/fedora.html