实现光盘本地yum仓需要配一个服务端和一个客户端
[root@centos8 ~]
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 910180 0 910180 0% /dev
tmpfs 924716 0 924716 0% /dev/shm
tmpfs 924716 18132 906584 2% /run
tmpfs 924716 0 924716 0% /sys/fs/cgroup
/dev/nvme0n1p2 104806400 4636776 100169624 5% /
/dev/nvme0n1p3 52403200 398576 52004624 1% /data
/dev/nvme0n1p1 999320 131444 799064 15% /boot
tmpfs 184940 20 184920 1% /run/user/42
tmpfs 184940 3496 181444 2% /run/user/0
/dev/sr0 6967726 6967726 0 100% /run/media/root/CentOS-8-BaseOS-x86_64
[root@centos8 ~]
[root@centos8 yum.repos.d]
CentOS-AppStream.repo CentOS-Debuginfo.repo CentOS-PowerTools.repo
CentOS-Base.repo CentOS-Extras.repo CentOS-Sources.repo
CentOS-centosplus.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
[root@centos8 yum.repos.d]
[BaseOS]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[root@centos8 yum.repos.d]
[root@centos8 yum.repos.d]
[root@centos8 yum.repos.d]
bak
[root@centos8 yum.repos.d]
/etc/yum.repos.d
[root@centos8 yum.repos.d]
AppStream BaseOS EFI images isolinux media.repo TRANS.TBL
[root@centos8 yum.repos.d]
Packages repodata
[root@centos8 yum.repos.d]
Packages repodata
[root@centos8 yum.repos.d]
[BaseOS]
name=cdrom BaseOS
baseurl=file:///run/media/root/CentOS-8-BaseOS-x86_64/BaseOS
gpgcheck=0
enable=1
[Appstream]
name=cdrom Appstream
baseurl=file:///run/media/root/CentOS-8-BaseOS-x86_64/AppStream
gpgcheck=0
enable=1
[root@centos8 yum.repos.d]
Last metadata expiration check: 0:18:59 ago on Mon 16 Mar 2020 03:26:41 PM CST.
repo id repo name status
Appstream cdrom Appstream 4,681
BaseOS cdrom BaseOS 1,655
[root@centos8 ~]
在这里插入代码片