歡迎您光臨本站 註冊首頁

fedora源的快速選擇

←手機掃碼閱讀     火星人 @ 2014-03-25 , reply:0

fedora的yum配置文件/etc/yum.repos.d/fedora.repo:

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://fedora.candishosting.com.cn/pub/fedora/linux/releases/8/Everything/i386/os
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

<以下省略>

首先關注配置文件開頭

name=Fedora $releasever - $basearch

對於本人的系統(fedora8狼人vmware安裝)$releasever=8,$basearch=i386

再看第四行,原本是被註釋掉的,解除註釋后成為yum真正使用的鏡像地址

接著看第五行,原本未被註釋,所指示的是鏡像列表的地址,這個地址實際上是個動態頁面,根據『?』后的內容返回不同的鏡像地址,將$releasever=8,$basearch=i386代入后,返回的內容為:

# repo = fedora-8 arch = i386 country = CN country = RU country = JP country = HK country = PK country = KR country = TW country = TR country = TH country = IN http://fedora.candishosting.com.cn/pub/fedora/linux/releases/8/Everything/i386/os http://ftp.itu.edu.tr/Mirror/Fedora/linux/releases/8/Everything/i386/os http://seeder.yandex.net/fedora/linux/releases/8/Everything/i386/os http://dispenser.yandex.net/fedora/linux/releases/8/Everything/i386/os http://allotter.yandex.net/fedora/linux/releases/8/Everything/i386/os http://ftp.chg.ru/pub/Linux/fedora/linux/releases/8/Everything/i386/os http://spreader.yandex.net/fedora/linux/releases/8/Everything/i386/os http://fedora.mirrors.firstnetcom.com/fedora/releases/8/Everything/i386/os ftp://203.200.188.111/pub/fedora/linux/releases/8/Everything/i386/os http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/8/Everything/i386/os http://ftp.kddilabs.jp/Linux/packages/fedora/releases/8/Everything/i386/os http://ftp.twaren.net/Linux/Fedora/linux/releases/8/Everything/i386/os http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/releases/8/Everything/i386/os http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/8/Everything/i386/os http://opensource.nchc.org.tw/fedora/linux/releases/8/Everything/i386/os http://linux.ntcu.net/ftp/dists/fedora/releases/8/Everything/i386/os http://ftp.cse.yzu.edu.tw/pub/Linux/Fedora/releases/8/Everything/i386/os http://ftp.rhd.ru/pub/fedora/linux/releases/8/Everything/i386/os http://ftp.riken.jp/Linux/fedora/releases/8/Everything/i386/os http://ftp.kaist.ac.kr/pub/fedora/linux/releases/8/Everything/i386/os

還可添加country屬性:

http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=i386&country=CN

返回:

# repo = fedora-8 arch = i386 country = CN http://fedora.candishosting.com.cn/pub/fedora/linux/releases/8/Everything/i386/os

這是中國(CN)的fedora8版本i386鏡像。

用這個方法可以簡便的查找官方鏡像,速度尚可。

[火星人 ] fedora源的快速選擇已經有762次圍觀

http://coctec.com/docs/linux/show-post-165773.html