如何在 Centos7 中使用阿里云的yum源

1. 备份原来的yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2. 下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/

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

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

执行结果如下图:

3. 清理缓存

sudo yum clean all

执行结果:

4. 生成新的缓存

sudo yum makecache

执行结果:

原文地址:https://www.cnblogs.com/davidshen/p/10489815.html

时间: 2024-08-29 13:11:15

如何在 Centos7 中使用阿里云的yum源的相关文章

CentOS7用阿里云Docker Yum源在线安装Docker

一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq.aliyun.com/articles/110806 二.安装步骤1.删除已安装的Docker # Uninstall installed docker sudo yum remove docker docker-client docker-client-latest docker-common d

更改yum源为阿里云的yum源

更改centos6的yum源为阿里云的yum源 方法: 1.进入到/etc/yum.repos.d/目录下,备份之前的CentOS-Base.repo地址. cd /etc/yum.repos.d/ mv CentOS-Base.repo CentOS-Base.repo.bak 2.下载阿里云yum源 centos6:wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo centot5:wget -O Cen

更改yum网易 阿里云的yum源。

一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/CentOS-Base.repomv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)http://mirrors.1

CemtOS7更改yum网易 阿里云的yum源。

一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份) http://mirror

redhat7配置阿里云的yum源并安装httpd服务  

1.配置yum源 [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/ gpgcheck=1 enabled=1 gpgkey=http://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 2.更新yum源 y

Centos7 使用阿里云的yum源

1. 备份原来的yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2. 下载新的CentOS-Base.repo 到/etc/yum.repos.d/ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/C

阿里云作为yum源操作

阿里云提供的yum镜像地址为:https://opsx.alibaba.com/mirror 找到自己的使用系统,点击帮助,可以查看更换说明 替换centOS的yum源,如下图 具体操作: 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/y

阿里云linux yum源配置

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 或者 curl -o /etc/yum.repos.d/C

Ubuntu系统中登陆阿里云服务器的方法

如果您购买了阿里云服务器,恰巧又在使用Ubuntu操作系统,那么恭喜你来对地方了,今天给大家分享一下如何在Ubuntu中登陆阿里云服务器: 主要使用两款软件:1.SecureCRT:2.SecureFX:前者是命令行界面,功能类似xShell,后者则提供了图形操作界面,权且当做是xFTP吧,xShell和xFTP是我以前在windows系统中使用的服务器连接软件,它有类似Linux的终端模拟,同时可以配合xFTP显示图形界面,后来换用Ubuntu之后,找到了SecureCRT和SecureFX用