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 - ustc failovermethod=priority baseurl=http://mirrors.ustc.edu.cn/fedora/linux/releases/$releasever/Everything/$basearch/os/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-debuginfo] name=Fedora $releasever - $basearch - Debug - ustc failovermethod=priority baseurl=http://mirrors.ustc.edu.cn/fedora/linux/releases/$releasever/Everything/$basearch/debug/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-source] name=Fedora $releasever - Source - ustc failovermethod=priority baseurl=http://mirrors.ustc.edu.cn/fedora/linux/releases/$releasever/Everything/source/SRPMS/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch第三步:將以下保存為 fedora-updates-ustc.repo
[updates] name=Fedora $releasever - $basearch - Updates - ustc failovermethod=priority baseurl=http://mirrors.ustc.edu.cn/fedora/linux/updates/$releasever/$basearch/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [updates-debuginfo] name=Fedora $releasever - $basearch - Updates - Debug -ustc failovermethod=priority baseurl=http://mirrors.ustc.edu.cn/fedora/linux/updates/$releasever/$basearch/debug/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [updates-source] name=Fedora $releasever - Updates Source - ustc failovermethod=priority baseurl=http://mirrors.ustc.edu.cn/fedora/linux/updates/$releasever/SRPMS/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=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/