yum安裝、升級與移除

  1. 安裝/升級選項
    [root@www ~]# yum command [packages]
    command:
      install  :安裝
      reinstall:重新安裝
      update   :升級,若要整個系統都升級,後不接套件
      remove   :移除
    
  2. 安裝
    [root@kvm8 ~]# dnf install bzip2
    Last metadata expiration check: 0:01:07 ago on Tue 04 Oct 2022 11:53:21 AM CST.
    Dependencies resolved.
    =================================================================================
     Package         Architecture     Version                 Repository        Size
    =================================================================================
    Installing:
     bzip2           x86_64           1.0.8-8.el9             BaseOS            52 k
    
    Transaction Summary
    =================================================================================
    Install  1 Package
    
    Total download size: 52 k
    Installed size: 94 k
    Is this ok [y/N]: y
    Downloading Packages:
    bzip2-1.0.8-8.el9.x86_64.rpm                     721 kB/s |  52 kB     00:00
    ---------------------------------------------------------------------------------
    Total                                            379 kB/s |  52 kB     00:00
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                         1/1
      Installing       : bzip2-1.0.8-8.el9.x86_64                                1/1
      Running scriptlet: bzip2-1.0.8-8.el9.x86_64                                1/1
      Verifying        : bzip2-1.0.8-8.el9.x86_64                                1/1
    
    Installed:
      bzip2-1.0.8-8.el9.x86_64
    
    Complete!
    
  3. 移除功能:yum [remove] 軟體
    [root@kvm8 ~]# dnf remove bzip2
    Dependencies resolved.
    =================================================================================
     Package         Architecture     Version                Repository         Size
    =================================================================================
    Removing:
     bzip2           x86_64           1.0.8-8.el9            @BaseOS            94 k
    
    Transaction Summary
    =================================================================================
    Remove  1 Package
    
    Freed space: 94 k
    Is this ok [y/N]: y
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                         1/1
      Erasing          : bzip2-1.0.8-8.el9.x86_64                                1/1
      Running scriptlet: bzip2-1.0.8-8.el9.x86_64                                1/1
      Verifying        : bzip2-1.0.8-8.el9.x86_64                                1/1
    
    Removed:
      bzip2-1.0.8-8.el9.x86_64
    
    Complete!