How to Configure Local Repository in RHEL 8

How to Configure Local Repository in RHEL 8
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
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
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
yum repolist all

Make this local repo worked

The configuration process of the local repository is complete, and 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
install-package nano and vim with the local repo

Yes, you have successfully installed the tools provided by the local repository. That's basically the explanation of How to Configure a Local Repository in RHEL 8.

Closing statement

In conclusion, setting up a local repository in RHEL 8 offers a convenient way to manage software packages efficiently, reducing reliance on external repositories and speeding up package installations. By following the simple steps outlined in this guide, you can easily configure a local repository using an ISO of the RHEL Version 8.6 Operating System mounted in VirtualBox.

From mounting the ISO to creating the repository configuration file and installing packages, this process ensures seamless management of software packages on your system.

Maybe that's all I can share with you guys, hopefully this article will be useful.

Thank You.

Bangkit Ade Saputra
Bangkit Ade Saputra At the end of the day, my job involves people. we're complicated, we're always changing, we have millions of things going on in our lives, and changing jobs is always a big decision.

Post a Comment for "How to Configure Local Repository in RHEL 8"