时间:2014-10-17 09:23:49 来源: 复制分享
Fedora安装完毕之后最头疼的问题就是软件更新,因为Fedora默认的更新源服务器是在国外,所以每次更新的速度奇慢!那么,我们是否可以修改Fedora的默认下载源呢?答案是可以的。目前国内有很多大学都提供了Fedora的更新包下载服务器,下载速度相对国外的快。下面以华中科技大学的源(http://mirrors.ustc.edu.cn/)为例(只能用在Fedora15、16、17,强烈建议在修改默认的下载源时候,先备份/etc/yum.repos.d/fedora.repo和/etc/yum.repos.d/fedora-updates.repo。 比如:cp /etc/yum.repos.d/fedora.repo 、/home/wyp/fedora.repo.bak)。
第一步:删除/etc/yum.repos.d下的所以文件,上面谈到了自己最好去备份,万一自己弄错了,可以恢复嘛。
rm -rf /etc/yum.repos.d/*第二步:将以下保存为 fedora-ustc.repo
[fedora]name=Fedora $releasever - $basearch - ustcfailovermethod=prioritybaseurl=http://mirrors.ustc.edu.cn/fedora/linux/releases/$releasever/Everything/$basearch/os/mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearchenabled=1metadata_expire=7dgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-debuginfo]name=Fedora $releasever - $basearch - Debug - ustcfailovermethod=prioritybaseurl=http://mirrors.ustc.edu.cn/fedora/linux/releases/$releasever/Everything/$basearch/debug/mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearchenabled=0metadata_expire=7dgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-source]name=Fedora $releasever - Source - ustcfailovermethod=prioritybaseurl=http://mirrors.ustc.edu.cn/fedora/linux/releases/$releasever/Everything/source/SRPMS/mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearchenabled=0metadata_expire=7dgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch第三步:将以下保存为 fedora-updates-ustc.repo
[updates]name=Fedora $releasever - $basearch - Updates - ustcfailovermethod=prioritybaseurl=http://mirrors.ustc.edu.cn/fedora/linux/updates/$releasever/$basearch/mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearchenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [updates-debuginfo]name=Fedora $releasever - $basearch - Updates - Debug -ustcfailovermethod=prioritybaseurl=http://mirrors.ustc.edu.cn/fedora/linux/updates/$releasever/$basearch/debug/mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearchenabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [updates-source]name=Fedora $releasever - Updates Source - ustcfailovermethod=prioritybaseurl=http://mirrors.ustc.edu.cn/fedora/linux/updates/$releasever/SRPMS/mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearchenabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch第四步:将 fedora-ustc.repo和 fedora-updates-ustc.repo放入/etc/yum.repos.d/中
第五步:运行sudo yum clean all和sudo yum makecache(当然,你是root用户就不要价sudo了)
符:其他国内的更新源
1. 搜狐的源
进入网站http://mirrors.sohu.com/,在左边找到fedora目录,点击该行右边的help, 然后
下载fedora-sohu.repo和fedora-updates-sohu.repo, 放入/etc/yum.repos.d/
运行yum makecache生成缓存
2. 163的源
进入网站 http://mirrors.163.com/,在左边找到fedora目录,点击改行右边的使用帮助,然后
下载fedora-163.repo和fedora-updates-163.repo, 放入/etc/yum.repos.d/
运行yum makecache生成缓存
运行命令 ls /etc/yum.repos.d 查看
3.上海交通大学的源http://ftp.sjtu.edu.cn/fedora/linux/releases/
上一篇:ps字体、笔刷、滤镜怎么安装教程
本文地址:软件教程 >> http://www.9xz.net/it/ruanjianjiaocheng/17590.html
下一篇:印象笔记·圈点如何使用小白教程