RHEL配置镜像源
RHEL配置镜像源
备份配置文件
删除/etc/yum.repos.d/
目录下的.repo
文件。
1
sudo rm -r /etc/yum.repos.d/*
修改镜像源
1
2
3
4
5
6
7
8
9
10
11
[AppStream]
name=AppStream
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/AppStream/x86_64/os/
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/
gpgcheck=0
enabled=1
安装epel-release
1
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
更新yum缓存
1
2
sudo yum clean all
sudo yum makecache
测试镜像源
1
sudo yum repolist all
安装软件
1
yum install ftp.x86_64
1
yum update ftp.x86_64
1
yum remove ftp.x86_64
本文由作者按照
CC BY 4.0
进行授权