加快 Fedora 10 里 yum 的下载速度

来源:互联网 发布:java jsonp跨域 编辑:程序博客网 时间:2024/06/02 10:37

Fedora 一直是一个优秀的发布版,可是因为源的问题,阻碍了它在中国的发展。

为了帮助新鲜的血液进入 Fedora 的大家庭,Felix特别奉上此文,供新手参考 :)

 

首先请切换到root用户:
su root

在开始之前,首先确保你安装了如下软件,补上尚未安装的。
执行以下命令:
yum -y install gcc make subversion

首先增加上海交大的更新源:
(如果你有更好的更新源段,欢迎评论给出,谢谢!)
cd /etc/yum.repos.d
gedit sjtu.repo

在打开的空白窗口中加入
[Fedora-ftp.sjtu.edu.cn]
name=Fedora 10 - i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/10/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Everything-ftp.sjtu.edu.cn]
name=Everything 10 - i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/10/Everything/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[updates-ftp.sjtu.edu.cn]
name=Fedora updates
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/updates/10/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

(注意大小写,网上有几篇文章中的大小写错误,会导致404 Not Found.)
然后保存退出。

然后依次执行:
yum makecache
yum -y install yum-fastestmirror
svn co svn://svn.debian.org/svn/axel/
cd ./axel/trunk
./configure
make && make install
svn co http://cnfreesoft.googlecode.com/svn/trunk/axelget/ /etc/yum/axelget
cd /etc/yum/pluginconf.d/
ln -s /etc/yum/axelget/axelget.conf .
cd /usr/lib/yum-plugins/
ln -s /etc/yum/axelget/axelget.py .

如果你使用sudo来运行yum,为了解决sudo下出现sh: axel: command not found
可以执行以下命令解决(Felix的原创方法^.^):
cd /usr/bin
ln -s /usr/local/bin/axel

参考资料:
1、http://www.renwenyue.com/2008/11/centosyum.html(此网站已打不开,从Google Cache中参考的)
2、http://pengjiayou.com/blog/sjtu-repository-for-fedora-10(此文中上交源URL中有一处大小写错误)

 

 

原文链接:http://www.ownlinux.cn/2009/01/31/improve-fedora-10-yum-download-speed/

<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

原创粉丝点击