- Server registered with the appropriate version of RedHat
- HTTP/FTP server to host repo files
InstructionsInstall required components for managing yum repositories and createrepo utility for building new repo indexes.
yum install yum-utils createrepo
Register with RedHat to gain access to their repos
subscription-manager register --username $username --password $password --auto-attach
Repos will be populated automatically upon registration and you can then list them using:
subscription-manager repos --list
Download the repos to a path of your chosing
reposync --gpgcheck -l --repoid=$repoid --download_path=$path
Create the repo against the directory where your rpm packages exist
Enable the local repo
name=Red Hat Enterprise Linux 7 - x86_64
Ensure the repo works, this will likely build the index at the same time. I've seen elsewhere where cache is refreshed using yum makecache but I haven't run into a scenario where I have to do that yet.