发表于 2019-2-19 07:46:32

配置Linux软件下载源(Ubuntu)

  由于ubuntu 的默认源是国外的,下载软件速度非常慢,并且经常下载失败,下面主要是介绍一种如何添加国内源作为软件下载源的简单方法。
  1.软件下载源的配置文件的路径:/etc/apt/sources.list
  http://s1.运维网.com/images/20180720/1532050178889851.png
  

  2.添加下载源地址

  (1)打开“Software&Updates”。直接双击“sources.list”文件也可以打开“Software&Updates”。显示对话框如下所示。
  

  http://s1.运维网.com/images/20180720/1532051267291834.png
  http://s1.运维网.com/images/20180720/1532050246724420.png
  

  (2)点击“Other Software”->“Add...”,打开对话框如下。

  http://s1.运维网.com/images/20180720/1532050392320693.png
  

  (3)将需要添加的下载源地址添加到“APT line”中,点击“Add Source”。
  http://s1.运维网.com/images/20180720/1532050491615868.png
  

  3.更新源列表
   sudo apt-get update
   sudo apt-get upgrade
http://s1.运维网.com/images/20180720/1532050749455392.png
http://s1.运维网.com/images/20180720/1532050827331441.png
  

  附件:从网络中收集的下载源地址:
  
  #tsing hua mirror site

[*]  deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe
[*]  deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe
[*]  deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe
[*]  deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe
[*]  deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe
[*]  deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe
[*]  deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe
[*]  deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe
[*]  deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe
[*]  deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe
  #163 mirror site

[*]  deb http://mirrors.163.com/debian/ lenny main contrib non-free
[*]  deb-src http://mirrors.163.com/debian lenny main contrib non-free
[*]  deb http://mirrors.163.com/debian-security/ stable/updates main
[*]  deb-src http://mirrors.163.com/debian-security/ stable/updates main
[*]  deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
[*]  deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
[*]  deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
[*]  deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
[*]  deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
[*]  deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
[*]  deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
[*]  deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
[*]  deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
[*]  deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
[*]
  #official mirror site

  
  deb http://ftp.debian.org/debian/ lenny main contrib non-free
  deb-src http://ftp.debian.org/debian/ lenny main contrib non-free
  deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
  deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free
  deb http://security.debian.org/ stable/updates main
  deb-src http://security.debian.org/ stable/updates main
  deb http://volatile.debian.org/debian-volatile stable/volatile main
  deb-src http://volatile.debian.org/debian-volatile stable/volatile main
  # ustc debian-multimedia
  deb http://debian.ustc.edu.cn/debian-multimedia/ stable main
  deb-src http://debian.ustc.edu.cn/debian-multimedia/ stable main
  # ustc debian-security
  deb http://debian.ustc.edu.cn/debian-security/ stable/updates main non-free contrib
  deb-src http://debian.ustc.edu.cn/debian-security/ stable/updates main non-free contrib



页: [1]
查看完整版本: 配置Linux软件下载源(Ubuntu)