红联Linux门户
Linux帮助

fedora源的快速选择

发布时间:2008-05-22 21:34:43来源:红联作者:postnew
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镜像。

用这个方法可以简便的查找官方镜像,速度尚可。
文章评论

共有 0 条评论