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 小时前
负载均衡--四层、七层负载均衡的区别
运维·服务器·负载均衡
蓝易云1 小时前
Qt框架中connect()方法的ConnectionType参数使用说明 点击改变文章字体大小
linux·前端·后端
dyj0951 小时前
【Rancher Server + Kubernets】- Nginx-ingress日志持久化至宿主机
运维·nginx·rancher
花落已飘1 小时前
多线程 vs 异步
linux·网络·系统架构
PanZonghui2 小时前
Centos项目部署之Nginx部署项目
linux·nginx
码出钞能力2 小时前
linux内核模块的查看
linux·运维·服务器
星辰云-3 小时前
# Linux Centos系统硬盘分区扩容
linux·运维·centos·磁盘扩容
Hellc0073 小时前
Nginx 高级 CC 与 DDoS 防御策略指南
运维·nginx·ddos
聽雨2373 小时前
02每日简报20250704
linux·科技·金融·生活·社交电子·娱乐·媒体
feilieren3 小时前
Docker 安装 Elasticsearch 9
运维·elasticsearch·docker·es