This document is to create a YUM server using RHEL installer ISO file.
Install a RHEL VM with 2 GB RAM, 1 vCPU and 80 GB HDD.
Create a repository folder inside VM
mkdir -p /rhel75/repo
- Mount the ISO using mount command and copy the Packages folder into your repository folder
cp /run/media/vcloud/RHEL-7.5\ Server.x86_64/Packages/* /rhel75/repo/
- Install createrepo package if it is not installed during OS installation
cd /rhel75/repo
rpm -ivh createrepo-0.9.9-28.el7.noarch.rpm
- Create repository
createrepo /rhcelab/repo/
- Clean YUM cache
yum clean all
- Update the rhcelab.repo file to point to your local repository folder
vi /etc/yum.repos.d/rhcelab.repo
[rhcerepo]
name=rhcerepo
baseurl=file:///rhel75/repo/
enabled=1
gpgcheck=0
- List the repolist
yum repolist
- For testing, try to install any package
yum install redhat-lsb
Top comments (0)