Setting up an offline YUM repository in Linux allows you to manage packages without internet connectivity. This guide covers configuring an offline YUM repository for RHEL 9 and Oracle Linux. Follow these steps to create and use a local repository with ISO files or DVDs.
Table of Contents
1. Insert the DVD or Mount the ISO File
Insert the RHEL 9 installation DVD or mount the ISO file on your server. For virtual machines, go to the VM settings, navigate to Storage, and select the ISO file.
2. Mount the RHEL 9 ISO File / Installation DVD
Create a directory to mount the ISO file:
Mount the ISO file:
Alternatively, if the ISO file is on disk:
3. Configure the Repository by Setting Up the .repo File
Copy the media.repo
file from the mounted directory:
Rename and set permissions for the file:
Edit the redhat9.2.repo
file with the following configuration:
4. Clean Yum/DNF and Subscription Manager Cache
Clear the cache to ensure Yum/DNF operates correctly:
5. Verify Whether Yum/DNF is Successfully Retrieving Packages
Check if packages are being retrieved from the local repository:
6. Install Packages Using the DNF/Yum Package Manager
To install a package, such as make
, use the following command:
This will confirm that the local YUM/DNF repository is working correctly.
Stay Connected to GenAiApex.com
Post a Comment
0Comments