源配置

tips:
yum配置文件路径

/etc/yum.repos.d/centos.repo

1.备份源配置 [Very Important!]
mv /etc/yum.repos.d/centos.repo /etc/yum.repos.d/centos.repo.backup

2.Clean Cache:

yum clean all
3.Backup the Old CentOS-Base.repo
If exist this file.
cd /etc/yum.repos.d/
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
4.Create the new CentOS-Base.repo file with vim or other editor , and save to the directory '/etc/yum.repos.d/'  fill with the following contents below:
    # CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/
http://mirrors.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official #additional packages that may be useful
#[extras]
#name=CentOS-$releasever - Extras - mirrors.aliyun.com
#failovermethod=priority
#baseurl=https://mirrors.aliyun.com/centos-stream/$stream/extras/$basearch/os/
# http://mirrors.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/
# http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/
#gpgcheck=1
#gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/centosplus/$basearch/os/
http://mirrors.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official [PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/PowerTools/$basearch/os/
http://mirrors.aliyuncs.com/centos-stream/$stream/PowerTools/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official [AppStream]
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/
http://mirrors.aliyuncs.com/centos-stream/$stream/AppStream/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official

Press the “ESC” key and input “:wq” to save and quit vim, if you use vim.

阿里源配置, ok

5. 更新缓存
  yum makecache && yum update

or, you can use the follow tow commands.

yum makecache

then

yum update

Waiting for the “Complete!” notice in your terminal.

6.Finished.

centos-stream-9 centos9 配置国内yum源 阿里云源的更多相关文章

  1. centos yum换阿里云源

    阿里云Linux安装软件镜像源 阿里云是最近新出的一个镜像源.得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源. 阿里云Linux安装镜像源地址:http://mirrors.aliyun ...

  2. linux 修改yum 为阿里云源

    为了加快yum的下载速度,我们可以讲yum源指向阿里云的资源. 操作方法: 1.备份系统的yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repo ...

  3. ubuntu配置阿里云源

    换成国内最快的阿里云源 第一步:备份原来的源文件 cd /etc/apt/ 然后会显示下面的源文件sources.list 输入命令 sudo cp sources.list sources.list ...

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

    一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者 ...

  5. linux 配置本地yum源,配置国内yum源,配置epel源

    目录 一.配置本地yum源 二.配置国内yum源和epel源 一.配置本地yum源 1.挂载ISO镜像 mount -o loop /mnt/yum-iso/CentOS-7-x86_64-DVD-1 ...

  6. contos 配置国内yum源

    contos配置国内yum源 前言 rpm管理软件包的命令,很难用,需要手动解决以来关系,所以最好用 yum 的理念是使用一个中心仓库(repository)管理一部分甚至一个distribution ...

  7. contos配置国内yum源

    contos配置国内yum源 前言 rpm管理软件包的命令,很难用,需要手动解决以来关系,所以最好用 yum 的理念是使用一个中心仓库(repository)管理一部分甚至一个distribution ...

  8. 更改CentOS 6.3 yum源为国内 阿里云源

    将CentOS的 yum源 更换为 阿里云源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.b ...

  9. 将Centos的yum源更换为阿里云源

    阿里云Linux安装软件镜像源 阿里云是最近新出的一个镜像源.得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源.阿里云Linux安装镜像源地址:http://mirrors.aliyun. ...

  10. CentOS 7 搭建本地YUM仓库,并定期同步阿里云源

    目录导航: 1. 系统环境 2. 修改yum 源为阿里云源 3. 安装yum相关的软件 4. 根据源标识同步源到本地目录 5. 安装nginx开启目录权限保证本地机器可以直接本地yum源 6. 客户端 ...

随机推荐

  1. MYSQL索引-上

    前言 今天同事做数据清理的时候发现我这边有一张表没有主键,这个表有两个字段,ID和Name,ID作者唯一索引,在我印象里,一个数据表如果没有主键索引,它会内部创建主键索引,创建的标准就是唯一性,我觉得 ...

  2. 为什么defineProps宏函数不需要从vue中import导入?

    前言 我们每天写vue代码时都在用defineProps,但是你有没有思考过下面这些问题.为什么defineProps不需要import导入?为什么不能在非setup顶层使用defineProps?d ...

  3. 掌握 Kubernetes 故障排除技巧:kubectl命令的基本指南

    Kubernetes 彻底改变了容器编排,简化了应用程序的管理和扩展.然而,与任何复杂系统一样,Kubernetes 集群也会遇到问题,需要及时解决才能保持最佳性能和可靠性.在本文中,我们将深入探讨必 ...

  4. 瑞云科技CTO赵志杰出席广州广告数字创意峰会并发表演讲

    3月23日下午,广州广告数字创意峰会暨穗广协企业家大讲堂年度巡礼活动在广州图书馆圆满举行.本次峰会由广州市人民政府统筹,中共广州市委宣传部.广州市文化广电旅游局.中共广州市天河区委.广州市天河区人民政 ...

  5. 云化XR,如何助力产业升级

    XR(Extended Reality)是指借助计算机图形技术和可穿戴设备所生成的一个真实与虚拟组合的.可人机交互的环境.XR中的"X"只是一个变量,可以代表任何字母,包括VR(V ...

  6. 业务开发做到零 bug 有多难?

    大家好,我是树哥,好久不见啦. 作为一个工作了 10 多年的开发,写业务代码总是写了不少的.但你想过做到零 bug 吗?我可是想过的,毕竟我还是有点追求的.不然每天都是浑浑噩噩地过,多没意思啊. 大概 ...

  7. python面向对象编程(封装、隐藏)

    一 封装 1.封装介绍封装是面向对象三大特性最核心的一个特性封装<----->整合2.将封装的属性进行隐藏操作1).如何隐藏:在属性名前加__前缀,就会实现一个对外隐藏属性效果该隐藏需要注 ...

  8. Web Audio API 第2章 完美的播放时机控制

    Web Audio API 第2章 完美的播放时机控制 相较于 标签, Web Audio API 拥有低延迟精确定时模型. 低延时对于游戏或交互式应用来说非常重要,因为交互操作时要快速响应给用户的听 ...

  9. 舒服了,学习了,踩到一个 Lombok 的坑!

    你好呀,我是歪歪. 踩坑了啊,最近踩了一个 lombok 的坑,有点意思,给你分享一波. 我之前写过一个公共的服务接口,这个接口已经有好几个系统对接并稳定运行了很长一段时间了,长到这个接口都已经交接给 ...

  10. mysql where子句 区分 大小写

    解决办法 使用binary关键字,此时就能区分大小写了 SELECT * FROM `tb_test` WHERE BINARY COL_1='abc'