RedHat8.0配置本地yum源

RedHat8.0配置本地yum源

实验环境VMware15

首先挂在镜像光盘

[root@localhost ~]# mount /dev/sr0 /mnt/
mount: /mnt: WARNING: device write-protected, mounted read-only.

接下来配置本地yum源

[root@localhost ~]# cp -ra /mnt/media.repo /etc/yum.repos.d/

编译文件

[root@localhost ~]# vi /etc/yum.repos.d/media.repo

[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1

[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta

yum repolist查看是否成功

[root@localhost ~]# yum repolist
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:00:13 ago on Wed 29 May 2019 01:47:54 AM EDT.
repo id                              repo name                            status
AppStream                            AppStream                            4,672
BaseOS                               BaseOS                               1,658

成功

你可能感兴趣的:(RedHat8.0配置本地yum源)