Ubuntu的源

/etc/apt/sources.list

sudo apt-get update

deb http://mirrors.163.com/ubuntu/ natty main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ natty-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ natty-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ natty-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ natty-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ natty main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ natty-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ natty-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ natty-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ natty-backports main restricted universe multiverse

deb http://archive.canonical.com/ lucid partner

deb-src http://archive.canonical.com/ lucid partner

apt-spy

使用方法: apt-spy [options]

选项:

-d distribution 选择 debian 的发行版本,例如 stable 。除升级外,必须使用此参数。

-a area 选择进行测试的区域 ,例如 Aisa 。

-c config 指定配置文件。

-e number 指定测试的服务器数量。

-f file 测试时抓取制定的文件(文件相对 debian base 的路径)。

-i file 指定输入的文件,配合 -w 参数使用。

-m mirror-list 指定要升级的镜像列表文件。

-o output-file 重定向输出到指定文件。

-p proxy 指定使用的代理服务器,需要遵从 [server]:[port] 的格式。

-s country_list 指定要进行测试的国家。不能和 -a 参数同时使用。

-t time 指定进行测试时每台服务器的超时时间,只能是正整数。

-u update-URL 从指定的 URL 获得镜像列表更新。

-w file 输出 -i 参数提供的服务器列表中速度最快的前几台镜像服务器(缺省是前 5 台)。

-n number 制定 -w 参数输出的服务器数量。

-v 输出版本信息。

-h 输出当前帮助信息

update 升级镜像站点列表。

有意思的是网上常见的文档都只介绍了很少几个参数的作用,所以看到好多“二手文档”里面说测试镜像服务器速度的时候(apt-spy -d testing -A Asia)需要很长时间。其实,只要加一个参数 -t 指定超时时间就可以大大加速这个过程(至少快 10 倍)。


猜你喜欢

转载自buralin.iteye.com/blog/1222615