ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Centos-Stream 配置本地yum源和配置阿里云yum源

Centos-Stream 配置本地yum源和配置阿里云yum源

原创 Linux操作系统 作者:哈哈哈hh 时间:2022-04-12 10:13:04 0 删除 编辑

镜像下载、域名解析、时间同步请点击  阿里云开源镜像站

一、配置本地yum源

1. 挂载iso

file

2.创建目录并挂载iso

file

file

3.修改vim   CentOS-Stream-Media.repo,内容如下

文件按照如下的方式修改,修改有6个地方

baseurl ,指定挂载的目录下的BaseOS 以及AppStream目录

gpgcheck 即不校验

enabled 启用该镜像

file

4.屏蔽默认的镜像

vim进入如下的3个文件,然后修改enabled=0

file

大概如下所示,但是有一个问题,如果日后希望使用网络的方式安装包,记得重新把这里修改为1 即重新启用。

file

5.yum clean all

清空cache

sudo yum clean all

6.yum makecache

重建cache

sudo yum makecache

7.结果验证

随便搜索一个什么包试试。

yum search openssh 如果没有问题,说明配置是ok 的

file

二、配置阿里云yum源

1.禁用本地yum源

file

2.修改下面三个文件

CentOS-Stream-AppStream.repo

CentOS-Stream-Extras.repo

CentOS-Stream-BaseOS.repo

修改内容如下:

CentOS-Stream-AppStream.repo

file

CentOS-Stream-BaseOS.repo

file

CentOS-Stream-Extras.repo

file

3.yum clean all

清空cache

sudo yum clean all

4.yum makecache

重建cache

sudo yum makecache

本文转自:https://blog.51cto.com/u_10986210/5190864


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70003733/viewspace-2886619/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Docker学习笔记
请登录后发表评论 登录
全部评论

注册时间:2021-09-10

  • 博文量
    280
  • 访问量
    250880