In this guide, we will learn how to set up a RHEL 10 local repository using HTTPD. A local repository is useful in offline or restricted environments where systems cannot access Red Hat CDN. This step-by-step tutorial is designed for Linux system administrators and beginners.
Prerequisites for RHEL 10 Local Repository Setup:
----------------------------------------------------------------------------------------------------
Role IP Address
Repository Server 192.168.10.104
Client Server 192.168.10.105
----------------------------------------------------------------------------------------------------
Step 1: Install and Configure HTTPD on the Repository Server
Log in to the repository server (192.168.10.104) and install the Apache web server:
# dnf install httpd -y
Enable and start the HTTPD service:
# systemctl enable httpd
# systemctl start httpd
Verify that the service is running:
# systemctl status httpd
You should see the service in an active (running) state.
Step 2: Create Repository Directory
Navigate to the Apache document root and create a directory for RHEL 10 content:
# cd /var/www/html/
# mkdir rhel10
This directory will host the repository files.
Step 3: Mount RHEL 10 ISO and Copy Repository Files
Mount the RHEL 10 ISO image on your local computer or directly on the repository server.
Copy the BaseOS and AppStream directories from the mounted ISO into the repository directory:
After copying, your directory structure should look like this:
/var/www/html/rhel10/
├── BaseOS
└── AppStream
Step 4: Configure Local Repository File
Navigate to the repository configuration directory:
# cd /etc/yum.repos.d/
Create a new repository file:
# vi local.repo
Add the following content: Example
[PPC.COM-BaseOS]
name=PPC.COM for RHEL - BaseOS
baseurl=http://192.168.10.104/rhel10/BaseOS
enabled=1
gpgcheck=0
[PPC.COM-AppStream]
name=PPC.COM for RHEL - AppStream
baseurl=http://192.168.10.104/rhel10/AppStream
enabled=1
gpgcheck=0
Save and exit the file.
Step 5: Restart HTTPD Service
Restart Apache to ensure it serves the new content correctly:
# systemctl restart httpd
Step 6: Configure the Client Server
Log in to the client server (192.168.10.105).
Clear existing DNF cache and verify repositories (optional but recommended):
# dnf clean all
# dnf repolist
Now install a package to test the repository:
# dnf install httpd -y
If the installation completes successfully, your local repository is working 🎉
Conclusion:
Configuring a RHEL 10 local repository using HTTPD is an efficient solution for managing packages in offline or controlled environments. This setup improves reliability, speeds up installations, and gives administrators full control over updates.
Welcome to TechSysAdm, your go-to blog for practical insights, troubleshooting tips, and best practices in managing mission-critical enterprise systems. Here, we cover everything from AIX, RHEL, SUSE Linux, Solaris, VMware, and Windows servers to enterprise databases and DevOps environments, helping IT professionals optimize performance, ensure reliability, and solve complex system challenges.
How to Set Up RHEL 10 Local Repository Using HTTPD (Step-by-Step Guide)
Welcome to TechSysAdm, your go-to blog for practical insights, troubleshooting tips, and best practices in managing mission-critical enterprise systems. Here, we cover everything from AIX, RHEL, SUSE Linux, Solaris, VMware, and Windows servers to enterprise databases and DevOps environments, helping IT professionals optimize performance, ensure reliability, and solve complex system challenges.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment