当前位置: 首页 > 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=

相关文章:

Linux CentOS stream9配置本地yum源

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

std::string

std::string是C标准库中的一个基本类模板,专门用于处理字符串。它提供了一个可变长度的字符序列,以及一系列用于字符串操作的方法。std::string是值类型,这意味着当它作为函数参数传递或赋值时,整个字符串数据会被复制。 std::st…...

【Docker】03-自制镜像

1. 自制镜像 2. Dockerfile # 基础镜像 FROM openjdk:11.0-jre-buster # 设定时区 ENV TZAsia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # 拷贝jar包 COPY docker-demo.jar /app.jar # 入口 ENTRYPOINT ["ja…...

Java GC 分类,8和9使用的哪种?

Java的垃圾收集器(Garbage Collector, GC)负责自动管理内存,回收不再使用的对象所占用的空间。随着JVM的发展,出现了多种不同特性的垃圾收集器来适应不同的应用场景和性能需求。在Java 8中,主要有以下几种垃圾收集器&a…...

【Docker从入门到进阶】01.介绍 02.基础使用

1. 介绍 1.1. 什么是 Docker Docker 是一个开源的平台,用于开发、发布和运行应用程序。它使开发者能够以更精简的方式封装应用及其依赖,做到“打包一次,到处运行”。通过 Docker,您可以创建轻量级、可移植的容器,每个…...

GraphRAG-Local-UI - 基于 GraphRAG 支持本地的聊天UI

文章目录 一、关于 GraphRAG-Local-UI 🕸️特点🌟🗺️路线图最近更新即将推出的功能 二、📦安装和设置三、使用入门🚀1、创建索引目录2、添加示例数据(可选)3、初始化索引文件夹4、配置设置5、定…...

Java 根据字符生成背景透明的图片

上代码 package com.example.demotest.controller;/*** Author shaolin* Date 2024-10-08 10:11**/import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.WritableRaster; impor…...

树莓派3b安装ubuntu18.04服务器系统server配置网线连接

下载ubuntu镜像网址 img镜像,即树莓派官方烧录器使用的镜像网址 ubuntu18.04-server:ARM/RaspberryPi - Ubuntu Wiki 其他版本:Index of /ubuntu/releases 下载后解压即可。 发现使用官方烧录器烧录配置时配置wifi无论如何都不能使用&am…...

【AIGC】2022-NIPS-视频扩散模型

2022-NIPS-Video Diffusion Models 视频扩散模型摘要1. 引言2. 背景3. 视频扩散模型3.1. 重建引导采样以改进条件生成 4. 实验4.1. 无条件视频建模4.2. 视频预测4.3. 文本条件视频生成4.3.1 视频与图像建模的联合训练4.3.2 无分类器指导的效果4.3.3 更长序列的自回归视频扩展 5…...

从零开始构建:Python自定义脚本自动化你的日常任务

从零开始构建:Python自定义脚本自动化你的日常任务 Python 作为一种简洁且功能强大的编程语言,被广泛应用于各种自动化任务中。通过编写 Python 脚本,你可以轻松地将日常重复性工作自动化,例如文件操作、数据处理、网络爬虫、系统…...

【python实操】python小程序之对象的属性操作

引言 python小程序之对象的属性操作 文章目录 引言一、对象的属性操作1.1 题目1.2 代码1.3 代码解释 二、思考2.1 添加属性2.2 获取属性 一、对象的属性操作 1.1 题目 给对象添加属性 1.2 代码 class Cat:# 在缩进中书写⽅法def eat(self):# self 会⾃动出现,暂不管print(f…...

HCIP——网络类型及数据链路层协议

目录 网络类型的分类 数据链路层协议 MA网络 以太网协议 P2P网络 HDLC---高级数据链路控制协议 HDLC网络搭建 PPP---点到点协议 PPP协议的优点 PPP数据帧封装结构​编辑 PPP会话的搭建 路建立阶段---LCP建立 认证阶段 PAP CHAP 网络层协议协商阶段---NCP协商 网…...

数据结构——栈与队列的实现(全码)

一 栈的概念 栈是一种特殊的线性表,栈内数据遵循先进后出(LIFO)的原则,对于栈,只能在同一侧进行入栈和出栈操作。 入栈操作和出栈操作是在栈的同一侧进行的,如图示: 对于栈这种数据类型,我们可以采用链表或…...

MacOS编译和安装Poco库的方法

1.从官网git下载最新的poco源代码 在/usr/local路径下创建Poco文件夹,克隆Poco源代码 sudo git clone -b poco-1.13.3-release https://github.com/pocoproject/poco.git2.等了一会后,报错啦!!! error: RPC failed…...

医院管理新境界:Spring Boot技术突破

6系统测试 6.1概念和意义 测试的定义:程序测试是为了发现错误而执行程序的过程。测试(Testing)的任务与目的可以描述为: 目的:发现程序的错误; 任务:通过在计算机上执行程序,暴露程序中潜在的错误。 另一个…...

Docker 环境下 MinIO 监控实战:通过 Prometheus 实现集群与桶级别性能监控

Docker 环境下 MinIO 监控实战:通过 Prometheus 实现集群与桶级别性能监控 文章目录 Docker 环境下 MinIO 监控实战:通过 Prometheus 实现集群与桶级别性能监控一 获取 prometheus 配置二 配置的内容三 prometheus 的配置1)集群级别的指标2&a…...

渗透测试入门学习——使用python脚本自动跟踪csrf_token实现对网站登录界面的暴力破解

目录 写在前面 使用方法 相关代码 写在前面 最近在学习使用Burp Suite时发现其intruder模块无法实现多种模式的混合使用,就如想要暴力破解账号和口令两个区域并同时跟踪网页的csrf_token时BP似乎不能很方便的实现这一功能,于是自己在练习时就想到了用…...

stc8最小系统使用usb下载程序,关于断电的避坑

首先,按stc官方的原理图做好最小系统。 下面,来看一下stc手册中的操作步骤 USB-ISP 下载程序步骤: 1、按下板子上的 P3.2/INT0 按键,就是 P3.2 接地 2、给目标芯片重新上电,不管之前是否已通电。 电子开关是按下停电后…...

API 数据接口:使用操作流程与安全指南

在当今数字化高速发展的时代,API 数据接口如同构建数字世界的关键纽带,将不同的软件系统和服务紧密连接在一起。无论是企业开发者致力于提升业务效率,还是个人用户追求更便捷的数字体验,深入了解 API 数据接口的使用操作流程以及全…...

elasticsearch 8.2 版本如何设置config/elasticsearch.yml

在Elasticsearch 8.2版本中,`config/elasticsearch.yml`文件是用于配置Elasticsearch的主要配置文件。你可以通过编辑这个文件来设置各种配置选项。以下是一些常见的配置选项及其设置方法: ### 1. 基本配置 #### 集群名称 ```yaml cluster.name: my-cluster ``` #### 节点…...

华为 HCIP-Datacom H12-821 题库 (33)

🐣博客最下方微信公众号回复题库,领取题库和教学资源 🐤诚挚欢迎IT交流有兴趣的公众号回复交流群 🦘公众号会持续更新网络小知识😼 1.VLAN Pool 只要通过一个 SSID 就能够同时支持多个业务 VLAN,从而缩小广播域&#…...

【网络篇】计算机网络——运输层详述(笔记)

目录 一、运输层 1. 概述 2. 运输层和网络层的关系 3. 运输层协议概述 二、多路复用和多路分解 1. 综述 2. 无连接的多路复用与多路分解(UDP) 3. 面向连接的多路复用与多路分解(TCP) 4. Web 服务器与TCP 三、UDP&#x…...

用java编写飞机大战

游戏界面使用JFrame和JPanel构建。背景图通过BG类绘制。英雄机和敌机在界面上显示并移动。子弹从英雄机发射并在屏幕上移动。游戏有四种状态:READY、RUNNING、PAUSE、GAMEOVER。状态通过鼠标点击进行切换:点击开始游戏(从READY变为RUNNING&am…...

java Map中get方法爆错NullPointerException

代码如下&#xff1a; public class Hello {public static void main(String[] args) {Map<Integer,Integer> map new HashMap<>();map.put(2,1);int i map.get(1); System.out.println(i);} }运行出错&#xff0c;看代码很明显是get到一个不存在map的值&#x…...

ElasticSearch备考 -- Multi field

一、题目 Create the index hamlet_2 with one primary shard and no replicas Copy the mapping of hamlet_1 into hamlet_2, but also define a multi-field for speaker. The name of such multi-field is tokens and its data type is the (default) analysed string Reind…...

刷题 图论

面试经典 150 题 - 图 200. 岛屿数量 dfs 标记 visited class Solution { public:// dfs 染色const int direction[4][2] {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};void dfs(vector<vector<char>>& grid, vector<vector<bool>>& visited, int x…...

基于JAVA的鲜花商城管理系统(源码+定制+讲解)鲜花商城管理系统、鲜花商城管理平台、鲜花商城信息管理、鲜花商城系统开发与应用、鲜花在线商城管理系统

博主介绍&#xff1a; ✌我是阿龙&#xff0c;一名专注于Java技术领域的程序员&#xff0c;全网拥有10W粉丝。作为CSDN特邀作者、博客专家、新星计划导师&#xff0c;我在计算机毕业设计开发方面积累了丰富的经验。同时&#xff0c;我也是掘金、华为云、阿里云、InfoQ等平台…...

深圳大学-Java程序设计-选实验1 基础知识练习

实验目的与要求&#xff1a; 实验目的&#xff1a;掌握Java程序设计开发环境的搭建&#xff0c;编写简单Java Project&#xff0c;掌握编译、运行等基本步骤和命令。 实验要求&#xff1a; (1).下载、安装"Java SE Development Kit 20.0.2"最新的版本&#xff0c;需…...

第 33 章 Ajax

第 33 章 Ajax 1.XMLHttpRequest 2.GET 与 POST 3.封装 Ajax 2005 年 Jesse James Garrett 发表了一篇文章&#xff0c;标题为&#xff1a;“Ajax&#xff1a;A new Approach to Web Applications”。他在这篇文章里介绍了一种技术&#xff0c;用他的话说&#xff0c;就叫&…...

LeetCode 209 Minimum Size Subarray Sum 题目解析和python代码

题目&#xff1a; Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarray, return 0 instead. Example 1: Input: target 7, nu…...