Linux更换默认软件源
来源:互联网 发布:常用的nosql数据库 编辑:程序博客网 时间:2024/06/07 02:53
Ubuntu更换源
(1) 备份 /etc/apt/sources.list文件
cp /etc/apt/sources.list /etc/apt/sources.list_backup
(2) 打开sources.list文件,更换源,替换文件内容如下:
- 网易源
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
- 阿里源
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricteddeb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial main restricteddeb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricteddeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial universedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb http://mirrors.aliyun.com/ubuntu/ xenial multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-propertiesdeb http://archive.canonical.com/ubuntu xenial partnerdeb-src http://archive.canonical.com/ubuntu xenial partnerdeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricteddeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial-security universedeb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
(3) 执行更新操作
apt-get update
Centos更换源
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
- CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
- CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
- CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、生成缓存
yum makecache
阅读全文
0 0
- Linux更换默认软件源
- CentOS-5.11 更换默认软件源的方法
- linux 更换 软件源后 GPG错误
- linux 更换 软件源后 GPG错误
- Linux 默认软件源切换
- centos更换软件源
- ubuntu 更换软件源
- Ubuntu更换软件源
- Ubuntu更换软件源
- ubuntu更换软件源
- Ubuntu更换软件源
- Ubuntu更换软件源
- Ubuntu 更换软件源
- ubuntu更换软件源
- 树莓派更换软件源
- ubuntu linux 更换 阿里云 软件源 安装 svn
- Ubuntu如何更换软件源
- ubuntu 如何更换软件源
- google的glog日志管理
- 剑指offer面试题15 链表中倒数第K个结点
- 数据结构与算法(java)——链表
- 频道循环,每个子栏目下,自动加广告位
- 如何给100亿个数字排序?
- Linux更换默认软件源
- javascript之面向对象编程续
- Unity3d 序列目标点的移动
- 【剑指offer】题32:从1到n整数中1出现的次数
- spring 整合 redis,以及spring的RedisTemplate如何使用
- Python中join的简单用法
- 滑动窗口的中位数
- Hibernate学习笔记(二)
- 51nod 1675 序列变换