镜像下载、域名解析、时间同步请点击阿里云开源镜像站
一、配置本地yum源
1. 挂载iso
2.创建目录并挂载iso
该文件按以下方式修改,有六处更改
[En]
The file is modified in the following way, with six changes
baseurl ,指定挂载的目录下的BaseOS 以及AppStream目录
gpgcheck 即不校验
enabled 启用该镜像
4.屏蔽默认的镜像
vim进入如下的3个文件,然后修改enabled=0
它看起来像以下内容,但存在一个问题。如果您希望将来使用网络安装该程序包,请记住在此处将其更改为1以重新启用它。
[En]
It looks like the following, but there is a problem. If you want to install the package using the network in the future, remember to change it here to 1 to re-enable it.
5.yum clean all
清空cache
sudo yum clean all
6.yum makecache
重建cache
sudo yum makecache
7.结果验证
试着找任何一个包。
[En]
Try searching for any bag.
yum search openssh 如果没有问题,说明配置是ok 的
二、配置阿里云yum源
1.禁用本地yum源
2.修改下面三个文件
CentOS-Stream-AppStream.repo
CentOS-Stream-Extras.repo
CentOS-Stream-BaseOS.repo
修改内容如下:
CentOS-Stream-AppStream.repo
CentOS-Stream-BaseOS.repo
CentOS-Stream-Extras.repo
3.yum clean all
清空cache
sudo yum clean all
4.yum makecache
重建cache
sudo yum makecache
本文转自:https://blog.51cto.com/u_10986210/5190864
Original: https://www.cnblogs.com/helong-123/p/16133804.html
Author: 萌褚
Title: Centos-Stream 配置本地yum源和配置阿里云yum源
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/523854/
转载文章受原作者版权保护。转载请注明原作者出处!