CentOS AppStream 8 手动更新 yum源

由于CentOS 8的官方支持已在2021年12月31日结束,官方镜像中的CentOS 8包已被移除。因此,如果您仍然需要运行CentOS 8并更新其yum源,您可以考虑使用以下步骤来配置一个可用的yum源,例如阿里云的镜像源。

https://mirrors.aliyun.com/centos/8-stream/?spm=a2c6h.25603864.0.0.132666edLGinrb

1.备份现有的yum源配置文件:

cd /etc/yum.repos.d/

mkdir backup

mv *.repo backup/

2.编辑yum源配置文件:

a.手动创建CentOS-AppStream.repo

vim CentOS-AppStream.repo

i

appstream

name=CentOS-8-stream - AppStream

baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/$basearch/os/

gpgcheck=1 enabled=1

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

保存退出;

b.手动创建CentOS-BaseOS.repo

vim CentOS-BaseOS.repo

i

baseos

name=CentOS-8-stream - BaseOS

baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/

gpgcheck=1 enabled=1

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

保存退出;

c.手动创建CentOS-Devel.repo

vim CentOS-Devel.repo

i

baseos

name=CentOS-8-stream - Devel

baseurl=https://mirrors.aliyun.com/centos/8-stream/Devel/$basearch/os/

gpgcheck=1 enabled=1

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

保存退出;

d.手动创建CentOS-Extras.repo

vim CentOS-Extras.repo

i

baseos

name=CentOS-8-stream - Extras

baseurl=https://mirrors.aliyun.com/centos/8-stream/Extras/$basearch/os/

gpgcheck=1 enabled=1

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

保存退出;

4.清空并重建yum缓存:

yum clean all

yum makecache

5.更新软件包:

yum update

相关推荐
小南家的青蛙1 小时前
微服务体系下DevOps运维岗位面试方案设计
运维·面试·职场和发展·devops
知已难寻11 小时前
Docker 入门:容器技术与 Docker 基础
java·运维·服务器·docker·云原生·容器
默|笙11 小时前
【Linux网络】网络层协议 IP(1)理解报头、网段划分
linux·网络·tcp/ip
修己xj14 小时前
nslookup 使用指南:两种模式与常用查询技巧
linux
唠玖馆16 小时前
文件系统详解
linux·文件系统·ext2
GeW16 小时前
当Linux内核开始“确定性”,制造高端化才有了底层语法
linux
星恒随风17 小时前
MySQL 从零入门(三):表的约束详解
linux·服务器·数据库·笔记·mysql
Alluxio18 小时前
Alluxio + OCI:为 AI 工作负载实现亚毫秒访问延迟与可扩展吞吐
运维·数据库·人工智能·分布式·缓存·ai·语言模型
StarsGreen20 小时前
libva在intel平台上的前端流程简介
linux
坤坤子吖1 天前
Linux网络编程:自定义应用层协议与 JSON 序列化
linux·服务器·网络·c++·笔记·json