0

we performed upgrade from rhel 7.2 to rhel 7.6

the upgrade was by yum update ( from redhat repertoires )

subscription-manager release --set=7.6
subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"

and then we performed

yum update

we can see also the update from yum history

yum history
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    31 | update                   | 2020-09-11 09:10 | I, O, U        |  899 EE

during update more the 300 rpm was update/installed

but since now we want to do the yum update offline on other machine without network connection I am asking if we can captured all the rpm's that was installed ( during yum update )

so it is possible to captured all rpm's list that was installed

I am asking this because , if I have the list of the rpm's then I can download them by yumdownloader

what I found is that

 yum history info 31 | grep  Updated
    Updated       rpm-4.11.3-17.el7.x86_64                  @anaconda/7.2
    Updated       subscription-manager-1.15.9-15.el7.x86_64 @anaconda/7.2
    Updated       yum-3.4.3-132.el7.noarch                  @anaconda/7.2
    Updated       yum-langpacks-0.4.2-4.el7.noarch          @anaconda/7.2
    Updated     ModemManager-1.1.0-8.git20130913.el7.x86_64                    @anaconda/7.2
    Updated     ModemManager-glib-1.1.0-8.git20130913.el7.x86_64               @anaconda/7.2
    Updated     NetworkManager-adsl-1:1.0.6-27.el7.x86_64                      @anaconda/7.2
    Updated     NetworkManager-config-server-1:1.0.6-27.el7.x86_64             @anaconda/7.2
    Updated     NetworkManager-glib-1:1.0.6-27.el7.x86_64                      @anaconda/7.2
    Updated     NetworkManager-libnm-1:1.0.6-27.el7.x86_64                     @anaconda/7.2
    Updated     NetworkManager-libreswan-1.0.6-3.el7.x86_64                    @anaconda/7.2
    Updated     NetworkManager-libreswan-gnome-1.0.6-3.el7.x86_64              @anaconda/7.2
    Updated     NetworkManager-team-1:1.0.6-27.el7.x86_64                      @anaconda/7.2

.
.
.

is it the real approach to captured all rpm's that was installed from yum update?

5
  • Sorry for the product plug, but the real approach is to use Red Hat Satellite. (I work for Red Hat, so I’m biased, but seriously, given the amount of time you spend dealing with offline updates, and choosing which releases to upgrade to, you’d probably benefit from using Satellite.) – Stephen Kitt Sep 11 '20 at 10:20
  • yes you are right but the reason that we not use RHN is money -:( – yael Sep 11 '20 at 10:25
  • You mean you’re using RHEL on more systems than you have licenses for? – Stephen Kitt Sep 11 '20 at 11:19
  • not exactly - the RHN license cost money – yael Sep 11 '20 at 15:34
  • Every RHEL subscription you have should allow you to connect a system using the subscription manager, and get updates directly on that system. The RHN proxy and Satellite products cost extra, but you don’t need them to enable updates on a system with a valid subscription. – Stephen Kitt Sep 11 '20 at 15:46
1

Yum downloads packages in /var/cache/yum/<repo>/packages. So if you copy the rpms from this directory to another server on the same path it should do the trick. But have in mind:

  • The best approach would be to clean up packages first on the internet connected machine, so that only the updated/installed of the latest yum update run will remain and be copied. On the other hand that would mean that delta rpm mechanism will not be used and the full size of each rpm will have to be downloaded, not the differences only.

  • If the target machine has no access at all to the Internet, yum will not be notified of the newer packages available. So after copying the rpms, you would use yum install ./*.rpm to install them. The approach I've used on low Internet bandwidth machines is to run yum check-update while connected to the net and then, after all rpms are copied to /var/cache/yum/<repo>/packages to update. Yum will find the rpms in the cache and will not download them from net.

If you need to update lots of machines often, the best way to proceed is to setup a local repository and update server. It's an easy task, you'll find many guides on how-to.

3

Red Hat has a solution article that covers the possible approaches for updating a disconnected system: How can we regularly update a disconnected system (A system without internet connection)?.

The available options are as follows.:

  1. Set up a Red Hat Satellite server. This requires an additional subscription. The Satellite server connects to the online Red Hat repositories. All systems connect to Satellite server to download the updates.

  2. Download the updates on another, connected system. Transfer the packages to the target system and update.

  3. Use release media (DVD/ISO images of specific release versions).

  4. Manually download packages from the Red Hat website. This is a time-consuming approach, difficult to automate, and you have deal with dependency resolution manually.

  5. Create a local repository. This approach involves using the reposync tool to download packages to one system. The packages are then exposed to the other system as yum repository using HTTP/NFS/FTP.


In your case, you seem to be working with the second approach. Further details on this method can be found here: How to update an offline Red Hat Enterprise Linux server without network connection to Red Hat/Proxy/Satellite?. This article recommends copying over the RPM database from the target system, and then using yum update --downloadonly to get the new packages.

You can investigate the other options as well, and see if they are better suited to the task. Since you're currently trying to upgrade from 7.2 to 7.6, using the 7.6 release media (third approach) might work well.

For a more long-term solution, I would advise looking at the first approach (Satellite) or the fifth approach (local repository). Those methods are more centralized and offer better automation possibilities.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.