RHEL Repo
I have a RHEL 6.9 Machine. I am able to easily pull a mirror of RHEL 6 repos, but I need to also pull a repo of 7 (I have offline machines that are running 7, it just so happens that I cannot connect these machines up and have to use my 6.9 machine). How do I also create a repo for 7.2, using a 6.9 machine?
Additionally, is there a good list and set of instructions to get all the different repos I may need; basic, optional, etc?
Thank you!
Responses
Jim,
Ideally you would be using Satellite to achieve this (especially for different OS versions).
In saying that, there are some (fairly hacky) workarounds to achieve this. One I have used in the past is to register to multiple versions and then switch between versions in a scheduled job using the 'release --set' option in subscription-manager.
subscription-manager release --set=6.3
This also required some fairly tedious switching on/off of subscribed channels so you don't sync everything from both versions in both sync operations.
https://access.redhat.com/solutions/23016
I did for example:
sudo reposync --gpgcheck -l --repoid=rhel-7-server-rpms --downloadcomps --download-metadata sudo createrepo -v -g comps.xml
Now as you wish to clone repos across version, you could try (but I don't know if it works, it's just an idea) copying in the correct YUM repo lines from a 7 (to your 6), rename them, perhaps prefix the repos with say [spoof7-xxxx] and then try using the above command with the name of the repo. I guess you'd have to hardcode the releasever also in the spoofing line, otherwise it will go to 6.
I don't believe reposync works across multiple major versions. If you have a registered 6.x server, you cannot create and sync a 7.x repo. You can specify the different version with --repoid, but it won't actually download anything.
I've heard that Spacewalk can be used to sync RHEL repositories using mrepo, but I've never done it myself.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
