Yum update to specific release from a local repository
Hello,
We maintain local RHEL repositories because there is no Internet access in the data center. The repositories were created (from a machine with Internet access) using commands similar to these:
reposync --downloadcomps --download-metadata --arch=x86_64 --repoid=rhel-7-server-rpms --delete --download_path=/var/repos/7/
createrepo -s sha256 --checkts --update --workers=2 -g /var/repos/7/rhel-7-server-rpms/comps.xml /var/repos/7/rhel-7-server-rpms
Did not pass newest-only to reposync because I want to use the repository for servers running RHEL 7.3 and 7.4.
(Created EUS repositories as well.)
Servers have to be running specific releases for application compatibility.
yum --releasever=7.3 and distroverpkg=redhat-release in /etc/yum.conf do not appear to work without subscribtion-manager.
Is there a way to "yum update" 7.3 and 7.4 servers from the above repositories without ending up with 7.5?
If versionlock is the only option, is there an easy way to generate a versionlock list for 7.3 and 7.4?
Thank you
Responses
Hi David,
You could lock a specific release for updates using the command (this would set minor release version to RHEL7.3 ):
# subscription-manager release --set=7.3
After setting this, you may clean up cache files and run repolist to rebuild repository.
#yum clean all
#yum repolist
I hope this helps.
All the best!
Hi David,
It seems that plugins are still loaded and active, you could disable it by adding "plugins=0" to /etc/yum.conf file.
Later add "distroverpkg=redhat-release" to your /etc/yum.conf and set 'plugins=0' and then try cleaning cache files, after that check for yum update.
I also understand that from the system where you are trying to run 'yum check-update' is either 7.3/7.4 release, and you've populated all release repos offline earlier till up to 7.5. If so, then the above method should have worked, however, I've not yet tested such methods of offline mode. Need to try...
Could you also paste the output of 'yum repolist', 'ls /etc/yum.repos.d/' for further understanding?
All the best!
Hi David,
If these systems are always offline, it should not be a problem to which ever release version yum is set.
When you manually apply matching updates you've downloaded before, it is more or less unimportant.
And as you say that the systems are not even registered, the repositories can't be accessed anyway. :)
Regards,
Christian
Hi David,
When you don't register the systems, using subscription-manager cannot work - of course - and using yum for online updates
also can not work when you don't have internet access. The only thing left to do for what you want to achieve, is to download
selected updates (continuously) by using an online system and then install these updates manually on your offline systems. :)
Regards,
Christian
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
