码迷,mamicode.com
首页 > 其他好文 > 详细

手动配置yum源文件(CentOS8)

时间:2020-07-26 15:16:55      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:rpm   备份   mirrors   span   http   key   extra   opened   图片   

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

技术图片
 1 [baseOS]
 2 name=baseOS
 3 baseurl=https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/
 4         https://mirrors.huaweicloud.com/centos/8/BaseOS/x86_64/os/
 5         https://mirrors.163.com/centos/8/BaseOS/x86_64/os/
 6 gpgcheck=1
 7 gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 8 
 9 [AppStream]
10 name=AppStream
11 baseurl=https://mirrors.aliyun.com/centos/8/AppStream/x86_64/os/
12         https://mirrors.huaweicloud.com/centos/8/AppStream/x86_64/os/
13         https://mirrors.163.com/centos/8/AppStream/x86_64/os/
14 gpgcheck=1
15 gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
16 
17 
18 [epel]
19 name=epel
20 baseurl=https://mirrors.aliyun.com/epel/8/Everything/x86_64/
21 gpgcheck=1
22 gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-8
23 
24 [extras]
25 name=extras
26 baseurl=https://mirrors.aliyun.com/centos/8/extras/x86_64/os/
27 gpgcheck=1
28 gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
yum配置文件

3.清除缓存并生效

dnf clean all ; dnf makecache ; dnf repolist

手动配置yum源文件(CentOS8)

标签:rpm   备份   mirrors   span   http   key   extra   opened   图片   

原文地址:https://www.cnblogs.com/wuvikr/p/13379394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!