配置apt-get的源

昨天在公司的云主机上面安装了ubuntu的系统(由于centos安装过程中出现了点问题),服务器在四川绵阳的电信机房,发现apt-get的源下载速度有点慢,所以在网上找了速度较快的源。

方法:
1、修改源地址:

 Bash |  copy code |? 
1
2
cp /etc/apt/sources.list /etc/apt/sources.list.bak
3
vim /etc/apt/sources.list
4

加入如下内容(中科大的):
 Bash |  copy code |? 
01
02
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
03
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
04
deb http://mirrors.ustc.edu.cn/ubuntu/ precise universe
05
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universe
06
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
07
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
08
deb http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
09
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
10
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
11
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
12
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
13
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
14
deb http://security.ubuntu.com/ubuntu precise-security main restricted
15
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
16
deb http://security.ubuntu.com/ubuntu precise-security universe
17
deb-src http://security.ubuntu.com/ubuntu precise-security universe
18
deb http://security.ubuntu.com/ubuntu precise-security multiverse
19
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
20

比较快的源:

搜狐源:

 Bash |  copy code |? 
01
02
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
03
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
04
deb http://mirrors.sohu.com/ubuntu/ precise universe
05
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
06
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
07
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
08
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
09
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
10
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
11
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
12
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
13
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
14

网易源:
 Bash |  copy code |? 
01
02
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
03
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
04
deb http://mirrors.163.com/ubuntu/ precise universe
05
deb-src http://mirrors.163.com/ubuntu/ precise universe
06
deb http://mirrors.163.com/ubuntu/ precise-updates universe
07
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
08
deb http://mirrors.163.com/ubuntu/ precise multiverse
09
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
10
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
11
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
12
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
13
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
14

更新看看速度:
 Bash |  copy code |? 
1
2
sudo apt-get update
3
sudo apt-get upgrade
4

本文出自 全栈笔记 版权所有,你可以在保留原文地址:配置apt-get的源 及作者的情况下到你的网站或博客。

【上一篇】
【下一篇】

您可能感兴趣的文章:

发表评论

您必须 登录 后才能发表评论。