Close Menu
DPC Virtual Tips
    Read More

    How to Troubleshoot Packet Drops on an ESXi Host

    August 16, 2026

    SlurmDBD Is Down: What Continues Working and What Does Not

    August 15, 2026

    How to Investigate Jobs Stuck in COMPLETING State on Slurm

    August 14, 2026
    • Home
    • About Us
    • Contact
    • Cookie Policy
    • Comment Policy
    • Privacy Policy
    • Terms of Use
    • Disclaimer
    Tuesday, August 25
    DPC Virtual Tips
    • Home
    • Operating Systems
    • PowerFlex
    • HPC
    • Virtualization
    • About the Author
    • About Us
    • Contact
    DPC Virtual Tips
    Home » How to Configure a Local Repository on RHEL 8
    Operating Systems

    How to Configure a Local Repository on RHEL 8

    DaniloBy DaniloAugust 6, 2025Updated:August 1, 2026No Comments2 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    local repository on RHEL 8
    Share
    Facebook Twitter LinkedIn Pinterest Email

    How to configure a local repository on RHEL 8 is a common task for Linux administrators who need to provide package management without relying on external Red Hat Network repositories. A local repository allows systems to install and update packages using an internal source hosted within the environment.

    We’ve written an article explaining how to create an HTTP server to use as a network install server for RHEL. We’ll need this HTTP server to create a local repository. So, check this article first:
    https://dpcvirtualtips.com/creating-a-network-install-server-on-rhel-8/

    In this case, for instance, our RHEL 8 has a subscription enabled to download packages from the Red Hat Network. We can confirm it by executing the following command:

    subscription-manager config --list

    So, let’s provide the step-by-step procedure to use a local repository instead of using the Red Hat Network:

    1- Firstly, we need to disable the Red Hat Network. Doing it, our system will not use the Red Hat Network repositories anymore:

    subscription-manager config --rhsm.manage_repos=0

    2- Inspect the repository list:

    dnf repolist

    As we can see, there are no repositories available – this is the expected behavior after disabling the Red Hat Network repositories:

    3- In our case, we’re adding a manual entry on /etc/hosts to reach the HTTP server by its hostname or FQDN:

    echo "192.168.255.161   rhel8-install.lab.local   rhel8-install" >> /etc/hosts
    ping -c 2 rhel8-install.lab.local

    4- Test the HTTP server connectivity from the client system:

    curl http://rhel8-install.lab.local

    You should have something like it – indicating that the HTTP server is available and working as expected:

    5- Create a new repository file to specify the local repositories – the file must have the “.repo” extension:

    touch /etc/yum.repos.d/local.repo

    And add the following content:

    [MyLocalRepo_BaseOS]
    name=MyLocalRepo BaseOS
    baseurl=http://rhel8-install.lab.local/BaseOS
    enabled=1
    gpgcheck=0
    
    [MyLocalRepo_AppStream]
    name=MyLocalRepo AppStream
    baseurl=http://rhel8-install.lab.local/AppStream
    enabled=1
    gpgcheck=0

    6- Inspect the system’s repositories:

    dnf repolist

    As we can see, the system is using the new repos now:

    7- Install a package to test. In this case, for instance, let’s install the “nmap” package:

    dnf install nmap -y

    The “nmap” package was installed using the local repo:

    That’s it for now 🙂

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleScheduling with at and cron on RHEL
    Next Article What are Module Streams on RHEL?
    Danilo

    Infrastructure Engineer with experience in Virtualization, Linux, Windows Server and learning automation using Python. DPC Virtual Tips was created to share practical tutorials, lab experiences and troubleshooting guides focused on enterprise infrastructure technologies.

    Related Posts

    Linux Server Has Free Memory but Is Swapping: Why?

    August 13, 2026

    How to Determine Whether Packet Loss Is Local or Network Related on Linux

    August 12, 2026

    How to Investigate TCP Retransmissions on Linux

    August 11, 2026

    Comments are closed.

    Search
    Categories
    • HPC (12)
    • Operating Systems (85)
    • PowerFlex (22)
    • Virtualization (130)
    Read More
    Virtualization

    How to Troubleshoot Packet Drops on an ESXi Host

    By DaniloAugust 16, 20260
    HPC

    SlurmDBD Is Down: What Continues Working and What Does Not

    By DaniloAugust 15, 20260
    HPC

    How to Investigate Jobs Stuck in COMPLETING State on Slurm

    By DaniloAugust 14, 20260
    Operating Systems

    Linux Server Has Free Memory but Is Swapping: Why?

    By DaniloAugust 13, 20260
    Operating Systems

    How to Determine Whether Packet Loss Is Local or Network Related on Linux

    By DaniloAugust 12, 20260
    Latest Posts

    How to Troubleshoot Packet Drops on an ESXi Host

    August 16, 2026

    SlurmDBD Is Down: What Continues Working and What Does Not

    August 15, 2026

    How to Investigate Jobs Stuck in COMPLETING State on Slurm

    August 14, 2026
    Images from Gallery
    hpc main commands
    linux commands
    install rock linux
    lustre fs
    shell scripting
    vSAN Trace Files
    Categories
    • HPC
    • Operating Systems
    • PowerFlex
    • Virtualization
    • Home
    • About Us
    • Contact
    • Cookie Policy
    • Comment Policy
    • Privacy Policy
    • Terms of Use
    • Disclaimer
    Copyright © 2026, DPC Virtual Tips. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.

    We use cookies to ensure your best experience on our website. If you continue using our website, we'll assume you agree to our cookie policy