更新CentOS 6.7源为阿里源

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生成缓存

http://mirrors.aliyun.com/help/centos

时间: 2024-08-12 17:40:50

更新CentOS 6.7源为阿里源的相关文章

设置centos的yum仓库源为阿里源

前提 使我们的主机能够连接到外网 cd /etc/yum.repos.d/ #切换到yum仓库目录下 rm -rf * #删除默认配置仓库 wget -O /etc/yum.repos.d/CentOS.repo http://mirrors.aliyun.com/repo/CentOS-7.repo #下载阿里源的repo文件到主机仓库中 yum clean all 清除缓存 yum makecache 重新加载缓存 这样我们就能通过阿里的源安装软件了! 原文地址:https://www.cn

更改centos 7的源为阿里源

阿里源的网址在这里:http://mirrors.aliyun.com/repo/ 一.进入源文件存放目录 cd /etc/yum.repos.d 二.安装基本源: 1.如果要备份原来的源文件 sudo mv CentOS-Base.repo CentOS-Base.repo.bak 2.下载阿里源文件 sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 三.安装epel repo源: 1.下载ep

Saltstack设置安装源为阿里源

Saltstack设置安装源为官方源有时候在国内网络不好安装较慢或者安装不上,可设置为阿里源 比如对于 Centos 7 系统,在 saltstack 的官网提供的配置初始化手册是: sudo yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm 这时,你需要执行: sudo yum install https://mirrors.aliyun.com/saltstack/yum/r

Centos7修改yum源为阿里源(大数据预科02_2)

##保证可以上互联网,不知如何联网查看大数据预科02_1 (1).安装wget软件 yum install -y wget 安装完成最后显示Complete,表示安装成功(2). 查看yum源信息: yum repolist 目前yum连接的是国外网站,普通(fq貌似现在管个很严)下载限制多和速度非常!非常!非常慢!(3). 进入安装目录 cd /etc/yum.repos.d (4).备份旧的配置文件 mv CentOS-Base.repo CentOS-Base.repo.bak (5).

centos7修改yum下载源为阿里源

在国内很多yum源不好用,所以改成国内的源很有必要 首先,切换到yum源目录 cd /etc/yum.repos.d 备份一下 sudo mv CentOS-Base.repo CentOS-Base.repo.backup 下载阿里的源 sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 清理缓存 yum clean all 重新生成缓存 yum makecache

修改Ubuntu的aptget源为阿里源的方法

1.复制原文件备份 sudo cp /etc/apt/source.list /etc/apt/source.list.bak 2.编辑源列表文件 sudo vim /etc/apt/source.list 3.将原来的列表删除,添加如下内容 deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ vivid-secur

centos7 修改yum源为阿里源

cd /etc/yum.repos.d sudo mv CentOS-Base.repo CentOS-Base.repo.bak sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo yum clean all yum makecache

centos 7更换阿里源

转自 https://blog.csdn.net/jameshadoop/article/details/54881295 centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里 1.安装base reop源 cd /etc/yum.repos.d1接着备份旧的配置文件 sudo mv CentOS-Base.repo CentOS-Base.repo.bak1下载阿里源的文件 sudo wget -O CentOS-Base.repo http://mirro

CentOs Linux 对于 修改 yum源 为 阿里

修改yum源为阿里 备份本地yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak 2.获取阿里yum源配置文件 将 https://mirrors.tuna.tsinghua.edu.cn/help/centos/  中的内容粘贴到 CentOS-Base.repo 3.更新 cache yum clean all yum makecache 4.查看并更新 yum 源 yum -y upd