配置apt-get高速下载源

http://blog.sina.com.cn/s/blog_8c6d7ff601018bne.html


本文转自:http://blog.csdn.net/hyl1718/article/details/7915296

今天刚装上Ubuntu Server 12,默认的apt-get源比较慢。更改一下源地址。

方法:

1、修改源地址:
cp /etc/apt/sources.list /etc/apt/sources.list.bak
vim /etc/apt/sources.list

加入如下内容(中科大的):

deb http://mirrors.ustc.edu.cn/ubuntu/precise-updates main restricted
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates mainrestricted
deb http://mirrors.ustc.edu.cn/ubuntu/ precise universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updatesuniverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updatesuniverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updatesmultiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updatesmultiverse
deb http://mirrors.ustc.edu.cn/ubuntu/precise-backports main restricted universemultiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports mainrestricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security mainrestricted
deb-src http://security.ubuntu.com/ubuntu precise-security mainrestricted
deb http://security.ubuntu.com/ubuntu precise-securityuniverse
deb-src http://security.ubuntu.com/ubuntu precise-securityuniverse
deb http://security.ubuntu.com/ubuntu precise-securitymultiverse
deb-src http://security.ubuntu.com/ubuntu precise-securitymultiverse

比较快的源:

搜狐源:
deb http://mirrors.sohu.com/ubuntu/ precise-updates mainrestricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates mainrestricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updatesuniverse
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updatesmultiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updatesmultiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports mainrestricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports mainrestricted universe multiverse

网易源:

deb http://mirrors.163.com/ubuntu/ precise-updates mainrestricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates mainrestricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updatesuniverse
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updatesmultiverse
deb http://mirrors.163.com/ubuntu/ precise-backports mainrestricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports mainrestricted universe multiverse

更新看看速度:

sudo apt-get update
sudo apt-get upgrade

你可能感兴趣的:(配置apt-get高速下载源)