1.将centos8的iso文件上传到服务器
2.挂载ios
mount CentOS-8.5.2111-x86_64-dvd1.iso -o loop /mnt
3.修改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
标签:file,CentOS,Media,repo,yum,本地,Linux,centos8 From: https://www.cnblogs.com/hxlasky/p/17349847.html