ubuntu server 更新源


ubuntu server  官方的源代码更新比较慢,所以更替成国内的源。

备份源文件:

sudo cp /etc/opt/sources.list /home/username/backup/

把下面的源更新到文件: sources.list

163源:

 
deb http://mirrors.163.com/ubuntu/ precise main restricted
 deb-src http://mirrors.163.com/ubuntu/ precise main restricted
 deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
 deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
 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-updates universe
 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-updates multiverse
 deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
 deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
 deb http://mirrors.163.com/ubuntu/ precise-security main restricted
 deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
 deb http://mirrors.163.com/ubuntu/ precise-security universe
 deb-src http://mirrors.163.com/ubuntu/ precise-security universe
 deb http://mirrors.163.com/ubuntu/ precise-security multiverse
 deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
 deb http://extras.ubuntu.com/ubuntu precise main
 deb-src http://extras.ubuntu.com/ubuntu precise main



SOHU源:

 
deb http://mirrors.sohu.com/ubuntu/ precise main restricted
 deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted
 deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
 deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
 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-updates universe
 deb http://mirrors.sohu.com/ubuntu/ precise multiverse
 deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
 deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
 deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
 deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
 deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
 deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted
 deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted
 deb http://mirrors.sohu.com/ubuntu/ precise-security universe
 deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe
 deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse
 deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse
 deb http://extras.ubuntu.com/ubuntu precise main
 deb-src http://extras.ubuntu.com/ubuntu precise main


当出现key无法找到时,然后执行
  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys < add keys here >
  sudo apt-get update

你可能感兴趣的:(ubuntu)