How do I upgrade a Prod Server to Match a Test Server using Subscription Manger or just yum/rpm Rhel 6.6

Latest response

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...

Good Morning, Radek, I do not have a saved copy of the out put and I turned over the server to the Data Base Group already. It is not a perfect match. both scripts have issues, it I set the the subscription-manager release --set 6.7 it ties to put down newer packages from redhat.com if I set it to 6.6 it does the same even after doing a Yum Clean All, I will try using your rpm -Fhv *rpm next time. I did not build the Prod server, I am new here.

Zdenek, Thanks for your input...!

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.

Radek, I will try that, But when I do a yum localupdate and I have the Rhel Release set to 6.6 from the Red Hat Subscription Manager how do I stop Yum from trying to down load Newer Releases of the Packages that I have down loaded to my install Directory ? example: I have Kernel 2.6.32-504 in my install DIR, put the yum localupdate *rpm with try and install 2.6.32.573

Michael.

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)

No, nothing other than downloading and wanting to update newer version, I did clean yum first... maybe a bug with Rhel 6.6 ? The Disable is a Great IDEA, I will try that next time. For now on my 6.8 Prod servers that are 3 months behind my Test servers. I save the Installed RPM's from Test and move them to the Prod servers for an update 3 months later.

Thanks For trying to help.....

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.