Professional Documents
Culture Documents
Local YUM repository is the place where the rpm packages for Redhat or CentOS are stored and distributed to client servers for
software installation and OS updates.
This local repository lets you save internet bandwidth as well as the time for downloading packages from the internet.
Here, we will go through steps to create local YUM repository on RHEL 8 for RHEL 8 using DVD.
1. BaseOS
2. Application Stream (AppStream)
Packages in BaseOS is intended to provide the core set of the underlying OS functionality that provides the foundation for all
type installations.
Packages in Application Stream includes user space applications, runtime languages, and databases in support of the varied
workloads and use cases.
Create Source
Repository’s source can be created either using the createrepo package or mounting the DVD on the directory. Mounting
the DVD/CD ROM will help you save the space on HDD used by being copied to HDD.
Here, mount the DVD ROM on any directory of your wish. For testing, I will mount it on /cdrom.
mkdir /cdrom
mount –rw /dev/cdrom /cdrom
mv /etc/yum.repos.d/*.repo /tmp
Create a repo file called local.repo under /etc/yum.repos.d directory.
vi /etc/yum.repos.d/local.repo
Base OS
[LocalRepo_BaseOS]
name=LocalRepository_BaseOS
baseurl=file:///cdrom/BaseOS
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
App Stream
[LocalRepo_AppStream]
name=LocalRepository_AppStream
baseurl=file:///cdrom/AppStream
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Details:
When you give yes to download the package, it will prompt you to accept gpg signing key.
Installed:
vsftpd-3.0.3-28.el8.x86_64
Complete!
COPY
Conclusion
That’s All. You have successfully configured the local yum repository on the machine.