源配置

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. 一些shell脚本

    1.判断目录是否为空 DIRECTORY=$1 #在此加上是不是目录的判断. if [ "ls -A $DIRECTORY" = "" ]; then echo ...

  2. Codeforces Round 303 (Div. 2)C. Kefa and Park(DFS、实现)

    @ 目录 题面 链接 题意 题解 代码 总结 题面 链接 C. Kefa and Park 题意 求叶节点数量,叶节点满足,从根节点到叶节点的路径上最长连续1的长度小于m 题解 这道题目主要是实现,当 ...

  3. CUDA指针数组Kernel函数

    技术背景 在前面的一篇文章中,我们介绍了在C++中使用指针数组的方式实现的一个不规则的二维数组.那么如果我们希望可以在CUDA中也能够使用到这种类似形式的不规则的数组,有没有办法可以直接实现呢?可能过 ...

  4. Module not specified-使用IDEA出现问题

    一.问题由来 使用IDE导入一个项目时,准备启动这个项目,然后突然报错,错误信息如标题中所示Module not specified.这个项目之前都还好好的 怎么突然就运行不了了呢?让我感到很是疑惑, ...

  5. Nodejs 命令行调用 exec 与 spawn 差异--- 解决 spawn yarn ENOENT error

    Nodejs 命令行调用 exec 与 spawn 差异 比如在前端工程项目中 Nodejs 要调用命令行命令如: yarn electron:build exec 调用 yarn 命令,为了能使命令 ...

  6. Oss流程分析

    最新式上传方案是:前端上传获取token,然后token中带有bucket.账号.回调地址等相关信息,前端直接上传到阿里云,阿里云上传成功后回调之前设定好的地址,完成上传.(下图是技术负责人的图,盗来 ...

  7. 使用JdbcTemplate

    1.使用JdbcTemplate的execute()方法执行SQL语句 Java代码  收藏代码 jdbcTemplate.execute("CREATE TABLE USER (user_ ...

  8. 12_采样格式&音频重采样

    采样格式 通过前面学习我们知道FFmpeg和SDL都有自己的采样格式的表达式,那么他们都表示什么意思呢? FFmpeg的采样格式的表达式: enum AVCodecID { ...... AV_COD ...

  9. offer收割机--js的隐式类型转换规则整理

    类型转换 文中的值类型等价于所说的基础类型,其范围是(boolean,string,number) 转换为基础类型 布尔值 undefined, null, false, NaN,'', 0 --&g ...

  10. jQury(事件及其他方法)

    一. jQuery 事件注册 单个事件注册 语法: element.事件(function(){}) $("div").click(function(){ 事件处理程序 }) 其他 ...