How do I upgrade a Prod Server to Match a Test Server using Subscription Manger or just yum/rpm Rhel 6.6
I a Prod and Test server. both running Rhel 6.6 but Test has newer installed packages and Kernel then Prod.
I need to get Prod to match Test. I have tried the following but when I try to downloadonly, yum will try to install
newer packages even know I have the rhel version set to 6.6
Here is how I try to create a localinstall, Is there a better way ?
On Test Server
rpm -qa --last > list
vi list # remove old installs from list,
cat list | cut -d " " -f1 > list1 # removes date from every line
vi list1 #added this under vi editor # 1,$s/^/echo y | yum upgrade --downloadonly --downloaddir=\/home\/userone\/packages /g
Then on Prod Server.
mkdir /home/userone/packages
./list1
yum localupdate *.rpm
Here is where I yum will install newer packages.... Please Help.
Michael.
[root@bhtapp72401v packages]# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux Server
Product ID: 69
Version: 6.6
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 04/04/2016
Ends: 04/03/2017
Responses
I would expect yum to respect the specified local package as long as all its dependencies are installed and nothing needs to be additionally updated from CDN. Could you copy and paste the output of the two yum commands?
Alternatively, if you have the packages on your Prod server, you can use plain rpm (instead of yum) to install them. The '-F' option will 'freshen' those packages whose earlier versions are installed and ignore those packages that are already installed. Would that work for you? The complete syntax is "rpm -Fhv *.rpm" (in the directory with the downloaded .rpm files).
To add a bit more what Radek said - if you take the Test -> Production relation seriously, all the package actions should be handled by configuration management and all the customization done by hand should be strictly forbidden. Comparing RPM packages and trying to replay one server settings to another may lead to serious issues...
I must say I'm not familiar with "subscription-manager release", but AFAICT, this command doesn't actually prevent your system from receiving updates intended for the latest minor version, ie. 6.8 at the moment. Have you considered using RHEL 6.6 Extended Update Support, which contains 6.6 and continues to provide security updates and other important errata? Then, when you switch both systems to this kind of support and run "yum update", they will both end up with the same packages, latest in 6.6 EUS and fully supported.
That's what I don't understand, either. Is there anything suspicious in the output from 'yum localupdate *rpm' that might explain why the local file is ignored and the latest version from RHSM preferred?
Also, if you don't need anything from RHSM and still want to update to the locally downloaded packages, can you just disable all the offending RHSM repos? (by running 'subscription-manager repos --disable=*' or editing /etc/yum.repos.d/redhat.repo accordingly)
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
