Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Requirements

One will always need This method will work best with a connected computer with same OS and Version in order to ascertain the dependent packages that need to be downloaded by the Package Manager for the disconnected (air-gapped) computer.
sudo will only be used when necessary.

Centos 7 Example

  • On Redhat and Centos OS, tar and libnsl may need to be pre-installed as they are needed to unpack the installer runfile

    :# Navigate

    .
    On the disconnected (air-gapped) computer we will firstly determine which pre-installation required packages need to be downloaded:

    # Navigate to a clean directory to download packages to
    mkdir -p /tmp/omk_opXyz_packages

    cd dependency: /bin/sh
    provider: bash.x86_64

    cd /tmp/omk_opXyz_packages/


    # Extract the list of dependent packages - I've used sort and formatted the results
    # to make the needed comparison to those packages already installed easier:
    # to see  the unsorted results run command yum -q deplist tar

    ;
    package: tar.x86_64 2:1.26-35.el7provider: libacl.x86_64


    yum -q deplist tar|grep -e "package:" -e "provider:"|sed -r -e 's/^\s*(package|provider):\s+(.+?)$/\2/' -e 's/ /\t\t\t\t/'|sort|uniq

    bash.x86_64                                  4.2.46-34.el7

    dependency: /sbin/install-info
    provider: info.x86_64 5.1-5.el7
    dependency: libacl.so.1()(64bit)
    provider: glibc.x86_64

    glibc.i686                                       2.17-307.el7.1
    glibc.x86_64                                 2.17-307.el7.1
    info.x86_64                                   5.1-5.el7
    libacl.x86_64                                2.2.51-15.el7

    dependency: libacl.so.1(ACL_1.0)(64bit)
    provider: libacl.x86_64 2.2.51-15.el7
    dependency: libc.so.6(GLIBC_2.17)(64bit)

    libselinux.x86_64                        2.5-15.el7
    tar.x86_64                                     2:1.26-35.el7


    # libnsl is not needed in this example as no package is returned:
    yum -q deplist libnsl


    # Now we grep from the list yum returns of installed packages THAT WE ALREADY HAVE on this disconnected (air-gapped) computer
    yum list installed|grep -e tar.x86_64 -e "^bash.x86_64" -e "^info.x86_64" -e "^libacl.x86_64" -e "^libacl.x86_64" -e "^glibc.x86_64" -e "^libselinux.x86_64" -e "^glibc.x86_64" -e "^glibc.i686"|sort

    bash.x86_64                                  4.2.46-34.el7                      @anaconda
    glibc.x86_64                                  2.17-307.el7.1                   @anaconda
    info.x86_64                                   5.1


    dependency: libselinux.so.1()(64bit)
    provider: libselinux.x86_64 2.5-15.el7
    dependency: rtld(GNU_HASH)
    provider: glibc.x86_64 2

    -5.el7                              @anaconda
    libacl.x86_64                                 2.2.51-15.el7                     @anaconda
    libselinux.x86_64                         2.5-15.el7                           @anaconda
    tar.x86_64                                      2:1.26-35.el7                     @anaconda


    # I have crossed out the packages this disconnected (air-gapped) computer already has up to date versions of, which leaves us with the following packages needed:

    glibc.i686                                       2.17-307.el7.1


  • Using the connected computer with same OS and Version we will firstly fetch the pre-installation required packages

  • On the disconnected (air-gapped) computer we will firstly determine which pre-installation required packages need to be downloaded:

    # Navigate to a clean directory to download packages to
    mkdir -p /tmp/omk_opXyz_packages
    cd /tmp/omk_opXyz_packages/


    # Extract the list of dependent packages - I've used sort and formatted the results
    # to make the needed comparison to those packages already installed easier:
    # to see  the unsorted results run command yum -q deplist tar
    yum -q deplist tar|grep -e "package:" -e "provider:"|sed -r -e 's/^\s*(package|provider):\s+(.+?)$/\2/' -e 's/ /\t\t\t\t/'|sort|uniq

    bash.x86_64                                  4.2.46-34.el7
    glibc.i686                                       2.17-307.el7.1
    glibc.x86_64                                 2.17-307.el7.1

    provider: glibc.i686 2.17-307.el7.1

    info.x86_64                                   5.1-5.el7
    libacl.x86_64                                2.2.51-15.el7
    libselinux.x86_64                        2.5-15.el7
    tar.x86_64                                     2:1.26-35.el7


    # libnsl is not needed in this example as no package is returned:
    yum -q deplist libnsl

    # Download each of the dependent packages - I've included duplicates in this example:
    yumdownloader tar.x86_64 bash.x86_64 info.x86_64 libacl.x86_64 libacl.x86_64 glibc.x86_64 libselinux.x86_64 glibc.x86_64


    # Now we grep from the list yum returns of installed packages THAT WE ALREADY HAVE on this disconnected (air-gapped) computer
    yum list installed|grep -e tar.x86_64 -e "^bash.x86_64" -e "^info.x86_64" -e "^libacl.x86_64" -e "^libacl.x86_64" -e "^glibc.x86_64" -e "^libselinux.x86_64" -e "^glibc.x86_64" -e "^glibc.i686"|sort

    bash.x86_64                                  4.2.46-34.el7                      @anaconda
    glibc.x86_64                                  2.17-307.el7.1                   @anaconda
    info.x86_64                                   5.1-5.el7                              @anaconda
    libacl.x86_64                                 2.2.51-15.el7                     @anaconda
    libselinux.x86_64                         2.5-15.el7                           @anaconda
    tar.x86_64                                      2:1.26-35.el7                     @anaconda


    # I have crossed out the packages this disconnected (air-gapped) computer already has up to date versions of, which leaves us with the following packages needed:

    glibc.i686                                       2.17-307.el7.1


  • Using the connected computer with same OS and Version we will firstly fetch the pre-installation required packages

  • # Download each of the dependent packages - I've included duplicates in this example:
    yumdownloader glibc.i686

    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    epel/x86_64/metalink | 2.8 kB 00:00:00
    * base: mirror.ventraip.net.au
    * epel: mirror.aarnet.edu.au
    * extras: mirror.ventraip.net.au
    * updates: mirror.ventraip.net.au
    base | 3.6 kB 00:00:00
    epel | 4.7 kB 00:00:00
    extras | 2.9 kB 00:00:00
    updates | 2.9 kB 00:00:00
    ignoring a dupe of libacl-2.2.51-15.el7.x86_64
    ignoring a dupe of glibc-2.17-307.el7.1.x86_64
    (1/7): libacl-2.2.51-15.el7.x86_64.rpm | 27 kB 00:00:00
    (2/7): bash-4.2.46-34.el7.x86_64.rpm | 1.0 MB 00:00:00
    (3/7): libselinux-2.5-15.el7.x86_64.rpm | 162 kB 00:00:00
    (4/7): info-5.1-5.el7.x86_64.rpm | 233 kB 00:00:00
    (5/7): tar-1.26-35.el7.x86_64.rpm | 846 kB 00:00:00
    (6/7): glibc-2.17-307.el7.1.i686.rpm | 4.3 MB 00:00:01
    (7/7): glibc-2.17-307.el7.1.x86_64.rpm

    # Downloaded packages will now be in the current directory:
    ls -la

    -rw-r--r--. 1 root root 1037976 Apr 3 20:49 bash-4.2.46-34.el7.x86_64.rpm
    -rw-r--r--. 1 root root 4463036 Apr 3 21:12 glibc-2.17-307.el7.1.i686.rpm
    -rw-r--r--. 1 root root 3815032 Apr 3 20:52 glibc-2.17-307.el7.1.x86_64.rpm
    -rw-r--r--. 1 root root 238564 Apr 25 2018 info-5.1-5.el7.x86_64.rpm
    -rw-r--r--. 1 root root 27976 Apr 3 20:55 libacl-2.2.51-15.el7.x86_64.rpm
    -rw-r--r--. 1 root root 166012 Apr 3 20:59 libselinux-2.5-15.el7.x86_64.rpm
    -rw-r--r--. 1 root root 865848 Nov 12 2018 tar-1.26-35.el7.x86_64.rpm