next up previous contents
Next: 清除無用套件 Up: YUM 線上升級機制 Previous: yum安裝、升級與移除   Contents

yum群組套件處理

  1. 套件群組安裝/移除
    [root@www ~]# yum command [package group]
    command:
      groupinfo   :   Display details about a package group
      groupinstall:   Install the packages in a group on your system
      grouplist   :   List available package groups
      groupremove :   Remove the packages in a group from your system
    
  2. 查看所有套件群組
    [root@demo ~]# yum grouplist
    Loading mirror speeds from cached hostfile
    rhel/group_gz                                                              | 207 kB     00:00     
    Installed Groups:
       Arabic Support
       Armenian Support
       Bhutanese Support
       Chinese Support
       Console internet tools
    --省略--
    Available Groups:
       Additional Development
       Afrikaans Support
       Albanian Support
       Amazigh Support
       Assamese Support
       Azerbaijani Support
       Backup Client
       Backup Server
       Base
    --省略--
    Done
    
  3. 查看套件群組的訊息
    [root@demo ~]# yum groupinfo "backup client"
    Group: Backup Client
     Description: Client tools for connecting to a backup server and doing backups.
     Mandatory Packages:
       amanda-client
     Optional Packages:
       bacula-client
    
  4. 安裝套件群組
    [root@demo ~]# yum groupinstall "backup client"
    Setting up Group Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package amanda-client.x86_64 0:2.6.1p2-7.el6 set to be updated
    --> Processing Dependency: amanda = 2.6.1p2-7.el6 for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: perl(Amanda::Debug) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: perl(Amanda::Config) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: perl(Amanda::Constants) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: perl(Amanda::Util) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: perl(Amanda::Paths) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: libamandad-2.6.1p2.so()(64bit) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: librestore-2.6.1p2.so()(64bit) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: libamclient-2.6.1p2.so()(64bit) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: libamserver-2.6.1p2.so()(64bit) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: libamanda-2.6.1p2.so()(64bit) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Processing Dependency: libamdevice-2.6.1p2.so()(64bit) for package: amanda-client-2.6.1p2-7.el6.x86_64
    --> Running transaction check
    ---> Package amanda.x86_64 0:2.6.1p2-7.el6 set to be updated
    --> Processing Dependency: xinetd for package: amanda-2.6.1p2-7.el6.x86_64
    --> Running transaction check
    ---> Package xinetd.x86_64 2:2.3.14-29.el6 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ==================================================================================================
     Package                   Arch               Version                      Repository        Size
    ==================================================================================================
    Installing:
     amanda-client             x86_64             2.6.1p2-7.el6                rhel             203 k
    Installing for dependencies:
     amanda                    x86_64             2.6.1p2-7.el6                rhel             546 k
     xinetd                    x86_64             2:2.3.14-29.el6              rhel             120 k
    
    Transaction Summary
    ==================================================================================================
    Install       3 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 869 k
    Installed size: 2.6 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/3): amanda-2.6.1p2-7.el6.x86_64.rpm                                     | 546 kB     00:02     
    (2/3): amanda-client-2.6.1p2-7.el6.x86_64.rpm                              | 203 kB     00:00     
    (3/3): xinetd-2.3.14-29.el6.x86_64.rpm                                     | 120 kB     00:00     
    --------------------------------------------------------------------------------------------------
    Total                                                             153 kB/s | 869 kB     00:05     
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : 2:xinetd-2.3.14-29.el6.x86_64                                              1/3 
      Installing     : amanda-2.6.1p2-7.el6.x86_64                                                2/3 
      Installing     : amanda-client-2.6.1p2-7.el6.x86_64                                         3/3 
    
    Installed:
      amanda-client.x86_64 0:2.6.1p2-7.el6                                                            
    
    Dependency Installed:
      amanda.x86_64 0:2.6.1p2-7.el6                   xinetd.x86_64 2:2.3.14-29.el6                  
    
    Complete!
    
  5. 移除套件群組
    [root@demo ~]# yum groupremove "backup client"
    Setting up Group Process
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    --> Running transaction check
    ---> Package amanda-client.x86_64 0:2.6.1p2-7.el6 set to be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ==========================================================================================
     Package              Arch               Version                  Repository         Size
    ==========================================================================================
    Removing:
     amanda-client        x86_64             2.6.1p2-7.el6            @rhel             604 k
    
    Transaction Summary
    ==========================================================================================
    Remove        1 Package(s)
    Reinstall     0 Package(s)
    Downgrade     0 Package(s)
    
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Erasing        : amanda-client-2.6.1p2-7.el6.x86_64                                         1/1 
    
    Removed:
      amanda-client.x86_64 0:2.6.1p2-7.el6                                                            
    
    Complete!
    



2015-04-13