REHL-9配置清华源

发布时间 2023-05-06 21:56:21作者: Komore_feng
# 清华源地址
https://mirrors.tuna.tsinghua.edu.cn/centos-stream/9-stream/
[root@localhost yum.repos.d]# cat centos.repo 
[baseos]
name=CentOS Stream $releasever - BaseOS
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos-stream/9-stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[appstream]
name=CentOS Stream $releasever - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos-stream/9-stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[root@anonymous yum.repos.d]# yum clean all
1 文件已删除
[root@anonymous yum.repos.d]# yum makecache
CentOS Stream 9 - BaseOS                                                                4.1 MB/s | 6.1 MB     00:01
CentOS Stream 9 - AppStream                                                             5.8 MB/s |  17 MB     00:02
上次元数据过期检查:0:00:01 前,执行于 2023年05月06日 星期六 21时49分20秒。
元数据缓存已建立。
[root@anonymous yum.repos.d]# yum install net-tools
上次元数据过期检查:0:00:42 前,执行于 2023年05月06日 星期六 21时49分20秒。
软件包 net-tools-2.0-0.62.20160912git.el9.x86_64 已安装。
依赖关系解决。
无需任何处理。
完毕!
[root@anonymous yum.repos.d]#