Ubuntu
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo vim /etc/apt/sources.list
国内常用源列表
- 网易163更新服务器(广东广州电信/联通千兆双线接入), 包含其他开源镜像:
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
- 阿里云更新服务器(北京万网/浙江杭州阿里云服务器双线接入), 包含其他开源镜像:
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
- 中国科学技术大学更新服务器(位于合肥,千兆教育网接入,百兆电信/联通线路智能路由),由 中科大 Linux 用户协会和 中科大学网络信息中心维护, 包含其他开源镜像, Deepin 官方服务器 实际亦指向此处:
deb http://debian.ustc.edu.cn/ubuntu/ trusty main multiverse restricted universe deb http://debian.ustc.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe deb http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe deb http://debian.ustc.edu.cn/ubuntu/ trusty-security main multiverse restricted universe deb http://debian.ustc.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe deb-src http://debian.ustc.edu.cn/ubuntu/ trusty main multiverse restricted universe deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-security main multiverse restricted universe deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-updates main multiverse restricted universecentos
首先备份/etc/yum.repos.d/CentOS-Base.repo
下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份),阿里云修改文件名为 CentOS-Base-aliyun.repo
- http://mirrors.163.com/.help/CentOS5-Base-163.repo
- http://mirrors.163.com/.help/CentOS6-Base-163.repo
- http://mirrors.aliyun.com/repo/Centos-5.repo
- http://mirrors.aliyun.com/repo/Centos-6.repo
运行以下命令生成缓存
yum clean all yum makecache
Fedora
1、备份
mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.backup
mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.backup
2、下载新的fedora.repo和fedora-updates.repo 到/etc/yum.repos.d/
fedora
wget -O /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo
fedora updates
wget -O /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo