手动配置yum源文件(CentOS8)

haitianisgood 2020-07-26

1. 备份

mkdir /etc/yum.repos.d/repo.bak ; mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo.bak

2. 配置yum源文件

vim /etc/yum.repos.d/CentOS8.repo

[baseOS]
name=baseOS
baseurl=https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/
        https://mirrors.huaweicloud.com/centos/8/BaseOS/x86_64/os/
        https://mirrors.163.com/centos/8/BaseOS/x86_64/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

[AppStream]
name=AppStream
baseurl=https://mirrors.aliyun.com/centos/8/AppStream/x86_64/os/
        https://mirrors.huaweicloud.com/centos/8/AppStream/x86_64/os/
        https://mirrors.163.com/centos/8/AppStream/x86_64/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official


[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/8/Everything/x86_64/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-8

[extras]
name=extras
baseurl=https://mirrors.aliyun.com/centos/8/extras/x86_64/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

yum配置文件

3.清除缓存并生效

dnf clean all ; dnf makecache ; dnf repolist

相关推荐

TiDBPingCAP / 0评论 2020-07-29