Centos 7オフラインインストールdnf

38765 ワード

DNFはYUMに代わる次世代のパッケージマネージャであり,今回の実験ではCentos 7に体験DNFをインストールする.
実験環境Centos 7を実行している2台の仮想マシンのうち1台がインターネットにアクセスできること
  • ISOミラーファイルを/media/cdromローカルyum倉庫
  • にマウント
  • デフォルト/etc/yum.repos.d/centOS-Base.repoウェアハウス
  • が有効
  • dnf関連rpmパッケージを/dev/shmディレクトリの下
  • にダウンロード
  • rpmパッケージdnf-rpm.tarをパッケージ化して、別の外部ネットワークのない仮想マシンに
  • アップロードします.
  • dnf-rpm.tarを解凍yumでdnfをインストールし、dnfでhttpd
  • をインストールします.
  • yum履歴アンインストールdnf
  • を呼び出す
    [root@node2 shm]# df 
    Filesystem     1K-blocks    Used Available Use% Mounted on
    /dev/sda3       10475520 1254472   9221048  12% /
    devtmpfs          486804       0    486804   0% /dev
    tmpfs             497960    5452    492508   2% /dev/shm
    tmpfs             497960    7692    490268   2% /run
    tmpfs             497960       0    497960   0% /sys/fs/cgroup
    /dev/sr0         4480476 4480476         0 100% /media/cdrom
    /dev/sda1         999320   99272    831236  11% /boot
    
    [root@node2 shm]# yum install dnf  --downloadonly --downloaddir=/dev/shm
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.huaweicloud.com
     * extras: mirrors.huaweicloud.com
     * updates: mirrors.huaweicloud.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
    --> Processing Dependency: python2-dnf = 4.0.9.2-1.el7_6 for package: dnf-4.0.9.2-1.el7_6.noarch
    --> Running transaction check
    ---> Package python2-dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
    --> Processing Dependency: dnf-data = 4.0.9.2-1.el7_6 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: python2-hawkey >= 0.22.5 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Running transaction check
    ---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
    ---> Package dnf-data.noarch 0:4.0.9.2-1.el7_6 will be installed
    --> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-1.el7_6.noarch
    ---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
    --> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
    ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
    ---> Package python2-hawkey.x86_64 0:0.22.5-1.el7_6 will be installed
    --> Processing Dependency: libdnf(x86-64) = 0.22.5-1.el7_6 for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    --> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    --> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    --> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    --> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    --> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    --> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
    ---> Package python2-libcomps.x86_64 0:0.1.8-12.el7 will be installed
    --> Processing Dependency: libcomps(x86-64) = 0.1.8-12.el7 for package: python2-libcomps-0.1.8-12.el7.x86_64
    --> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-12.el7.x86_64
    ---> Package python2-libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
    --> Running transaction check
    ---> Package libcomps.x86_64 0:0.1.8-12.el7 will be installed
    ---> Package libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
    ---> Package librepo.x86_64 0:1.8.1-7.el7 will be installed
    ---> Package libreport-filesystem.x86_64 0:2.1.11-42.el7.centos will be installed
    ---> Package libsolv.x86_64 0:0.6.34-2.el7 will be installed
    ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ======================================================================================================================================
     Package                               Arch                    Version                                  Repository               Size
    ======================================================================================================================================
    Installing:
     dnf                                   noarch                  4.0.9.2-1.el7_6                          extras                  357 k
    Installing for dependencies:
     deltarpm                              x86_64                  3.6-3.el7                                iso                      82 k
     dnf-data                              noarch                  4.0.9.2-1.el7_6                          extras                   51 k
     libcomps                              x86_64                  0.1.8-12.el7                             extras                   75 k
     libdnf                                x86_64                  0.22.5-1.el7_6                           extras                  533 k
     libmodulemd                           x86_64                  1.6.3-1.el7                              extras                  141 k
     librepo                               x86_64                  1.8.1-7.el7                              base                     81 k
     libreport-filesystem                  x86_64                  2.1.11-42.el7.centos                     iso                      39 k
     libsolv                               x86_64                  0.6.34-2.el7                             base                    328 k
     libyaml                               x86_64                  0.1.4-11.el7_0                           iso                      55 k
     python-enum34                         noarch                  1.0.4-1.el7                              iso                      52 k
     python2-dnf                           noarch                  4.0.9.2-1.el7_6                          extras                  414 k
     python2-hawkey                        x86_64                  0.22.5-1.el7_6                           extras                   68 k
     python2-libcomps                      x86_64                  0.1.8-12.el7                             extras                   47 k
     python2-libdnf                        x86_64                  0.22.5-1.el7_6                           extras                  608 k
    
    Transaction Summary
    ======================================================================================================================================
    Install  1 Package (+14 Dependent packages)
    
    Total download size: 2.9 M
    Installed size: 11 M
    Background downloading packages, then exiting:
    (1/11): libcomps-0.1.8-12.el7.x86_64.rpm                                                                       |  75 kB  00:00:00     
    (2/11): libdnf-0.22.5-1.el7_6.x86_64.rpm                                                                       | 533 kB  00:00:00     
    (3/11): libsolv-0.6.34-2.el7.x86_64.rpm                                                                        | 328 kB  00:00:00     
    (4/11): dnf-4.0.9.2-1.el7_6.noarch.rpm                                                                         | 357 kB  00:00:00     
    (5/11): libmodulemd-1.6.3-1.el7.x86_64.rpm                                                                     | 141 kB  00:00:00     
    (6/11): python2-dnf-4.0.9.2-1.el7_6.noarch.rpm                                                                 | 414 kB  00:00:00     
    (7/11): python2-libdnf-0.22.5-1.el7_6.x86_64.rpm                                                               | 608 kB  00:00:00     
    (8/11): librepo-1.8.1-7.el7.x86_64.rpm                                                                         |  81 kB  00:00:00     
    (9/11): python2-hawkey-0.22.5-1.el7_6.x86_64.rpm                                                               |  68 kB  00:00:01     
    (10/11): python2-libcomps-0.1.8-12.el7.x86_64.rpm                                                              |  47 kB  00:00:01     
    (11/11): dnf-data-4.0.9.2-1.el7_6.noarch.rpm                                                                   |  51 kB  00:00:02     
    --------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                 1.1 MB/s | 2.9 MB  00:00:02     
    exiting because "Download Only" specified
    [root@node2 shm]# ls /dev/shm/
    dnf-4.0.9.2-1.el7_6.noarch.rpm       libmodulemd-1.6.3-1.el7.x86_64.rpm      python2-hawkey-0.22.5-1.el7_6.x86_64.rpm
    dnf-data-4.0.9.2-1.el7_6.noarch.rpm  librepo-1.8.1-7.el7.x86_64.rpm          python2-libcomps-0.1.8-12.el7.x86_64.rpm
    libcomps-0.1.8-12.el7.x86_64.rpm     libsolv-0.6.34-2.el7.x86_64.rpm         python2-libdnf-0.22.5-1.el7_6.x86_64.rpm
    libdnf-0.22.5-1.el7_6.x86_64.rpm     python2-dnf-4.0.9.2-1.el7_6.noarch.rpm
    
    [root@node2 shm]# tar -cf /tmp/dnf-rpm.tar ./ 

    もう1台の外部ネットワークのない仮想マシンはISOミラーのみをyum倉庫として使用しています
    [root@localhost shm]# ls
    dnf-rpm.tar
    [root@localhost shm]# tar -xf dnf-rpm.tar 
    [root@localhost shm]# ls
    dnf-4.0.9.2-1.el7_6.noarch.rpm       libdnf-0.22.5-1.el7_6.x86_64.rpm    python2-dnf-4.0.9.2-1.el7_6.noarch.rpm
    dnf-data-4.0.9.2-1.el7_6.noarch.rpm  libmodulemd-1.6.3-1.el7.x86_64.rpm  python2-hawkey-0.22.5-1.el7_6.x86_64.rpm
    dnf-rpm.tar                          librepo-1.8.1-7.el7.x86_64.rpm      python2-libcomps-0.1.8-12.el7.x86_64.rpm
    libcomps-0.1.8-12.el7.x86_64.rpm     libsolv-0.6.34-2.el7.x86_64.rpm     python2-libdnf-0.22.5-1.el7_6.x86_64.rpm
    
    [root@localhost shm]# yum localinstall *.rpm
    Loaded plugins: fastestmirror
    Examining dnf-4.0.9.2-1.el7_6.noarch.rpm: dnf-4.0.9.2-1.el7_6.noarch
    Marking dnf-4.0.9.2-1.el7_6.noarch.rpm to be installed
    Examining dnf-data-4.0.9.2-1.el7_6.noarch.rpm: dnf-data-4.0.9.2-1.el7_6.noarch
    Marking dnf-data-4.0.9.2-1.el7_6.noarch.rpm to be installed
    Examining libcomps-0.1.8-12.el7.x86_64.rpm: libcomps-0.1.8-12.el7.x86_64
    Marking libcomps-0.1.8-12.el7.x86_64.rpm to be installed
    Examining libdnf-0.22.5-1.el7_6.x86_64.rpm: libdnf-0.22.5-1.el7_6.x86_64
    Marking libdnf-0.22.5-1.el7_6.x86_64.rpm to be installed
    Examining libmodulemd-1.6.3-1.el7.x86_64.rpm: libmodulemd-1.6.3-1.el7.x86_64
    Marking libmodulemd-1.6.3-1.el7.x86_64.rpm to be installed
    Examining librepo-1.8.1-7.el7.x86_64.rpm: librepo-1.8.1-7.el7.x86_64
    Marking librepo-1.8.1-7.el7.x86_64.rpm to be installed
    Examining libsolv-0.6.34-2.el7.x86_64.rpm: libsolv-0.6.34-2.el7.x86_64
    Marking libsolv-0.6.34-2.el7.x86_64.rpm to be installed
    Examining python2-dnf-4.0.9.2-1.el7_6.noarch.rpm: python2-dnf-4.0.9.2-1.el7_6.noarch
    Marking python2-dnf-4.0.9.2-1.el7_6.noarch.rpm to be installed
    Examining python2-hawkey-0.22.5-1.el7_6.x86_64.rpm: python2-hawkey-0.22.5-1.el7_6.x86_64
    Marking python2-hawkey-0.22.5-1.el7_6.x86_64.rpm to be installed
    Examining python2-libcomps-0.1.8-12.el7.x86_64.rpm: python2-libcomps-0.1.8-12.el7.x86_64
    Marking python2-libcomps-0.1.8-12.el7.x86_64.rpm to be installed
    Examining python2-libdnf-0.22.5-1.el7_6.x86_64.rpm: python2-libdnf-0.22.5-1.el7_6.x86_64
    Marking python2-libdnf-0.22.5-1.el7_6.x86_64.rpm to be installed
    Resolving Dependencies
    --> Running transaction check
    ---> Package dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
    ---> Package dnf-data.noarch 0:4.0.9.2-1.el7_6 will be installed
    --> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-1.el7_6.noarch
    Determining fastest mirrors
    c7-media                                                                                                       | 3.6 kB  00:00:00     
    ---> Package libcomps.x86_64 0:0.1.8-12.el7 will be installed
    ---> Package libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
    ---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
    --> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
    ---> Package librepo.x86_64 0:1.8.1-7.el7 will be installed
    ---> Package libsolv.x86_64 0:0.6.34-2.el7 will be installed
    ---> Package python2-dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
    --> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    --> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
    ---> Package python2-hawkey.x86_64 0:0.22.5-1.el7_6 will be installed
    ---> Package python2-libcomps.x86_64 0:0.1.8-12.el7 will be installed
    ---> Package python2-libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
    --> Running transaction check
    ---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
    ---> Package libreport-filesystem.x86_64 0:2.1.11-42.el7.centos will be installed
    ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
    ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ======================================================================================================================================
     Package                        Arch             Version                        Repository                                       Size
    ======================================================================================================================================
    Installing:
     dnf                            noarch           4.0.9.2-1.el7_6                /dnf-4.0.9.2-1.el7_6.noarch                     1.6 M
     dnf-data                       noarch           4.0.9.2-1.el7_6                /dnf-data-4.0.9.2-1.el7_6.noarch                 33 k
     libcomps                       x86_64           0.1.8-12.el7                   /libcomps-0.1.8-12.el7.x86_64                   202 k
     libdnf                         x86_64           0.22.5-1.el7_6                 /libdnf-0.22.5-1.el7_6.x86_64                   1.8 M
     libmodulemd                    x86_64           1.6.3-1.el7                    /libmodulemd-1.6.3-1.el7.x86_64                 443 k
     librepo                        x86_64           1.8.1-7.el7                    /librepo-1.8.1-7.el7.x86_64                     173 k
     libsolv                        x86_64           0.6.34-2.el7                   /libsolv-0.6.34-2.el7.x86_64                    725 k
     python2-dnf                    noarch           4.0.9.2-1.el7_6                /python2-dnf-4.0.9.2-1.el7_6.noarch             1.9 M
     python2-hawkey                 x86_64           0.22.5-1.el7_6                 /python2-hawkey-0.22.5-1.el7_6.x86_64           208 k
     python2-libcomps               x86_64           0.1.8-12.el7                   /python2-libcomps-0.1.8-12.el7.x86_64           141 k
     python2-libdnf                 x86_64           0.22.5-1.el7_6                 /python2-libdnf-0.22.5-1.el7_6.x86_64           3.1 M
    Installing for dependencies:
     deltarpm                       x86_64           3.6-3.el7                      c7-media                                         82 k
     libreport-filesystem           x86_64           2.1.11-42.el7.centos           c7-media                                         39 k
     libyaml                        x86_64           0.1.4-11.el7_0                 c7-media                                         55 k
     python-enum34                  noarch           1.0.4-1.el7                    c7-media                                         52 k
    
    Transaction Summary
    ======================================================================================================================================
    Install  11 Packages (+4 Dependent packages)
    
    Total size: 10 M
    Total download size: 228 k
    Installed size: 11 M
    Is this ok [y/d/N]: y
    Downloading packages:
    --------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                 848 kB/s | 228 kB  00:00:00     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : librepo-1.8.1-7.el7.x86_64                                                                                        1/15 
      Installing : libsolv-0.6.34-2.el7.x86_64                                                                                       2/15 
      Installing : libcomps-0.1.8-12.el7.x86_64                                                                                      3/15 
      Installing : python2-libcomps-0.1.8-12.el7.x86_64                                                                              4/15 
      Installing : deltarpm-3.6-3.el7.x86_64                                                                                         5/15 
      Installing : python-enum34-1.0.4-1.el7.noarch                                                                                  6/15 
      Installing : libreport-filesystem-2.1.11-42.el7.centos.x86_64                                                                  7/15 
      Installing : dnf-data-4.0.9.2-1.el7_6.noarch                                                                                   8/15 
      Installing : libyaml-0.1.4-11.el7_0.x86_64                                                                                     9/15 
      Installing : libmodulemd-1.6.3-1.el7.x86_64                                                                                   10/15 
      Installing : libdnf-0.22.5-1.el7_6.x86_64                                                                                     11/15 
      Installing : python2-libdnf-0.22.5-1.el7_6.x86_64                                                                             12/15 
      Installing : python2-hawkey-0.22.5-1.el7_6.x86_64                                                                             13/15 
      Installing : python2-dnf-4.0.9.2-1.el7_6.noarch                                                                               14/15 
      Installing : dnf-4.0.9.2-1.el7_6.noarch                                                                                       15/15 
      Verifying  : libyaml-0.1.4-11.el7_0.x86_64                                                                                     1/15 
      Verifying  : python2-libdnf-0.22.5-1.el7_6.x86_64                                                                              2/15 
      Verifying  : python2-libcomps-0.1.8-12.el7.x86_64                                                                              3/15 
      Verifying  : libreport-filesystem-2.1.11-42.el7.centos.x86_64                                                                  4/15 
      Verifying  : libmodulemd-1.6.3-1.el7.x86_64                                                                                    5/15 
      Verifying  : libdnf-0.22.5-1.el7_6.x86_64                                                                                      6/15 
      Verifying  : dnf-data-4.0.9.2-1.el7_6.noarch                                                                                   7/15 
      Verifying  : python2-hawkey-0.22.5-1.el7_6.x86_64                                                                              8/15 
      Verifying  : python-enum34-1.0.4-1.el7.noarch                                                                                  9/15 
      Verifying  : python2-dnf-4.0.9.2-1.el7_6.noarch                                                                               10/15 
      Verifying  : deltarpm-3.6-3.el7.x86_64                                                                                        11/15 
      Verifying  : libsolv-0.6.34-2.el7.x86_64                                                                                      12/15 
      Verifying  : librepo-1.8.1-7.el7.x86_64                                                                                       13/15 
      Verifying  : libcomps-0.1.8-12.el7.x86_64                                                                                     14/15 
      Verifying  : dnf-4.0.9.2-1.el7_6.noarch                                                                                       15/15 
    
    Installed:
      dnf.noarch 0:4.0.9.2-1.el7_6                dnf-data.noarch 0:4.0.9.2-1.el7_6           libcomps.x86_64 0:0.1.8-12.el7             
      libdnf.x86_64 0:0.22.5-1.el7_6              libmodulemd.x86_64 0:1.6.3-1.el7            librepo.x86_64 0:1.8.1-7.el7               
      libsolv.x86_64 0:0.6.34-2.el7               python2-dnf.noarch 0:4.0.9.2-1.el7_6        python2-hawkey.x86_64 0:0.22.5-1.el7_6     
      python2-libcomps.x86_64 0:0.1.8-12.el7      python2-libdnf.x86_64 0:0.22.5-1.el7_6     
    
    Dependency Installed:
      deltarpm.x86_64 0:3.6-3.el7             libreport-filesystem.x86_64 0:2.1.11-42.el7.centos      libyaml.x86_64 0:0.1.4-11.el7_0     
      python-enum34.noarch 0:1.0.4-1.el7     
    
    Complete!
    
    #"   dnf    httpd"
    ]# dnf  install httpd -y
    Last metadata expiration check: 0:13:26 ago on Sun 24 Mar 2019 10:22:41 AM CST.
    Dependencies resolved.
    ======================================================================================================================================
     Package                        Arch                      Version                                   Repository                   Size
    ======================================================================================================================================
    Installing:
     httpd                          x86_64                    2.4.6-88.el7.centos                       c7-media                    2.7 M
    Installing dependencies:
     apr                            x86_64                    1.4.8-3.el7_4.1                           c7-media                    103 k
     apr-util                       x86_64                    1.5.2-6.el7                               c7-media                     92 k
     httpd-tools                    x86_64                    2.4.6-88.el7.centos                       c7-media                     90 k
     mailcap                        noarch                    2.1.41-2.el7                              c7-media                     31 k
    
    Transaction Summary
    ======================================================================================================================================
    Install  5 Packages
    
    Total size: 3.0 M
    Installed size: 10 M
    Downloading Packages:
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                                              1/1 
      Installing       : apr-1.4.8-3.el7_4.1.x86_64                                                                                   1/5 
      Running scriptlet: apr-1.4.8-3.el7_4.1.x86_64                                                                                   1/5 
      Installing       : apr-util-1.5.2-6.el7.x86_64                                                                                  2/5 
      Running scriptlet: apr-util-1.5.2-6.el7.x86_64                                                                                  2/5 
      Installing       : httpd-tools-2.4.6-88.el7.centos.x86_64                                                                       3/5 
      Installing       : mailcap-2.1.41-2.el7.noarch                                                                                  4/5 
      Running scriptlet: httpd-2.4.6-88.el7.centos.x86_64                                                                             5/5 
      Installing       : httpd-2.4.6-88.el7.centos.x86_64                                                                             5/5 
      Running scriptlet: httpd-2.4.6-88.el7.centos.x86_64                                                                             5/5 
      Verifying        : apr-1.4.8-3.el7_4.1.x86_64                                                                                   1/5 
      Verifying        : apr-util-1.5.2-6.el7.x86_64                                                                                  2/5 
      Verifying        : httpd-2.4.6-88.el7.centos.x86_64                                                                             3/5 
      Verifying        : httpd-tools-2.4.6-88.el7.centos.x86_64                                                                       4/5 
      Verifying        : mailcap-2.1.41-2.el7.noarch                                                                                  5/5 
    
    Installed:
      httpd-2.4.6-88.el7.centos.x86_64  apr-1.4.8-3.el7_4.1.x86_64  apr-util-1.5.2-6.el7.x86_64  httpd-tools-2.4.6-88.el7.centos.x86_64 
      mailcap-2.1.41-2.el7.noarch      
    
    Complete!
    
    [root@localhost shm]# yum history 
    Loaded plugins: fastestmirror
    ID     | Login user               | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
         8 | ls                   | 2019-03-24 10:35 | Install        |   15   
         7 | ls                   | 2019-03-24 10:33 | Erase          |   15  <
         6 | ls                   | 2019-03-24 10:22 | Install        |   15 > 
         5 | root               | 2019-03-08 20:21 | Install        |    6   
         4 | root               | 2019-03-08 20:20 | Install        |    9   
         3 | root               | 2019-03-08 20:20 | Install        |    1   
         2 | root               | 2019-03-08 20:20 | Install        |   31  <
         1 | System            | 2019-03-08 20:05 | Install        |  308 > 
    history list
    [root@localhost shm]# yum history info 8
    Loaded plugins: fastestmirror
    Transaction ID : 8
    Begin time     : Sun Mar 24 10:35:27 2019
    Begin rpmdb    : 361:5f0db04c8ec0a51d6785c1e25e23f23ffce15804
    End time       :            10:35:28 2019 (1 seconds)
    End rpmdb      : 376:4976bb5a3173fcf13d3957ad50c6edfae1312d53
    User           : ls 
    Return-Code    : Success
    Command Line   : localinstall dnf-4.0.9.2-1.el7_6.noarch.rpm dnf-data-4.0.9.2-1.el7_6.noarch.rpm libcomps-0.1.8-12.el7.x86_64.rpm libdnf-0.22.5-1.el7_6.x86_64.rpm libmodulemd-1.6.3-1.el7.x86_64.rpm librepo-1.8.1-7.el7.x86_64.rpm libsolv-0.6.34-2.el7.x86_64.rpm python2-dnf-4.0.9.2-1.el7_6.noarch.rpm python2-hawkey-0.22.5-1.el7_6.x86_64.rpm python2-libcomps-0.1.8-12.el7.x86_64.rpm python2-libdnf-0.22.5-1.el7_6.x86_64.rpm
    Transaction performed with:
        Installed     rpm-4.11.3-35.el7.x86_64                      @anaconda
        Installed     yum-3.4.3-161.el7.centos.noarch               @anaconda
        Installed     yum-plugin-fastestmirror-1.1.31-50.el7.noarch @anaconda
    Packages Altered:
        Dep-Install deltarpm-3.6-3.el7.x86_64                        @c7-media
        Install     dnf-4.0.9.2-1.el7_6.noarch                       @/dnf-4.0.9.2-1.el7_6.noarch
        Install     dnf-data-4.0.9.2-1.el7_6.noarch                  @/dnf-data-4.0.9.2-1.el7_6.noarch
        Install     libcomps-0.1.8-12.el7.x86_64                     @/libcomps-0.1.8-12.el7.x86_64
        Install     libdnf-0.22.5-1.el7_6.x86_64                     @/libdnf-0.22.5-1.el7_6.x86_64
        Install     libmodulemd-1.6.3-1.el7.x86_64                   @/libmodulemd-1.6.3-1.el7.x86_64
        Install     librepo-1.8.1-7.el7.x86_64                       @/librepo-1.8.1-7.el7.x86_64
        Dep-Install libreport-filesystem-2.1.11-42.el7.centos.x86_64 @c7-media
        Install     libsolv-0.6.34-2.el7.x86_64                      @/libsolv-0.6.34-2.el7.x86_64
        Dep-Install libyaml-0.1.4-11.el7_0.x86_64                    @c7-media
        Dep-Install python-enum34-1.0.4-1.el7.noarch                 @c7-media
        Install     python2-dnf-4.0.9.2-1.el7_6.noarch               @/python2-dnf-4.0.9.2-1.el7_6.noarch
        Install     python2-hawkey-0.22.5-1.el7_6.x86_64             @/python2-hawkey-0.22.5-1.el7_6.x86_64
        Install     python2-libcomps-0.1.8-12.el7.x86_64             @/python2-libcomps-0.1.8-12.el7.x86_64
        Install     python2-libdnf-0.22.5-1.el7_6.x86_64             @/python2-libdnf-0.22.5-1.el7_6.x86_64
    history info
    [root@localhost shm]# 
    [root@localhost shm]# yum history undo 8
    Loaded plugins: fastestmirror
    Undoing transaction 8, from Sun Mar 24 10:35:27 2019
        Dep-Install deltarpm-3.6-3.el7.x86_64                        @c7-media
        Install     dnf-4.0.9.2-1.el7_6.noarch                       @/dnf-4.0.9.2-1.el7_6.noarch
        Install     dnf-data-4.0.9.2-1.el7_6.noarch                  @/dnf-data-4.0.9.2-1.el7_6.noarch
        Install     libcomps-0.1.8-12.el7.x86_64                     @/libcomps-0.1.8-12.el7.x86_64
        Install     libdnf-0.22.5-1.el7_6.x86_64                     @/libdnf-0.22.5-1.el7_6.x86_64
        Install     libmodulemd-1.6.3-1.el7.x86_64                   @/libmodulemd-1.6.3-1.el7.x86_64
        Install     librepo-1.8.1-7.el7.x86_64                       @/librepo-1.8.1-7.el7.x86_64
        Dep-Install libreport-filesystem-2.1.11-42.el7.centos.x86_64 @c7-media
        Install     libsolv-0.6.34-2.el7.x86_64                      @/libsolv-0.6.34-2.el7.x86_64
        Dep-Install libyaml-0.1.4-11.el7_0.x86_64                    @c7-media
        Dep-Install python-enum34-1.0.4-1.el7.noarch                 @c7-media
        Install     python2-dnf-4.0.9.2-1.el7_6.noarch               @/python2-dnf-4.0.9.2-1.el7_6.noarch
        Install     python2-hawkey-0.22.5-1.el7_6.x86_64             @/python2-hawkey-0.22.5-1.el7_6.x86_64
        Install     python2-libcomps-0.1.8-12.el7.x86_64             @/python2-libcomps-0.1.8-12.el7.x86_64
        Install     python2-libdnf-0.22.5-1.el7_6.x86_64             @/python2-libdnf-0.22.5-1.el7_6.x86_64
    Resolving Dependencies
    --> Running transaction check
    ---> Package deltarpm.x86_64 0:3.6-3.el7 will be erased
    ---> Package dnf.noarch 0:4.0.9.2-1.el7_6 will be erased
    ---> Package dnf-data.noarch 0:4.0.9.2-1.el7_6 will be erased
    ---> Package libcomps.x86_64 0:0.1.8-12.el7 will be erased
    ---> Package libdnf.x86_64 0:0.22.5-1.el7_6 will be erased
    ---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be erased
    ---> Package librepo.x86_64 0:1.8.1-7.el7 will be erased
    ---> Package libreport-filesystem.x86_64 0:2.1.11-42.el7.centos will be erased
    ---> Package libsolv.x86_64 0:0.6.34-2.el7 will be erased
    ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be erased
    ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be erased
    ---> Package python2-dnf.noarch 0:4.0.9.2-1.el7_6 will be erased
    ---> Package python2-hawkey.x86_64 0:0.22.5-1.el7_6 will be erased
    ---> Package python2-libcomps.x86_64 0:0.1.8-12.el7 will be erased
    ---> Package python2-libdnf.x86_64 0:0.22.5-1.el7_6 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ======================================================================================================================================
     Package                               Arch                    Version                               Repository                  Size
    ======================================================================================================================================
    Removing:
     deltarpm                              x86_64                  3.6-3.el7                             @c7-media                  209 k
     dnf                                   noarch                  4.0.9.2-1.el7_6                       installed                  1.6 M
     dnf-data                              noarch                  4.0.9.2-1.el7_6                       installed                   33 k
     libcomps                              x86_64                  0.1.8-12.el7                          installed                  202 k
     libdnf                                x86_64                  0.22.5-1.el7_6                        installed                  1.8 M
     libmodulemd                           x86_64                  1.6.3-1.el7                           installed                  443 k
     librepo                               x86_64                  1.8.1-7.el7                           installed                  173 k
     libreport-filesystem                  x86_64                  2.1.11-42.el7.centos                  @c7-media                  0.0  
     libsolv                               x86_64                  0.6.34-2.el7                          installed                  725 k
     libyaml                               x86_64                  0.1.4-11.el7_0                        @c7-media                  130 k
     python-enum34                         noarch                  1.0.4-1.el7                           @c7-media                  322 k
     python2-dnf                           noarch                  4.0.9.2-1.el7_6                       installed                  1.9 M
     python2-hawkey                        x86_64                  0.22.5-1.el7_6                        installed                  208 k
     python2-libcomps                      x86_64                  0.1.8-12.el7                          installed                  141 k
     python2-libdnf                        x86_64                  0.22.5-1.el7_6                        installed                  3.1 M
    
    Transaction Summary
    ======================================================================================================================================
    Remove  15 Packages
    
    Installed size: 11 M
    Is this ok [y/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : dnf-4.0.9.2-1.el7_6.noarch                                                                                        1/15 
      Erasing    : python2-dnf-4.0.9.2-1.el7_6.noarch                                                                                2/15 
      Erasing    : python2-hawkey-0.22.5-1.el7_6.x86_64                                                                              3/15 
      Erasing    : dnf-data-4.0.9.2-1.el7_6.noarch                                                                                   4/15 
      Erasing    : python2-libdnf-0.22.5-1.el7_6.x86_64                                                                              5/15 
      Erasing    : libdnf-0.22.5-1.el7_6.x86_64                                                                                      6/15 
      Erasing    : libmodulemd-1.6.3-1.el7.x86_64                                                                                    7/15 
      Erasing    : python2-libcomps-0.1.8-12.el7.x86_64                                                                              8/15 
      Erasing    : librepo-1.8.1-7.el7.x86_64                                                                                        9/15 
      Erasing    : libreport-filesystem-2.1.11-42.el7.centos.x86_64                                                                 10/15 
      Erasing    : python-enum34-1.0.4-1.el7.noarch                                                                                 11/15 
      Erasing    : libcomps-0.1.8-12.el7.x86_64                                                                                     12/15 
      Erasing    : libyaml-0.1.4-11.el7_0.x86_64                                                                                    13/15 
      Erasing    : libsolv-0.6.34-2.el7.x86_64                                                                                      14/15 
      Erasing    : deltarpm-3.6-3.el7.x86_64                                                                                        15/15 
      Verifying  : libyaml-0.1.4-11.el7_0.x86_64                                                                                     1/15 
      Verifying  : python2-libdnf-0.22.5-1.el7_6.x86_64                                                                              2/15 
      Verifying  : python2-libcomps-0.1.8-12.el7.x86_64                                                                              3/15 
      Verifying  : libreport-filesystem-2.1.11-42.el7.centos.x86_64                                                                  4/15 
      Verifying  : libmodulemd-1.6.3-1.el7.x86_64                                                                                    5/15 
      Verifying  : libdnf-0.22.5-1.el7_6.x86_64                                                                                      6/15 
      Verifying  : dnf-data-4.0.9.2-1.el7_6.noarch                                                                                   7/15 
      Verifying  : python2-hawkey-0.22.5-1.el7_6.x86_64                                                                              8/15 
      Verifying  : python-enum34-1.0.4-1.el7.noarch                                                                                  9/15 
      Verifying  : python2-dnf-4.0.9.2-1.el7_6.noarch                                                                               10/15 
      Verifying  : deltarpm-3.6-3.el7.x86_64                                                                                        11/15 
      Verifying  : libsolv-0.6.34-2.el7.x86_64                                                                                      12/15 
      Verifying  : librepo-1.8.1-7.el7.x86_64                                                                                       13/15 
      Verifying  : libcomps-0.1.8-12.el7.x86_64                                                                                     14/15 
      Verifying  : dnf-4.0.9.2-1.el7_6.noarch                                                                                       15/15 
    
    Removed:
      deltarpm.x86_64 0:3.6-3.el7             dnf.noarch 0:4.0.9.2-1.el7_6                        dnf-data.noarch 0:4.0.9.2-1.el7_6      
      libcomps.x86_64 0:0.1.8-12.el7          libdnf.x86_64 0:0.22.5-1.el7_6                      libmodulemd.x86_64 0:1.6.3-1.el7       
      librepo.x86_64 0:1.8.1-7.el7            libreport-filesystem.x86_64 0:2.1.11-42.el7.centos  libsolv.x86_64 0:0.6.34-2.el7          
      libyaml.x86_64 0:0.1.4-11.el7_0         python-enum34.noarch 0:1.0.4-1.el7                  python2-dnf.noarch 0:4.0.9.2-1.el7_6   
      python2-hawkey.x86_64 0:0.22.5-1.el7_6  python2-libcomps.x86_64 0:0.1.8-12.el7              python2-libdnf.x86_64 0:0.22.5-1.el7_6 
    
    Complete!