设置Debian,Gentoo,Ubuntu选择最快源

各位同学,我们曾在上篇小做《Fedora 15 安装与配置一览》中提出Fedora 可安装‘自动选择最快镜像插件’。不少其他发行版用户感慨,若是似Debian,Gentoo,Ubuntu等大众发行版本也能自动选择最快源甚好。今天,就给大家圆梦。继续阅读吧。

#1,,Debian

Debian下的Netselect-apt是一款很有用的插件,可帮助Debian自动选择最快镜像来下载升级软件包。

安装:

apt-get install netselect-apt

netselect-apt 相关参数介绍:

-f : 使用FTP镜像代替HTTP镜像;

-n : 给选择的最快镜像添加非自由软件源

使用netslect-apt之后,会在目录下面生产source.list,可以用它来代替目前使用的source.list

命令:

mv /etc/apt/sources.list /etc/apt/sources.list.save

cp $HOME/sources.list /etc/apt/

apt-get update

$HOME指的是你的主目录,netselect-apt产生的source.list在主目录下。

#2,Gentoo

Gentoo下面,大家可以使用mirroselect这个工具帮助你自动选择最快镜像。

安装:

emerge app-portage/mirrorselect

完整完成后,可使用下面命令自动选择最快镜像:

mirrorselect -i -o >> /mnt/gentoo/etc/make.conf

mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf

若是选择rsync-mirror,找到最快源服务器,可使用下面命令

mirrorselect -s3 -b10 -o -D >> /etc/make.conf

#3,Ubuntu

Ubuntu下面可以使用Ubuntu mirror这一图形界面。

首先,从‘系统—-管理—–启动新立得软件管理器’。选择‘设置—升级源(Repositories)’。Select Ubuntu Software tab In the Download From drop down, choose Other ->

Click the Select Best Server button in the resulting dialog.Wait until all the tests are done.

测试完毕后,最快服务器会高亮显示,选择即可,重新加载软件列表即可。

然后,使用下面命令可将生成的最快软件源替代目前使用的软件源列表:

mv /etc/apt/sources.list /etc/apt/sources.list.save

cp $HOME/sources.list /etc/apt/

apt-get update

其中,生成的最快软件列表在$HOME下。

出门走好路,出口说好话,出手做好事。

设置Debian,Gentoo,Ubuntu选择最快源

相关文章:

你感兴趣的文章:

标签云: