How to create Local Repositories in RHEL
There're plenty of documents out there, given a set of RPM packages, you could do something like this,
First install the createrepo script, by
rpm -ivh /path/to/mounted/cdrom/createrepo*.rpm
(Depends where you mounted your RedHat DVD)
Now create a folder to hold all RPMS that you want to be in the repository, e.g RPMS
, and put the needed "*.rpm" files inside,
Then do createrepo /path/to/RPMS
to generate metadata.
When finished, add the repository to your yum config, e.g put the following to /etc/yum.repos.d/local.repo
[local]
name=Local Repository Demo
baseurl=file:///absolute/path/to/RPMS
enabled=1
gpgcheck=0
protect=1
The first thing you need to do is:
Either (not both) of:
- Pay for a Red Hat subscription for the machine.
- Convert the system to CentOS.
Then you should find that you are able to access software and complete your task.