zoukankan      html  css  js  c++  java
  • 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。

  • 相关阅读:
    Mycat 注解说明
    Mycat 读写分离详解
    Mycat 常用管理命令说明
    Mycat 分片规则详解--数据迁移及节点扩容
    Mycat 分片规则详解--一致性hash分片
    Mycat 分片规则详解--日期范围 hash 分片
    Mycat 分片规则详解--自然月分片
    Mycat 分片规则详解--单月小时分片
    Mycat 分片规则详解--日期(天)分片
    Mycat 分片规则详解--应用指定分片
  • 原文地址:https://www.cnblogs.com/wangchaoqun1997/p/6655957.html
Copyright © 2011-2022 走看看