为 CentOS 8 配置 yum/dnf 源
为了验证 Ceph 在 CentOS 8 下的构建,体验了一下新的 CentOS 系统。
# curl -O http://mirrors.ustc.edu.cn/epel/RPM-GPG-KEY-EPEL-8
# mv RPM-GPG-KEY-EPEL-8 /etc/pki/rpm-gpg/
CentOS 新的 yum 源目录结构相比以往的版本有很大的差异,驼峰式命名以及最后那个 os
目录都让人无法理解:
# vi /etc/yum.repos.d/centos.repo
[AppStream]
name = AppStream
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
baseurl = http://mirrors.ustc.edu.cn/centos/8/AppStream/x86_64/os
[BaseOS]
name = BaseOS
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
baseurl = http://mirrors.ustc.edu.cn/centos/8/BaseOS/x86_64/os
[PowerTools]
name = PowerTools
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
baseurl = http://mirrors.ustc.edu.cn/centos/8/PowerTools/x86_64/os
[epel]
name = epel
enabled = 1
gpgcheck = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
baseurl = http://mirrors.ustc.edu.cn/epel/8/Everything/x86_64
参考资料
Using AppStream with yum in Red Hat Enterprise Linux 8
https://www.linuxsysadmins.com/using-appstream-with-yum/
最后修改于 2019-10-23