How to Configure Local Repository in RHEL 8
How to Configure Local Repository in RHEL 8 - Hi everyone, welcome back to my blog, Kitsake. In this post, I will discuss How to Configure Local Repository in RHEL 8. Setting up a local repository allows you to efficiently manage software packages on your system, reducing dependencies on external repositories and ensuring faster package installation.
The steps involved are quite simple. Just follow the instructions I provide and practice them in your own lab.
Preparation
Here, I have already downloaded the ISO of the RHEL Version 8.6 Operating System, and for the implementation, I am using VirtualBox.
Simply mount it in VirtualBox on the server where you will create the local repository.
Mount iso rhel 8 to VirtualBox |
Configure
After mounting it as a CD-ROM in VirtualBox, you will enter the server. Next, you will mount it again to the standardized path of your choice. Here, I am providing an example using the path /media.
# mount -t iso9660 /dev/cdrom /media/
mount cdrom to /media |
The next step is that you will need a repo config file. This is one of the requirements that you must fulfill to ensure that this local repository functions properly.
# vi /etc/yum.repos.d/local.repo
[InstallMedia-BaseOS] name=Red Hat Enterprise Linux 8 - BaseOS metadata_expire=-1 gpgcheck=0 enabled=1 baseurl=file:///media/BaseOS/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [InstallMedia-AppStream] name=Red Hat Enterprise Linux 8 - AppStream metadata_expire=-1 gpgcheck=0 enabled=1 baseurl=file:///media/AppStream/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Then save and exit the local repo configuration file.
# yum repolist all
yum repolist all |
Makesure this local repo worked
The configuration process of the local repository is complete, easy, right? Now, the next step is that you can install the packages you need using this local repository. Here, I will provide an example of installing the tools vim and nano.# yum install nano vim
install package nano and vim with local repo |
Yes, you have successfully installed the tools provided from the local repository. That's basically the explanation of How to Configure Local Repository in RHEL 8.
Maybe that's all I can share with you guys, hopefully this article will be useful.
Thank You.
Post a Comment for "How to Configure Local Repository in RHEL 8"