Home > 系统管理 > [Linux]Ubuntu修改apt-get镜像地址提高下载速度

[Linux]Ubuntu修改apt-get镜像地址提高下载速度

Ubuntu安装后默认使用的是Ubuntu.com作为资源下载地址,在国内软件包的下载速度奇慢,因此需要修改下载镜像站点地址。通常有两种方法可以修改apt-get的镜像地址以提高apt-get下载速度。

方法1.直接下载镜像的sources.list
方法2.手动修改sources.list


方法1.以163镜像为例,Ubuntu12.04

cd /etc/apt/
mv sources.list sources.list.bak
# curl -0 http://mirrors.163.com/.help/sources.list.precise
wget http://mirrors.163.com/.help/sources.list.precise
mv sources.list.precise sources.list

方法2.以163镜像为例,Ubuntu12.04

vi /etc/apt/sources.list

在文件的头部加入以下内容,以163镜像为例,Ubuntu12.04

deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse

参考地址
http://mirrors.163.com/.help/ubuntu.html
http://www.cnblogs.com/top5/archive/2009/10/07/1578815.html

Categories: 系统管理 Tags: ,
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.