修改软件源为国内加速镜像(非原创)

来源:https://blog.yadgen.com/?p=2320&cpage=1
其他参考:http://ju.outofmemory.cn/entry/24249

通用
阿里云镜像 http://mirrors.aliyun.com
网易镜像 http://mirrors.163.com
搜狐镜像 http://mirrors.sohu.com

教育网
清华大学开源软件镜像 https://mirrors.tuna.tsinghua.edu.cn
中国科学技术大学开源软件镜像 https://mirrors.ustc.edu.cn

更多源

各系统软件源修改方法
CentOS

  1. 系统代号 版本

  2. squeeze 6.x

  3. wheezy 7.x

  4. jessie 8.x

  5. 备份原文件

  6. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

  7. 下载新的CentOS-Base.repo 到/etc/yum.repos.d/

  8. CentOS 5

  9. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

  10. CentOS 6

  11. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

  12. CentOS 7

  13. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

  14. 生成缓存

  15. yum makecache

Debina

  1. 备份原文件

  2. mv /etc/apt/sources.list /etc/apt/sources.list.bak

  3. 修改为阿里云的镜像源

  4. cat > /etc/apt/sources.list << END

  5. deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib

  6. deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib

  7. deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib

  8. deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib

  9. END

  10. 更新源列表信息 apt-get update

Ubuntu

  1. 系统代号 版本 LTS

  2. precise 12.04 true

  3. trusty 14.04 true

  4. vivid 15.04

  5. xenial 16.04 true

  6. zesty 17.04

  7. 备份原文件

  8. mv /etc/apt/sources.list /etc/apt/sources.list.bak

  9. 修改为阿里云的镜像源

  10. cat > /etc/apt/sources.list << END

  11. deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

  12. deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

  13. deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

  14. deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

  15. deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

  16. deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

  17. deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

  18. deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

  19. deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

  20. deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

  21. END

  22. 更新源列表信息

  23. apt-get update

Alpine

  1. 备份原始文件

  2. cp /etc/apk/repositories /etc/apk/repositories.bak

  3. 修改为国内镜像源

  4. echo "https://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories

你可能感兴趣的:(修改软件源为国内加速镜像(非原创))