• Ubuntu apt-get更新源替换及加速方法


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

    使用Ubuntu时,apt-get是很方便的一个工具,但默认使用的欧洲源,国内速度太慢。可以把更新源换成速度更快的镜像,并使用apt-fast去多线程更新。

    1、备份更新源文件
    $ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

    2、打开更新源文件编辑
    $ sudo gedit /etc/apt/sources.list

    3、根据UBUNTU版本,把全部内容替换为如下内容

    版本11.04
    deb http://ubuntu.uestc.edu.cn/ubuntu/ natty main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ natty-backports main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ natty-proposed main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ natty-security main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ natty-updates main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ natty main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ natty-backports main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ natty-proposed main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ natty-security main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ natty-updates main restricted universe multiverse

    版本11.10

    deb http://ubuntu.uestc.edu.cn/ubuntu/ oneiric main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-backports main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-proposed main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-security main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-updates main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ oneiric main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-backports main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-proposed main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-security main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ oneiric-updates main restricted universe multiverse

    版本12.04

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse


    4、更新系统
    $ sudo apt-get update
    $ sudo apt-get dist-upgrade

    5、安装apt-fast
    $ sudo add-apt-repository ppa:tldm217/tahutek.net
    $ sudo apt-get update   
    $ sudo apt-get install apt-fast
    默认使用4个线程下载,可以通过修改/etc/axelrc中的
    #num_connections = 4
    比如改为10,并去掉前面的"#"将下载线程改为10。

  • 相关阅读:
    HTML5存储
    HTML5全局属性和事件
    HTML5媒体(音频/视频)
    HTML5标签canvas制作动画
    HTML5标签canvas图像处理
    开发kendo-ui弹窗组件
    HTML5标签canvas制作平面图
    javascript匿名函数
    Javascript富文本编辑器
    快速排序算法(python版本)
  • 原文地址:https://www.cnblogs.com/wangchaoqun1997/p/6655957.html
Copyright © 2020-2023  润新知