当前位置: 首页 > news >正文

Linux CentOS stream9配置本地yum源

在Linux系统中,yum源配置是一个重要的环节。把系统安装时配置的国外yum源转换为国内yum源,能够帮助系统快速安装软件包。对于网络环境不稳定或无法联网的系统,配置本地yum源,可以让用户在离线状态下也能进行软件包的安装,十分重要。

一、国内源

在使用Linux的日常工作中,经常会遇到缺少包的情况,而当我们单独下载缺少的包进行安装时,大多都会因为依赖或版本与操作系统版本不兼容的问题,这个时候配置yum就显得很有必要

配置yum源一般分两种情况,网络yum源和本地iyum源。

1.网络yum源

网络yum源通常在能连接互联网的服务器上进行配置,配置简单,可选择性强,能获取的包也更多;用国内yum源替换系统自带的yum源,对于本版本的设置,可参考《Linux CentOS7 yum仓库》。

主要配置文件:

a. centos.repo

[baseos]

name=CentOS Stream $releasever - BaseOS

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/os

# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-$stream&arch=$basearch&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

countme=1

enabled=1

[baseos-debuginfo]

name=CentOS Stream $releasever - BaseOS - Debug

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/debug/tree/

# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-debug-$stream&arch=$basearch&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

enabled=0

[baseos-source]

name=CentOS Stream $releasever - BaseOS - Source

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/BaseOS/source/tree/

# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-source-$stream&arch=source&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

enabled=0

[appstream]

name=CentOS Stream $releasever - AppStream

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/os

# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-$stream&arch=$basearch&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

countme=1

enabled=1

[appstream-debuginfo]

name=CentOS Stream $releasever - AppStream - Debug

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/debug/tree/

# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-debug-$stream&arch=$basearch&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

enabled=0

[appstream-source]

name=CentOS Stream $releasever - AppStream - Source

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/AppStream/source/tree/

# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-source-$stream&arch=source&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

enabled=0

[crb]

name=CentOS Stream $releasever - CRB

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/os

# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-$stream&arch=$basearch&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

countme=1

enabled=1

[crb-debuginfo]

name=CentOS Stream $releasever - CRB - Debug

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/debug/tree/

# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-debug-$stream&arch=$basearch&protocol=https,http

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

gpgcheck=1

repo_gpgcheck=0

metadata_expire=6h

enabled=0

[crb-source]

name=CentOS Stream $releasever - CRB - Source

baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/$releasever-stream/CRB/source/tree/

# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-source-$stream&arch=

http://www.lryc.cn/news/455437.html

相关文章:

  • std::string
  • 【Docker】03-自制镜像
  • Java GC 分类,8和9使用的哪种?
  • 【Docker从入门到进阶】01.介绍 02.基础使用
  • GraphRAG-Local-UI - 基于 GraphRAG 支持本地的聊天UI
  • Java 根据字符生成背景透明的图片
  • 树莓派3b安装ubuntu18.04服务器系统server配置网线连接
  • 【AIGC】2022-NIPS-视频扩散模型
  • 从零开始构建:Python自定义脚本自动化你的日常任务
  • 【python实操】python小程序之对象的属性操作
  • HCIP——网络类型及数据链路层协议
  • 数据结构——栈与队列的实现(全码)
  • MacOS编译和安装Poco库的方法
  • 医院管理新境界:Spring Boot技术突破
  • Docker 环境下 MinIO 监控实战:通过 Prometheus 实现集群与桶级别性能监控
  • 渗透测试入门学习——使用python脚本自动跟踪csrf_token实现对网站登录界面的暴力破解
  • stc8最小系统使用usb下载程序,关于断电的避坑
  • API 数据接口:使用操作流程与安全指南
  • elasticsearch 8.2 版本如何设置config/elasticsearch.yml
  • 华为 HCIP-Datacom H12-821 题库 (33)
  • 【网络篇】计算机网络——运输层详述(笔记)
  • 用java编写飞机大战
  • java Map中get方法爆错NullPointerException
  • ElasticSearch备考 -- Multi field
  • 刷题 图论
  • 基于JAVA的鲜花商城管理系统(源码+定制+讲解)鲜花商城管理系统、鲜花商城管理平台、鲜花商城信息管理、鲜花商城系统开发与应用、鲜花在线商城管理系统
  • 深圳大学-Java程序设计-选实验1 基础知识练习
  • 第 33 章 Ajax
  • LeetCode 209 Minimum Size Subarray Sum 题目解析和python代码
  • C# 入坑JAVA 潜规则 注解 列表 listMch,该列表存储了一个映射(Map)的集合 等 入门系列3