How to set up RHEL to use ISO as local repository?
Issue Description:
Installing the Automation Suite requires additional RPM packages, some of which are not included in the default Red Hat installation. For users who do not have internet access or a private repository, it is difficult to install all the required RPM packages offline.
One option is to mount the Red Hat ISO and use it as a software repository.
Prerequisites:
Root access
Redhat ISO
- Same version as the installed RHEL
- Must be full version (x86_64DVD iso) , the Boot iso won’t work
General Process:
- Create a directory
mkdir /mnt/RHEL
- Insert or connect the ISO to the VM's C drive
mount /dev/sr0 /mnt/RHEL
- or directly mount the iso file .
mount /path/to/image.iso /mnt/RHEL -o loop
- Setup local repository to read the mounted ISO
- create localyum.repo
vi /etc/yum.repos.d/localyum.repo
- Add the below content and save the file, update the highlighted folder path to match the environment.
[BaseOS]
name=BaseOS
baseurl=file:///mnt/RHEL/BaseOS
enabled=1
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:///mnt/RHEL/AppStream
enabled=1
gpgcheck=0
- Save the file and try to install the necessary software package.