centos8制作本地yum

 

1.将centos8的iso文件上传到服务器

 

2.挂载ios
mount CentOS-8.5.2111-x86_64-dvd1.iso -o loop /mnt

 

3.去掉这两个文件

mv CentOS-Linux-AppStream.repo CentOS-Linux-AppStream.repo_bak
mv CentOS-Linux-BaseOS.repo CentOS-Linux-BaseOS.repo_bak

 

 

4.修改CentOS-Linux-Media.repo
cd /etc/yum.repos.d
vi CentOS-Linux-Media.repo

 

复制代码
[root@cos8 yum.repos.d]# more CentOS-Linux-Media.repo
# CentOS-Linux-Media.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.

[media-baseos]
name=CentOS Linux $releasever - Media - BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[media-appstream]
name=CentOS Linux $releasever - Media - AppStream
baseurl=file:///mnt/AppStream
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
复制代码

 

posted @   slnngk  阅读(67)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2022-04-24 mysql5.6配置ssl连接
2021-04-24 canal部署
2021-04-24 es备份和恢复
2019-04-24 python发送邮件
点击右上角即可分享
微信分享提示