想要让你的apt-get速度快到没朋友吗,想就进来瞅瞅

如果在你安装有ubuntu系统机器上经常感到apt-get安装速度过慢,那么这里就有几种改善这一情况的方法。
你有没有考虑过改变正被使用的默认镜像站点?你有没有排除因特网连接的上游宽带成为瓶颈的可能?
如果不是这些原因,你可以尝试第三个选择:使用apt-fast工具。apt-fast实际上是一个困扰apt-get和aptitude所写
的shell脚本容器,它能加速包的下载速度。apt-fast本质上采用aria2下载工具,这款工具能够以“块”的方式从多个
镜像并行下载一个文件。

在Ubuntu14.04或者10版本如下:
$ sudo add-apt-repository ppa:saiarcot895/myppa
$ sudo apt-get update
$ sudo apt-get install apt-fast

在Ubuntu11.04到13.10版本如下:
$ sudo apt-get-repository ppa:apt-fast/stable
$ sudo apt-get update
$ sudo apt-get install apt-fast

在安装期间需要选择默认的软件包管理器,如果你的系统有多个软件包管理器,那么就会提示你让你选择的,
选择你最常用的就好,一般是apt-get。笔者的机器只有一个软件包管理器,就没有出现这个步骤,直接默认
是apt-get。
接着就是最大的连接数。使用过Uget这款下载工具的朋友估计都知道aria2,所以,最好将默认的连接
数5改成16,这样速度能快不少。
下一步直接选择NO(或者 否 )。
这些配置都可以在/etc/apt-fast.conf里面配置。不是说现在配置了就不好修改。

好了,开始配置apt-get,或者说配置apt-fast:
完成安装后,你需要在/etc/apt-fast.conf里配置apt-fast使用的一系列镜像。
你可以去 https://launchpad.net/ubuntu/+archivemirrors 这个网址选择那些地理位置上靠近你的镜像。
$ sudo vim /etc/apt-fast.conf
添加以下代码:
MIRRORS=(‘http://mirror.lzu.edu.cn/ubuntu/,[url]ftp://mirror.lzu.edu.cn/ubuntu/[/url],[url]http://mirrors.aliyun.com/ubuntu/[/url],[url]http://ubuntu.cn99.com/ubuntu/[/url],[url]http://ftp.sjtu.edu.cn/ubuntu/[/url],[url]ftp://ftp.sjtu.edu.cn/ubuntu/[/url],[url]http://mirror.neu.edu.cn/ubuntu/[/url],[url]http://mirrors.163.com/ubuntu/[/url],[url]http://mirrors.sohu.com/ubuntu/[/url],[url]ftp://mirrors.sohu.com/ubuntu/[/url],[url]http://mirrors.tuna.tsinghua.edu.cn/ubuntu/[/url],[url]http://mirrors.ustc.edu.cn/ubuntu/[/url],[url]ftp://mirrors.ustc.edu.cn/ubuntu/[/url],[url]http://mirrors.yun-idc.com/ubuntu/[/url],[url]ftp://mirrors.yun-idc.com/ubuntu/[/url],[url]http://mirrors.zju.edu.cn/ubuntu/[/url],[url]http://mirrors.skyshe.cn/ubuntu/[/url],[url]http://mirror.bjtu.edu.cn/ubuntu/[/url],[url]ftp://mirror.bjtu.edu.cn/ubuntu/[/url],[url]http://mirrors.cug.edu.cn/ubuntu/[/url],[url]http://mirrors.hust.edu.cn/ubuntu/[/url],[url]http://mirrors.hustunique.com/ubuntu/[/url],[url]http://mirrors.oss.org.cn/ubuntu/[/url],[url]http://ubuntu.cnssuestc.org/ubuntu/[/url],[url]http://ubuntu.dormforce.net/ubuntu/[/url],[url]http://ubuntu.uestc.edu.cn/ubuntu/[/url],[url]http://free.nchc.org.tw/ubuntu/[/url],[url]ftp://free.nchc.org.tw/ubuntu[/url],[url]http://tw.archive.ubuntu.com/ubuntu/[/url],[url]ftp://tw.archive.ubuntu.com/ubuntu/[/url],[url]http://ftp.ubuntu-tw.net/mirror/ubuntu/[/url],[url]ftp://ftp.ubuntu-tw.net/mirror/ubuntu/[/url],[url]http://ftp.nsysu.edu.tw/Ubuntu/ubuntu/[/url],[url]http://ftp.stust.edu.tw/pub/Linux/ubuntu/[/url],[url]ftp://ftp.stust.edu.tw/pub/Linux/ubuntu/[/url],[url]http://ftp.tc.edu.tw/Linux/ubuntu/[/url],[url]ftp://ftp.tc.edu.tw/Linux/ubuntu/[/url],[url]http://ftp.tku.edu.tw/ubuntu/[/url],[url]ftp://ftp.tku.edu.tw/ubuntu/[/url],[url]http://ftp.yzu.edu.tw/ubuntu/[/url],[url]ftp://ftp.yzu.edu.tw/ubuntu/[/url],[url]http://ftp.ntou.edu.tw/ubuntu/[/url],[url]ftp://ftp.ntou.edu.tw/ubuntu/[/url],[url]http://ubuntu.cs.nctu.edu.tw/ubuntu/[/url],[url]ftp://ubuntu.cs.nctu.edu.tw/ubuntu/[/url],[url]http://ubuntu.stu.edu.tw/ubuntu/[/url],[url]ftp://ubuntu.stu.edu.tw/ubuntu/[/url],[url]http://mirror01.idc.hinet.net/ubuntu/[/url],[url]http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/[/url],[url]ftp://ftp.cuhk.edu.hk/pub/Linux/ubuntu/[/url],[url]http://ubuntu.01link.hk/[/url],[url]http://ubuntu.uhost.hk/’[/url])

当然也可以选择性的添加。笔者只是将中国大陆,台湾,香港的所有镜像列了出来。
自己添加的话要注意格式:
MIRRORS=(‘[镜像1],[镜像2],…’)

好了全部完成了,如何使用?
和apt-get基本一样。
比如:sudo apt-get update 换成 sudo apt-fast update
sudo apt-get dist-upgrade 换成 sudo apt-fast dist-upgrade
等等。

Over…

[

挺简单的啊,真正要操作的很少。只是有太多的描述性语句;Pdfefe

有人看,没人回复,桑心:'(。

别伤心,一大批回复正在接近!

mark一下~:5_104:

要找几个比较靠谱的源,这个好像不会对源进行签名验证?对源的安全性需要自己注意哦:)

我只是把大多数都列了出来,而且这个和apt-get有不小的区别,不往系统的源里添加这些镜像,有点类似hosts文件。下载东西确实能快一些。
选择性的添加。163,cn99,sohu,aliyun……,这些都是比较靠谱的。

哈哈,thanks!

谢谢:loveliness:

版主,你筛选一些比较靠谱的源吧;Pdfefe。
我现在看着那一片就闹心,当时怎么就光顾着复制粘贴来着:Q

我把软件和更新里的源改为163之后,不管是安装软件还是系统更新,速度都很快,没必要用apt-fast了

恩恩,apt-fast是最近出来的新方式。所以把这个方式分享给大家。

镜像站表示不喜欢

根据个人喜好了。出来新技术,当然不可能人人买账。:loveliness:

我也试一试、!

恩恩,多多尝试

据说阿里的很快,是不是?

还不错,具体不清楚。阿里,163,cn99,中科大,浙大都还不错

ubuntu啊ubuntu