DNF/YUM Configuration in Red hat Linux

DNF/YUM Configuration in Red hat Linux

How to Create Local Yum/DNF Repository on RHEL 9

Check yum configured or not

yum check

Remove this warning “This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

vi /etc/yum/pluginconf.d/subscription-manager.conf

Change enabled=1 To enabled=0

Then save

Mount CD Drive and Copy Files to /var/yum_repo

BaseOS – Folder

AppStream – Folder

Create Repo File in ‘/etc/yum.repos.d/’ Directory

sudo vi /etc/yum.repos.d/nwa_dvd.repo

[Local-BaseOS]
name=Red Hat Enterprise Linux 9 – BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///var/yum_repo/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Local-AppStream]
name=Red Hat Enterprise Linux 9 – AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///var/yum_repo/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

then check yum

yum update

Clean All Cached Files

yum clean all

Then check Yum & Update Repo
yum check
yum update

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *