安装丨CentOS7更换阿里云yum源

参考:

https://blog.csdn.net/HistoryCreator/article/details/78570711
https://yq.aliyun.com/ziliao/408380

1、备份系统yum源

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2、设置阿里云yum源

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

3、添加EPEL源

wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo 

4、清理缓存并生成新的缓存

yum clean all
yum makecache  

5、重新生成缓存

yum makecache

6、查看是否是阿里云配置

more CentOS-Base.repo

7、按个lrzsz,测试一下。

yum install lrzsz -y

原文地址:https://www.cnblogs.com/wangjianuo/p/9957061.html

时间: 2024-08-03 16:39:22

安装丨CentOS7更换阿里云yum源的相关文章

centos7更换阿里云yum源后无法安装nginx的问题解决

在centos7上,我将yum源更换为阿里云源,按照配置完成后,想使用yum安装nginx,但是老是提示我找不到nginx,没有可用的安装包,无论我是换为华为云的yum源,还是其他国内源,都无法找到.我的centos版本为7.7 无论我是安装epel-release,还是安装nginx的仓库,都没办法找到nginx包 我的nginx repo配置也没问题 一安装就找不到 但是可以用yum搜索到nginx的其他组件 这不科学 后来我想一个办法,在能够yum安装nginx的同样的机器上,把nginx

Centos7更换阿里云yum源

备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup或mv /etc/yum/repos.d/{,CentOS-Base.repodate -I} centos7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或 curl -o /etc/yum.repos.d/

CentOS7 配置阿里云yum源,非常之简单

1.进入yum的文件夹 命令:cd   /etc/yum.repos.d/ 2.下载wget 命令:yum -y install wget 3.删除yum文件夹所有yum源 命令:rm -rf    /etc/yum.repos.d/*.repo 4.利用wget下载阿里云repo文件 命令:wget  http://mirrors.aliyun.com/repo/Centos-7.repo 5.执行yum源更新命令 命令:yum clean all 命令:yum makecache 注意:依次

更换阿里云YUM源

下载阿里云的repo文件 centos 6: wget http://mirrors.aliyun.com/repo/Centos-6.repo centos 7: wget http://mirrors.aliyun.com/repo/Centos-7.repo cd /etc/yum.repos.d 备份旧的源 cp CentOS-Base.repo CentOS-Base.repo_2015-06-11 覆盖旧的源文件 mv Centos-6.repo CentOS-Base.repo 生

CentOS7 配置阿里云yum源

1.打开centos的yum文件夹 输入命令cd  /etc/yum.repos.d/ 2.用wget下载repo文件 输入命令wget  http://mirrors.aliyun.com/repo/Centos-7.repo 如果wget命令不生效,说明还没有安装wget工具,输入yum -y install wget 回车进行安装. 当前目录是/etc/yum.repos.d/,刚刚下载的Centos-7.repo也在这个目录上 3.备份系统原来的repo文件 mv  CentOs-Bas

CentOS7安装(三)- 配置阿里云yum源

CentOS7安装(三)- 配置阿里云yum源 CentOS7安装好以后,完成网络配置以后,就是开始配置yum源,因为yum安装我们需要的各种软件. 具体步骤如下: 1.打开centos的yum文件夹 输入命令 cd /etc/yum.repos.d/ 2.用wget下载repo文件 输入命令wget:http://mirrors.aliyun.com/repo/Centos-7.repo 如果wget命令不生效,说明还没有安装wget工具,输入yum -y install wget 回车进行安

CentOS配置本地yum源/阿里云yum源/163yuan源,并配置yum源的优先级

一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者163等国内的yum源(下文介绍如何配置). 但是以上的方法都是需要网络的,当没有网络的时候就无法使用了,所以还有一个常用的方法就是用Centos的iso镜像搭建本地yum源,这样安装软件的速度就会飞快,缺点是可能有些包没有. 1.安装Centos后默认的yum源如下 [[email protect

【yum】搭建yum源,163 阿里云yum源部署

配置阿里云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/ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

【嵌入式硬件Esp32】Ubuntu18.04 更换阿里云软件源

使用Ubuntu 的apt-get来安装软件是总是因为官方源的速度太慢而抓狂. 但是用阿里云的源就很快,下面总结一下如何更换Ubuntu的软件源. 一.备份sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak  二.修改sudo vim /etc/apt/sources.list 将source.list文件内容替换成下面的 deb http://mirrors.aliyun.com/ubuntu/ trusty main restric