Search This Blog

Monday, December 14, 2015

RHEL 7: YUM Task

yum list displays installed and available packages

[root@server1 /]# yum list 'http*'
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Available Packages
httpcomponents-client.noarch                        4.2.5-5.el7_0                     base  
httpcomponents-client-javadoc.noarch                4.2.5-5.el7_0                     base  
httpcomponents-core.noarch                          4.2.4-6.el7                       base  
httpcomponents-core-javadoc.noarch                  4.2.4-6.el7                       base  
httpcomponents-project.noarch                       6-4.el7                           base  
httpd.x86_64                                        2.4.6-31.el7.centos.1             updates
httpd-devel.x86_64                                  2.4.6-31.el7.centos.1             updates
httpd-manual.noarch                                 2.4.6-31.el7.centos.1             updates
httpd-tools.x86_64                                  2.4.6-31.el7.centos.1             updates
httpunit.noarch                                     1.7-15.el7                        base  
httpunit-doc.noarch                                 1.7-15.el7                        base  
httpunit-javadoc.noarch                             1.7-15.el7                        base  

yum search KEYWORD lists packages by keywords found in the name and summary fields

[root@server1 /]# yum search nmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
================================================================================================ N/S matched: nmap ================================================================================================
nmap-frontend.noarch : The GTK+ front end for nmap
nmap-ncat.x86_64 : Nmap's Netcat replacement
nmap.x86_64 : Network exploration tool and security scanner
  Name and summary matches only, use "search all" for everything.


[root@server1 /]# yum whatprovides */nmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
base/7/x86_64/filelists_db                                                                                                                                                                  | 6.0 MB  00:01:33    
extras/7/x86_64/filelists_db                                                                                                                                                                | 392 kB  00:00:07    
updates/7/x86_64/filelists_db                                                                                                                                                               | 3.0 MB  00:00:43    
ctdb-tests-2.5.1-2.el7.x86_64 : CTDB clustered database test suite
Repo        : base
Matched from:
Filename    : /usr/share/ctdb-tests/eventscripts/stubs/nmap2:nmap-6.40-4.el7.x86_64 : Network exploration tool and security scanner
Repo        : base
Matched from:
Filename    : /usr/share/nmap
Filename    : /usr/bin/nmap

yum provides PATHNAME displays packages that match the pathname specified (which often include wildcard character)

[root@server1 /]# yum provides /var/www/html
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
httpd-2.4.6-31.el7.centos.x86_64 : Apache HTTP Server
Repo        : base
Matched from:
Filename    : /var/www/html
httpd-2.4.6-31.el7.centos.1.x86_64 : Apache HTTP Server
Repo        : updates
Matched from:
Filename    : /var/www/html1:php-pear-1.9.4-21.el7.noarch : PHP Extension and Application Repository framework
Repo        : base
Matched from:
Filename    : /var/www/html


[root@server1 /]# yum provides */nmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
ctdb-tests-2.5.1-2.el7.x86_64 : CTDB clustered database test suite
Repo        : base
Matched from:
Filename    : /usr/share/ctdb-tests/eventscripts/stubs/nmap
2:nmap-6.40-4.el7.x86_64 : Network exploration tool and security scanner
Repo        : base
Matched from:
Filename    : /usr/share/nmap
Filename    : /usr/bin/nmap

yum info PACKAGENAME give details information about a package, including the disk space needed for installation.

[root@server1 Desktop]# yum info nmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Available Packages
Name        : nmap
Arch        : x86_64
Epoch       : 2
Version     : 6.40
Release     : 4.el7
Size        : 3.9 M
Repo        : base/7/x86_64
Summary     : Network exploration tool and security scanner
URL         : http://nmap.org/
License     : GPLv2 and LGPLv2+ and GPLv2+ and BSD
Description : Nmap is a utility for network exploration or security auditing.  It supports
            : ping scanning (determine which hosts are up), many port scanning techniques
            : (determine what services the hosts are offering), and TCP/IP fingerprinting
            : (remote host operating system identification). Nmap also offers flexible target
            : and port specification, decoy scanning, determination of TCP sequence
            : predictability characteristics, reverse-identd scanning, and more. In addition
            : to the classic command-line nmap executable, the Nmap suite includes a flexible
            : data transfer, redirection, and debugging tool (netcat utility ncat), a utility
            : for comparing scan results (ndiff), and a packet generation and response analysis
            : tool (nping).


yum install PACKAGENAME obtains and install a software pacakge, including any dependencies.

[root@server1 /]# yum install -y nmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Resolving Dependencies
--> Running transaction check
---> Package nmap.x86_64 2:6.40-4.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved
===================================================================================================================================================================================================================
 Package                                         Arch                                              Version                                                   Repository                                       Size
===================================================================================================================================================================================================================
Installing:
 nmap                                            x86_64                                            2:6.40-4.el7                                              base                                            3.9 MTransaction Summary
===================================================================================================================================================================================================================
Install  1 Package
Total download size: 3.9 M
Installed size: 16 M
Downloading packages:
nmap-6.40-4.el7.x86_64.rpm                                                                                                                                                                  | 3.9 MB  00:01:04    
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:nmap-6.40-4.el7.x86_64                                                                                                                                                                        1/1
  Verifying  : 2:nmap-6.40-4.el7.x86_64                                                                                                                                                                        1/1
Installed:
  nmap.x86_64 2:6.40-4.el7                                                                                                                                                                                        
Complete!
[root@server1 /]#

yum remove PACKAGENAME removes an installed software package, including any supported packages.

[root@server1 /]# yum remove nmap
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package nmap.x86_64 2:6.40-4.el7 will be erased
--> Finished Dependency ResolutionDependencies Resolved
===================================================================================================================================================================================================================
 Package                                         Arch                                              Version                                                  Repository                                        Size
===================================================================================================================================================================================================================
Removing:
 nmap                                            x86_64                                            2:6.40-4.el7                                             @base                                             16 M
Transaction Summary
===================================================================================================================================================================================================================
Remove  1 PackageInstalled size: 16 M
Is this ok [y/N]: N
Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2015-12-13.00-25.puYEg9.yumtx
[root@server1 /]# yum remove nmap -y
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package nmap.x86_64 2:6.40-4.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved===================================================================================================================================================================================================================
 Package                                         Arch                                              Version                                                  Repository                                        Size
===================================================================================================================================================================================================================
Removing:
 nmap                                            x86_64                                            2:6.40-4.el7                                             @base                                             16 M
Transaction Summary
===================================================================================================================================================================================================================
Remove  1 PackageInstalled size: 16 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : 2:nmap-6.40-4.el7.x86_64                                                                                                                                                                        1/1
  Verifying  : 2:nmap-6.40-4.el7.x86_64                                                                                                                                                                        1/1 Removed:
  nmap.x86_64 2:6.40-4.el7                                                                                                                                                                                         Complete!
[root@server1 /]#

[root@server1 /]# yum list|more
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Installed Packages
GConf2.x86_64                           3.2.6-8.el7                    @anaconda
ModemManager.x86_64                     1.1.0-6.git20130913.el7        @anaconda
ModemManager-glib.x86_64                1.1.0-6.git20130913.el7        @anaconda
NetworkManager.x86_64                   1:1.0.0-16.git20150121.b4ea599c.el7_1
                                                                       @updates
NetworkManager-glib.x86_64              1:1.0.0-16.git20150121.b4ea599c.el7_1
                                                                       @updates
NetworkManager-libnm.x86_64             1:1.0.0-16.git20150121.b4ea599c.el7_1
                                                                       @updates
NetworkManager-libreswan.x86_64         0.9.8.0-5.el7                  @anaconda
NetworkManager-team.x86_64              1:1.0.0-16.git20150121.b4ea599c.el7_1
                                                                       @updates
NetworkManager-tui.x86_64               1:1.0.0-16.git20150121.b4ea599c.el7_1
                                                                       @updates
NetworkManager-wifi.x86_64              1:1.0.0-16.git20150121.b4ea599c.el7_1
                                                                       @updates
PackageKit.x86_64                       0.8.9-11.el7.centos            @anaconda
PackageKit-command-not-found.x86_64     0.8.9-11.el7.centos            @anaconda
PackageKit-device-rebind.x86_64         0.8.9-11.el7.centos            @anaconda
PackageKit-glib.x86_64                  0.8.9-11.el7.centos            @anaconda
PackageKit-gstreamer-plugin.x86_64      0.8.9-11.el7.centos            @anaconda
PackageKit-gtk3-module.x86_64           0.8.9-11.el7.centos            @anaconda
PackageKit-yum.x86_64                   0.8.9-11.el7.centos            @anaconda
SDL.x86_64                              1.2.15-11.el7                  @anaconda
abattis-cantarell-fonts.noarch          0.0.12-3.el7                   @anaconda
abrt.x86_64                             2.1.11-12.el7.centos           @anaconda
abrt-addon-ccpp.x86_64                  2.1.11-12.el7.centos           @anaconda


[root@server1 /]# yum list installed
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Installed Packages
GConf2.x86_64                                                                                             3.2.6-8.el7                                                                                     @anaconda
ModemManager.x86_64                                                                                       1.1.0-6.git20130913.el7                                                                         @anaconda
ModemManager-glib.x86_64                                                                                  1.1.0-6.git20130913.el7                                                                         @anaconda
NetworkManager.x86_64                                                                                     1:1.0.0-16.git20150121.b4ea599c.el7_1                                                           @updates
NetworkManager-glib.x86_64                                                                                1:1.0.0-16.git20150121.b4ea599c.el7_1                                                           @updates
NetworkManager-libnm.x86_64                                                                               1:1.0.0-16.git20150121.b4ea599c.el7_1                                                           @updates
NetworkManager-libreswan.x86_64                                                                           0.9.8.0-5.el7                                                                                   @anaconda
NetworkManager-team.x86_64                                                                                1:1.0.0-16.git20150121.b4ea599c.el7_1                                                           @updates
NetworkManager-tui.x86_64                                                                                 1:1.0.0-16.git20150121.b4ea599c.el7_1                                                           @updates
NetworkManager-wifi.x86_64                                                                                1:1.0.0-16.git20150121.b4ea599c.el7_1                                                           @updates
PackageKit.x86_64                                                                                         0.8.9-11.el7.centos                                                                             @anaconda
PackageKit-command-not-found.x86_64                                                                       0.8.9-11.el7.centos                                                                             @anaconda
PackageKit-device-rebind.x86_64                                                                           0.8.9-11.el7.centos                                                                             @anaconda
PackageKit-glib.x86_64                                                                                    0.8.9-11.el7.centos                                                                             @anaconda
PackageKit-gstreamer-plugin.x86_64                                                                        0.8.9-11.el7.centos                                                                             @anaconda
PackageKit-gtk3-module.x86_64                                                                             0.8.9-11.el7.centos                                                                             @anaconda
PackageKit-yum.x86_64                                                                                     0.8.9-11.el7.centos                                                                             @anaconda
SDL.x86_64                                                                                                1.2.15-11.el7                                                                                   @anaconda
abattis-cantarell-fonts.noarch                                                                            0.0.12-3.el7                                                                                    @anaconda
abrt.x86_64                                                                                               2.1.11-12.el7.centos                                                                            @anaconda
abrt-addon-ccpp.x86_64                                                                                    2.1.11-12.el7.centos                                                                            @anaconda
abrt-addon-kerneloops.x86_64                                                                              2.1.11-12.el7.centos                                                                            @anaconda
abrt-addon-pstoreoops.x86_64                                                                              2.1.11-12.el7.centos                                                                            @anaconda
abrt-addon-python.x86_64                               
2.1.11-12.el7.centos                                                                            @anaconda
abrt-addon-vmcore.x86_64                                                                                  2.1.11-12.el7.centos                                   
@anaconda
abrt-addon-xorg.x86_64                                                                                    2.1.11-12.el7.centos                                                                           


[root@server1 /]# yum list packagename kernel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Installed Packages
kernel.x86_64                                                                                     3.10.0-123.el7                                                                                          @anaconda
Available Packages
kernel.x86_64                                                                                     3.10.0-229.20.1.el7                                                                                     updates 

[root@server1 /]# yum list kernel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Installed Packages
kernel.x86_64                                                                                     3.10.0-123.el7                                                                                          @anaconda
Available Packages
kernel.x86_64                                                                                     3.10.0-229.20.1.el7                                                                                     updates 
[root@server1 /]#

yum update PACKAGENAME obtains and installs a newer version of the software pacakge, including any dependencies. Generally the process tries to preserver configuration files in place, but in some cases, they may be renamed if the packager thinks the old one will not work after the update. With no PACKAGENAMe specified, it will intall all relevant updates.


[root@server1 /]# yum update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Resolving Dependencies
--> Running transaction check
---> Package abrt.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
--> Processing Dependency: python-dmidecode for package: abrt-2.1.11-22.el7.centos.0.1.x86_64
---> Package abrt-addon-ccpp.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-addon-ccpp.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
--> Processing Dependency: abrt-retrace-client for package: abrt-addon-ccpp-2.1.11-22.el7.centos.0.1.x86_64
---> Package abrt-addon-kerneloops.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-addon-kerneloops.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-addon-pstoreoops.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-addon-pstoreoops.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-addon-python.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-addon-python.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-addon-vmcore.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-addon-vmcore.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-addon-xorg.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-addon-xorg.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-cli.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-cli.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
--> Processing Dependency: libreport-plugin-mantisbt >= 2.1.11-22.el7.centos.0.1 for package: abrt-cli-2.1.11-22.el7.centos.0.1.x86_64
--> Processing Dependency: libreport-centos >= 2.1.11-22.el7.centos.0.1 for package: abrt-cli-2.1.11-22.el7.centos.0.1.x86_64
---> Package abrt-console-notification.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-console-notification.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-dbus.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-dbus.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-desktop.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-desktop.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-gui.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-gui.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-gui-libs.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-gui-libs.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-libs.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-libs.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-python.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-python.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package abrt-tui.x86_64 0:2.1.11-12.el7.centos will be updated
---> Package abrt-tui.x86_64 0:2.1.11-22.el7.centos.0.1 will be an update
---> Package alsa-firmware.noarch 0:1.0.27-2.el7 will be updated
---> Package alsa-firmware.noarch 0:1.0.28-2.el7 will be an update
---> Package alsa-lib.x86_64 0:1.0.27.2-3.el7 will be updated
---> Package alsa-lib.x86_64 0:1.0.28-2.el7 will be an update
---> Package alsa-utils.x86_64 0:1.0.27.2-5.el7 will be updated
---> Package alsa-utils.x86_64 0:1.0.28-4.el7 will be an update
---> Package at.x86_64 0:3.1.13-17.el7 will be updated
---> Package at.x86_64 0:3.1.13-17.el7_0.1 will be an update
---> Package audit.x86_64 0:2.3.3-4.el7 will be updated
--> Finished Dependency ResolutionDependencies Resolved
===================================================================================================================================================================================================================
 Package                                                               Arch                               Version                                                        Repository                           Size
===================================================================================================================================================================================================================
Installing:
 kernel                                                                x86_64                             3.10.0-229.20.1.el7                                            updates                              31 M
Updating:
 abrt                                                                  x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             511 k
 abrt-addon-ccpp                                                       x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             183 k
 abrt-addon-kerneloops                                                 x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             100 k
 abrt-addon-pstoreoops                                                 x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              91 k
 abrt-addon-python                                                     x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              97 k
 abrt-addon-vmcore                                                     x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             101 k
 abrt-addon-xorg                                                       x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              92 k
 abrt-cli                                                              x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              82 k
 abrt-console-notification                                             x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              83 k
 abrt-dbus                                                             x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             115 k
 abrt-desktop                                                          x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              82 k
 abrt-gui                                                              x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             185 k
 abrt-gui-libs                                                         x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              89 k
 abrt-libs                                                             x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             102 k
 abrt-python                                                           x86_64                             2.1.11-22.el7.centos.0.1                                       updates                             104 k
 abrt-tui                                                              x86_64                             2.1.11-22.el7.centos.0.1                                       updates                              93 k
 alsa-firmware                                                         noarch                             1.0.28-2.el7                                                   base                                2.3 M
 alsa-lib                                                              x86_64                             1.0.28-2.el7                                                   base                                391 k
 alsa-utils                                                            x86_64                             1.0.28-4.el7                                                   base                                1.0 M
 at                                                                    x86_64                             3.1.13-17.el7_0.1                                              base                                 50 k
 audit                                                                 x86_64                             2.4.1-5.el7                                                    base                                234 k
 audit-libs                                                            x86_64                             2.4.1-5.el7                                                    base                                 80 k
 audit-libs-python                                                     x86_64                             2.4.1-5.el7                                                    base                                 69 k
 authconfig                                                            x86_64                             6.2.8-9.el7                                                    base                                400 k
 autocorr-en                                                           noarch                             1:4.2.6.3-5.el7                                                base                                154 k
 avahi                                                                 x86_64                             0.6.31-14.el7                                                  base                                261 k
 avahi-autoipd                                                         x86_64                             0.6.31-14.el7                                                  base                                 38 k
 avahi-glib                                                            x86_64                             0.6.31-14.el7                                                  base                                 24 k
 avahi-gobject                                                         x86_64                             0.6.31-14.el7                                                  base                                 34 k
 avahi-libs                                                            x86_64                             0.6.31-14.el7                                                  base                                 60 k
 avahi-ui-gtk3                                                         x86_64                             0.6.31-14.el7                                                  base                                 36 k
 bash                                                                  x86_64                             4.2.46-12.el7                                                  base                                1.0 M
 bind-libs                                                             x86_64                             32:9.9.4-18.el7_1.5                                            updates                             1.0 M
 bind-libs-lite                                                        x86_64                             32:9.9.4-18.el7_1.5                                            updates                             713 k
 bind-license                                                          noarch                             32:9.9.4-18.el7_1.5                                            updates                              80 k
 bind-utils                                                            x86_64                             32:9.9.4-18.el7_1.5                                            updates                             199 k
 binutils                                                              x86_64                             2.23.52.0.1-30.el7_1.2                                         updates                             5.0 M
 biosdevname                                                           x86_64                             0.6.1-2.el7                                                    base                                 38 k
 boost-date-time                                                       x86_64                             1.53.0-23.el7                                                  base                                 50 k
 brlapi                                                                x86_64                             0.6.0-9.el7                                                    base                                113 k
 brltty                                                                x86_64                             4.5-9.el7                                                      base                                926 k
 btrfs-progs                                                           x86_64                             3.16.2-1.el7                                                   base                                484 k
 ca-certificates                                                       noarch                             2015.2.4- python-six                                                            noarch                             1.3.0-4.el7                                                    base                                 18 k
 tagsoup                                                               noarch                             1.2.1-8.el7                                                    base                                112 k
 trousers                                                              x86_64                             0.3.11.2-4.el7_1                                               updates                             286 kTransaction Summary
===================================================================================================================================================================================================================
Install    1 Package  (+26 Dependent packages)
Upgrade  439 PackagesTotal size: 503 M
Is this ok [y/d/N]: N
Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2015-12-13.00-42.mGtdv2.yumtx



The yum group list (or yum grouplist) command will show the names of installed and available groups. Some Groups are normally installed through environment groups and are hidden by default.


[root@server1 /]# yum group list
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Installed environment groups:
   Virtualization Host
Available environment groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

The hidden groups can also be listed with yum group list hidden command.

[root@server1 yum.repos.d]# yum groups list hidden
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Installed environment groups:
   Virtualization Host
Available environment groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Installed groups:
   Base
   Core
   Virtualization Hypervisor
   Virtualization Tools
Available Groups:
   Additional Development
   Anaconda Tools
   Backup Client
   Backup Server
   Common NetworkManager submodules
   Compatibility Libraries
   Conflicts (Client)
   Conflicts (ComputeNode)
   Conflicts (Server)
   Conflicts (Workstation)
   Console Internet Tools
   DNS Name Server
   Debugging Tools
   Desktop Debugging and Performance Tools
   Development Tools
   Dial-up Networking Support
   Directory Client
   Directory Server
   E-mail Server
   Emacs
   FTP Server
   File and Storage Server
   Fonts
   GNOME
   GNOME Applications
   Graphical Administration Tools
   Graphics Creation Tools
   Guest Agents
   Guest Desktop Agents
   Hardware Monitoring Utilities
   High Availability
   Identity Management Server
   Infiniband Support
   Input Methods
   Internet Applications
   Internet Browser
   Java Platform
   KDE
   KDE Applications
   KDE Multimedia Support
   Large Systems Performance
   Legacy UNIX Compatibility
   Legacy X Window System Compatibility
   Load Balancer
   Mainframe Access
   MariaDB Database Client
   MariaDB Database Server
   Multimedia
   Network File System Client
   Network Infrastructure Server
   Networking Tools
   Office Suite and Productivity
   PHP Support
   Performance Tools
   Perl Support
   Perl for Web
   Platform Development
   PostgreSQL Database Client
   PostgreSQL Database Server
   Print Server
   Printing Client
   Python
   Remote Desktop Clients
   Remote Management for Linux
   Resilient Storage
   Ruby Support
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
   Technical Writing
   Virtualization Client
   Virtualization Platform
   Web Server
   Web Servlet Engine
   X Window System
Done

Information about a group is displayed with yum group info (or yum groupinfo). It includes a list of mandatory, default, and optional package names or groups IDS. The package name or group IDs may have a marker in front of them.

Marker                       Meaning
=                                 Package is installed, was installed as part of the group
+                                 Package isnt' installed, will be if the group is installed or updated
-                                  Package isn't installed, will not be if the group is installed or updated.
no marker                                   Package is installed, but was not installed through the group.

[root@server1 yum.repos.d]# yum groups info "Basic Web Server"
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.inEnvironment Group: Basic Web Server
 Environment-Id: web-server-environment
 Description: Server for serving static and dynamic internet content.
 Mandatory Groups:
    base
    core
   +web-server
 Optional Groups:
   +backup-client
   +debugging
   +directory-client
   +guest-agents
   +hardware-monitoring
   +java-platform
   +large-systems
   +load-balancer
   +mariadb-client
   +network-file-system-client
   +performance
   +perl-web
   +php
   +postgresql-client
   +python-web
   +remote-system-management
   +web-servlet
[root@server1 yum.repos.d]#

The yum group install (or yum groupinstall) command will install a group which will install its mandatory and default packages and the packages they depend on.


[root@server1 /]# yum group install "Infiniband Support"
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Resolving Dependencies
--> Running transaction check
---> Package dapl.x86_64 0:2.0.39-5.el7 will be installed
---> Package glusterfs-rdma.x86_64 0:3.6.0.29-2.el7 will be installed
---> Package ibacm.x86_64 0:1.0.9-1.el7 will be installed
---> Package ibutils.x86_64 0:1.5.7-12.el7 will be installed
--> Processing Dependency: ibutils-libs = 1.5.7-12.el7 for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: tk for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: tcl for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: swig for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libosmvendor.so.4(OSMVENDOR_2.0)(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libosmcomp.so.3(OSMCOMP_2.3)(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libopensm.so.5(OPENSM_1.5)(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: graphviz-tcl for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libtcl8.5.so()(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libosmvendor.so.4()(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libosmcomp.so.3()(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libopensm.so.5()(64bit) for package: ibutils-1.5.7-12.el7.x86_64
--> Processing Dependency: libibdmcom.so.1()(64bit) for package: ibutils-1.5.7-12.el7.x86_64
---> Package libcxgb3.x86_64 0:1.3.1-7.el7 will be installed
---> Package libcxgb4.x86_64 0:1.3.5-2.el7 will be installed
---> Package libibcm.x86_64 0:1.0.5-8.el7 will be installed
---> Package libibmad.x86_64 0:1.3.11-1.el7 will be installed
---> Package libibumad.x86_64 0:1.3.9-1.el7 will be installed
---> Package libibverbs-utils.x86_64 0:1.1.8-5.el7 will be installed
--> Processing Dependency: libibverbs = 1.1.8-5.el7 for package: libibverbs-utils-1.1.8-5.el7.x86_64
---> Package libipathverbs.x86_64 0:1.3-2.el7 will be installed
---> Package libmlx4.x86_64 0:1.0.6-3.el7 will be installed
---> Package libmlx5.x86_64 0:1.0.1-3.el7 will be installed
---> Package libmthca.x86_64 0:1.0.6-12.el7 will be installed
---> Package libnes.x86_64 0:1.1.4-2.el7 will be installed
---> Package librdmacm-utils.x86_64 0:1.0.19.1-1.el7 will be installed
--> Processing Dependency: librdmacm = 1.0.19.1-1.el7 for package: librdmacm-utils-1.0.19.1-1.el7.x86_64
--> Running transaction check
---> Package graphviz-tcl.x86_64 0:2.30.1-19.el7 will be installed
--> Processing Dependency: graphviz = 2.30.1-19.el7 for package: graphviz-tcl-2.30.1-19.el7.x86_64
--> Processing Dependency: libxdot.so.4()(64bit) for package: graphviz-tcl-2.30.1-19.el7.x86_64
--> Processing Dependency: libpathplan.so.4()(64bit) for package: graphviz-tcl-2.30.1-19.el7.x86_64
--> Processing Dependency: libgvc.so.6()(64bit) for package: graphviz-tcl-2.30.1-19.el7.x86_64
--> Processing Dependency: libcgraph.so.6()(64bit) for package: graphviz-tcl-2.30.1-19.el7.x86_64
--> Processing Dependency: libcdt.so.5()(64bit) for package: graphviz-tcl-2.30.1-19.el7.x86_64
---> Package ibutils-libs.x86_64 0:1.5.7-12.el7 will be installed
---> Package libibverbs.x86_64 0:1.1.7-6.el7 will be updated
---> Package libibverbs.x86_64 0:1.1.8-5.el7 will be an update
---> Package librdmacm.x86_64 0:1.0.17.1-1.el7 will be updated
---> Package librdmacm.x86_64 0:1.0.19.1-1.el7 will be an update
---> Package opensm-libs.x86_64 0:3.3.18-2.el7 will be installed
---> Package swig.x86_64 0:2.0.10-4.el7 will be installed
---> Package tcl.x86_64 1:8.5.13-4.el7 will be installed
---> Package tk.x86_64 1:8.5.13-4.el7 will be installed
--> Running transaction check
---> Package graphviz.x86_64 0:2.30.1-19.el7 will be installed
--> Processing Dependency: libXaw.so.7()(64bit) for package: graphviz-2.30.1-19.el7.x86_64
--> Running transaction check
---> Package libXaw.x86_64 0:1.0.11-6.1.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved
============================================================================================================================================
 Package                                Arch                         Version                               Repository                  Size
============================================================================================================================================
Installing for group install "Infiniband Support":
 dapl                                   x86_64                       2.0.39-5.el7                          base                       191 k
 ibacm                                  x86_64                       1.0.9-1.el7                           base                        63 k
 ibutils                                x86_64                       1.5.7-12.el7                          base                       1.1 M
 libcxgb3                               x86_64                       1.3.1-7.el7                           base                        18 k
 libcxgb4                               x86_64                       1.3.5-2.el7                           base                        21 k
 libibcm                                x86_64                       1.0.5-8.el7                           base                        21 k
 libibmad                               x86_64                       1.3.11-1.el7                          base                        63 k
 libibumad                              x86_64                       1.3.9-1.el7                           base                        59 k
 libibverbs-utils                       x86_64                       1.1.8-5.el7                           base                        51 k
 libipathverbs                          x86_64                       1.3-2.el7                             base                        19 k
 libmlx4                                x86_64                       1.0.6-3.el7                           base                        32 k
 libmlx5                                x86_64                       1.0.1-3.el7                           base                        33 k
 libmthca                               x86_64                       1.0.6-12.el7                          base                        37 k
 libnes                                 x86_64                       1.1.4-2.el7                           base                        18 k
 librdmacm-utils                        x86_64                       1.0.19.1-1.el7                        base                        79 k
Installing:
 glusterfs-rdma                         x86_64                       3.6.0.29-2.el7                        base                        37 k
Installing for dependencies:
 graphviz                               x86_64                       2.30.1-19.el7                         base                       1.3 M
 graphviz-tcl                           x86_64                       2.30.1-19.el7                         base                       705 k
 ibutils-libs                           x86_64                       1.5.7-12.el7                          base                       689 k
 libXaw                                 x86_64                       1.0.11-6.1.el7                        base                       189 k
 opensm-libs                            x86_64                       3.3.18-2.el7                          base                        65 k
 swig                                   x86_64                       2.0.10-4.el7                          base                       1.3 M
 tcl                                    x86_64                       1:8.5.13-4.el7                        base                       1.9 M
 tk                                     x86_64                       1:8.5.13-4.el7                        base                       1.4 M
Updating for dependencies:
 libibverbs                             x86_64                       1.1.8-5.el7                           base                        55 k
 librdmacm                              x86_64                       1.0.19.1-1.el7                        base                        63 kTransaction Summary
============================================================================================================================================
Install  16 Packages (+8 Dependent packages)
Upgrade              ( 2 Dependent packages)Total size: 9.4 M
Total download size: 9.2 M
Is this ok [y/d/N]:


RHEL 7: RPM Query


The general form of a query is:

# rpm -q [select-options] [query-options]

[root@server1 /]# yum list xorg-x11-apps                               # yum list installed
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Available Packages
xorg-x11-apps.x86_64                                                                                         7.7-6.el7

RPM Queries: Select Options

# rpm -qa  list all installed package

[root@server1 /]# rpm -qa
gjs-1.36.1-2.el7.x86_64
mesa-libxatracker-9.2.5-5.20131218.el7.x86_64
gvfs-mtp-1.16.4-7.el7.x86_64
policycoreutils-2.2.5-11.el7.x86_64
setup-2.8.71-4.el7.noarch
libXmu-1.1.1-5.1.el7.x86_64
gettext-libs-0.18.2.1-4.el7.x86_64
mousetweaks-3.8.0-3.el7.x86_64
libquvi-0.4.1-5.el7.x86_64
langtable-0.0.13-4.el7.noarch
jline-1.0-8.el7.noarch
perl-Encode-2.51-7.el7.x86_64
gnome-system-log-3.8.1-5.el7.x86_64
libreport-plugin-ureport-2.1.11-10.el7.centos.x86_64
basesystem-10.0-7.el7.centos.noarch
festvox-slt-arctic-hts-0.20061229-28.el7.noarch
perl-threads-shared-1.43-6.el7.x86_64
firefox-24.5.0-1.el7.centos.x86_64
sbc-1.0-5.el7.x86_64
tigervnc-license-1.2.80-0.30.20130314svn5065.el7.noarch
poppler-utils-0.22.5-6.el7.x86_64
perl-Pod-Simple-3.28-4.el7.noarch
systemtap-runtime-2.4-14.el7.x86_64
cryptsetup-libs-1.6.3-2.el7.x86_64
comps-extras-7-2.el7.noarch
libspectre-0.2.7-4.el7.x86_64
fftw-libs-double-3.3.3-8.el7.x86_64
dracut-config-rescue-033-161.el7.x86_64
ncurses-base-5.9-13.20130511.el7.noarch
xorg-x11-drv-synaptics-1.7.1-10.el7.x86_64
hunspell-en-GB-0.20121024-5.el7.noarch
postfix-2.10.1-6.el7.x86_64
device-mapper-event-libs-1.02.84-14.el7.x86_64
libsepol-2.1.9-3.el7.x86_64
xorg-x11-drv-vmmouse-13.0.0-10.el7.x86_64
libcdr-0.0.14-3.el7.x86_64
crda-1.1.3_2013.11.27-5.el7.x86_64
cronie-anacron-1.4.11-11.el7.x86_64
libcom_err-1.42.9-4.el7.x86_64
cogl-1.14.0-5.1.el7.x86_64
cyrus-sasl-plain-2.1.26-17.el7.x86_64
bind-utils-9.9.4-14.el7.x86_64
plymouth-0.8.9-0.10.20140113.el7.centos.x86_64
libICE-1.0.8-7.el7.x86_64
libreoffice-writer-4.1.4.2-3.el7.x86_64
make-3.82-21.el7.x86_64
sudo-1.8.6p7-11.el7.x86_64
dnsmasq-2.66-12.el7.x86_64
readline-6.2-9.el7.x86_64
farstream-0.1.2-8.el7.x86_64
libselinux-utils-2.2.2-6.el7.x86_64
ledmon-0.79-3.el7.x86_64
libnice-0.1.3-4.el7.x86_64
libicu-50.1.2-11.el7.x86_64
libdmapsharing-2.9.16-4.el7.x86_64
dejavu-serif-fonts-2.33-6.el7.noarch
m17n-contrib-1.1.14-3.el7.noarch
libcgroup-0.41-6.el7.x86_64
libtdb-1.2.12-3.el7.x86_64

                                                                              
rpm -q PACKAGENAME             Currently installed PACKAGENAME

[root@server1 ~]# rpm -q yum
yum-3.4.3-118.el7.centos.noarch

rpm -q -p PACKAGEFILE.rpm package file name PACKAGEFILE.rpm

# rpm -q -p http://cotent.example.com/rhel7.0/x86_64/dvd/Packages/
yum-ytuils-1.1.31-24.el7.noarch.rpm
yum-utuils-1.1.31-24.el7.noarch.rpm

rpm -q -f FILENAME:what pacakge provides FILENAME

[root@rhelserver1 etc]# rpm -q -f /etc/yum.repos.d
yum-3.4.3-118.el7.noarch

RPM queries: Information about content of Packages

-q: lists the packages' name and version;compare to yum list
-q -i: package information; compare to yum info

[root@server1 /]# rpm -qi nmap               similar to #yum info nmap
Name        : nmap
Epoch       : 2
Version     : 6.40
Release     : 4.el7
Architecture: x86_64
Install Date: Sun 13 Dec 2015 12:54:48 AM EST
Group       : Applications/System
Size        : 16916758
License     : GPLv2 and LGPLv2+ and GPLv2+ and BSD
Signature   : RSA/SHA256, Thu 03 Jul 2014 11:57:32 PM EDT, Key ID 24c6a8a7f4a80eb5
Source RPM  : nmap-6.40-4.el7.src.rpm
Build Date  : Mon 09 Jun 2014 06:51:39 PM EDT
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://nmap.org/
Summary     : Network exploration tool and security scanner
Description :
Nmap is a utility for network exploration or security auditing.  It supports
ping scanning (determine which hosts are up), many port scanning techniques
(determine what services the hosts are offering), and TCP/IP fingerprinting
(remote host operating system identification). Nmap also offers flexible target
and port specification, decoy scanning, determination of TCP sequence
predictability characteristics, reverse-identd scanning, and more. In addition
to the classic command-line nmap executable, the Nmap suite includes a flexible
data transfer, redirection, and debugging tool (netcat utility ncat), a utility
for comparing scan results (ndiff), and a packet generation and response analysis
tool (nping).


-q -l:list of file installed by the specified Pacakge

[root@server1 /]# rpm -ql nmap
/usr/bin/ndiff
/usr/bin/nmap
/usr/bin/nping
/usr/share/doc/nmap-6.40
/usr/share/doc/nmap-6.40/COPYING
/usr/share/doc/nmap-6.40/README
/usr/share/doc/nmap-6.40/nmap.usage.txt
/usr/share/man/de/man1/nmap.1.gz
/usr/share/man/es/man1/nmap.1.gz
/usr/share/man/fr/man1/nmap.1.gz
/usr/share/man/hr/man1/nmap.1.gz
/usr/share/man/hu/man1/nmap.1.gz
/usr/share/man/it/man1/nmap.1.gz
/usr/share/man/ja/man1/nmap.1.gz
/usr/share/man/man1/ndiff.1.gz
/usr/share/man/man1/nmap.1.gz
/usr/share/man/man1/nping.1.gz
/usr/share/man/pl/man1/nmap.1.gz
/usr/share/man/pt_BR/man1/nmap.1.gz
/usr/share/man/pt_PT/man1/nmap.1.gz
/usr/share/man/ro/man1/nmap.1.gz
/usr/share/man/ru/man1/nmap.1.gz
/usr/share/man/sk/man1/nmap.1.gz
/usr/share/man/zh/man1/nmap.1.gz
/usr/share/nmap
/usr/share/nmap/nmap-mac-prefixes
/usr/share/nmap/nmap-os-db
/usr/share/nmap/nmap-payloads
/usr/share/nmap/nmap-protocols
/usr/share/nmap/nmap-rpc
/usr/share/nmap/nmap-service-probes
/usr/share/nmap/nmap-services
/usr/share/nmap/nmap.dtd
/usr/share/nmap/nmap.xsl
/usr/share/nmap/nse_main.lua
/usr/share/nmap/nselib
/usr/share/nmap/nselib/afp.lua
/usr/share/nmap/nselib/ajp.lua
/usr/share/nmap/nselib/amqp.lua
/usr/share/nmap/nselib/asn1.lua
/usr/share/nmap/nselib/base32.lua
/usr/share/nmap/nselib/base64.lua
/usr/share/nmap/nselib/bitcoin.lua
/usr/share/nmap/nselib/bittorrent.lua
/usr/share/nmap/nselib/bjnp.lua
/usr/share/nmap/nselib/brute.lua

-q -c: list just the configuration files

[root@server1 ~]# rpm -q -c yum-3.4.3-118.el7.centos.noarch
/etc/logrotate.d/yum
/etc/yum.conf
/etc/yum/version-groups.conf

-q -d: list just the documentation files

[root@server1 /]# rpm -qd nmap
/usr/share/doc/nmap-6.40/COPYING
/usr/share/doc/nmap-6.40/README
/usr/share/doc/nmap-6.40/nmap.usage.txt
/usr/share/man/de/man1/nmap.1.gz
/usr/share/man/es/man1/nmap.1.gz
/usr/share/man/fr/man1/nmap.1.gz
/usr/share/man/hr/man1/nmap.1.gz
/usr/share/man/hu/man1/nmap.1.gz
/usr/share/man/it/man1/nmap.1.gz
/usr/share/man/ja/man1/nmap.1.gz
/usr/share/man/man1/ndiff.1.gz
/usr/share/man/man1/nmap.1.gz
/usr/share/man/man1/nping.1.gz
/usr/share/man/pl/man1/nmap.1.gz
/usr/share/man/pt_BR/man1/nmap.1.gz
/usr/share/man/pt_PT/man1/nmap.1.gz
/usr/share/man/ro/man1/nmap.1.gz
/usr/share/man/ru/man1/nmap.1.gz
/usr/share/man/sk/man1/nmap.1.gz
/usr/share/man/zh/man1/nmap.1.gz

-q --scripts:list shell scripts that may run before or after the package is installed or removed.

[root@server1 ~]# rpm -q --scripts openssh-server
preinstall scriptlet (using /bin/sh):
getent group sshd >/dev/null || groupadd -g 74 -r sshd || :
getent passwd sshd >/dev/null || \
  useradd -c "Privilege-separated SSH" -u 74 -g sshd \
  -s /sbin/nologin -r -d /var/empty/sshd sshd 2> /dev/null || :
postinstall scriptlet (using /bin/sh):if [ $1 -eq 1 ] ; then
        # Initial installation
        /usr/bin/systemctl preset sshd.service sshd.socket >/dev/null 2>&1 || :
fi
preuninstall scriptlet (using /bin/sh):if [ $1 -eq 0 ] ; then
        # Package removal, not upgrade
        /usr/bin/systemctl --no-reload disable sshd.service sshd.socket > /dev/null 2>&1 || :
        /usr/bin/systemctl stop sshd.service sshd.socket > /dev/null 2>&1 || :
fi
postuninstall scriptlet (using /bin/sh):

/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
        # Package upgrade, not uninstall
        /usr/bin/systemctl try-restart sshd.service >/dev/null 2>&1 || :
fi

-q --changelog: list change information for the package

[root@server1 ~]# rpm -q --changelog audit
* Mon Mar 17 2014 Steve Grubb <sgrubb@redhat.com> 2.3.3-4
resolves: #1077249 - Audit update, various issues* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.3.3-3
- Mass rebuild 2014-01-24* Mon Jan 20 2014 Steve Grubb <sgrubb@redhat.com> 2.3.3-2
- New upstream bugfix/enhancement release
resolves: #1053804 - ausearch issues found by ausearch-test
resolves: #1030409 - ausearch help typo for "-x" option
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.3.2-4
- Mass rebuild 2013-12-27


Summary of rpm query command:

Task                                                                                                   Command:
Display information about a Package                         rpm -q -i NAME
List all file included in a package                               rpm -q -l NAME
List configuration files included in a Package             rpm -q -c NAME
List documentation file included in a Package            rpm -q -d NAME
Show a short summar of  the reason for a new           rpm -q --changelog NAME
pacakge release

Display the shell scripts included in a Package          rpm -q --scripts NAME                                                                    

Wednesday, November 25, 2015

How to convert a VG from Legacy to Agile/persistent DSF



How to convert a VG from Legacy to Agile/persistent DSF

This command is only available as from HP-UX11v3.
A shell script /usr/contrib/bin/vgdsf, can be used to perform the DSF migration of a given volume group. vgdsf uses existing LVM commands - vgdisplay, pvdisplay, vgextend and vgreduce, in addition to the ioscan command to perform the DSF migration. It automatically updates both the /etc/lvmtab and /etc/lvmpvg files to reflect the newer configuration and no additional user action is required. The use of the vgdsf script simplifies the DSF migration operation and the volume group can remain active and in use.

# command to use: vgdsf -c /dev/<vgname>

Summary of steps:
1. strings /etc/lvmtab (The Volume Group configuration is storied in this binary file)

2. cp -p /etc/lvmtab /etc/lvmtab.save (Make a backup of this lvmtab file)

3. vgdsf -c /dev/<vgname> (Convert the VG from legacy to agile addressing)

4.  strings /etc/lvmtab (Verify that the lvmtab file shows the new agile addressing)
e.g. of vgdsf -c /dev/<vgname>

Example:
hpuxhost1:/root # strings /etc/lvmtab
/dev/vg00
/dev/disk/disk2_p2
/dev/disk/disk3_p2
/dev/vg32
/dev/dsk/c25t0d5
/dev/dsk/c19t0d5
/dev/vg33
/dev/dsk/c25t0d6
/dev/dsk/c19t0d6
/dev/vg34
/dev/dsk/c25t0d1
/dev/dsk/c19t0d1
/dev/vg35
/dev/dsk/c25t0d3
/dev/dsk/c19t0d3


hpuxhost1:/etc # vgdsf -c /dev/vg35
Converting legacy DSFs to persistent DSFs in VG /dev/vg35
Persistent DSF /dev/disk/disk37 added to VG /dev/vg35
Legacy DSF /dev/dsk/c19t0d3 removed from VG /dev/vg35
Legacy DSF /dev/dsk/c25t0d3 removed from VG /dev/vg35

hpuxhost1:/etc # strings /etc/lvmtab
/dev/vg00
/dev/disk/disk2_p2
/dev/disk/disk3_p2
/dev/vg32
/dev/dsk/c25t0d5
/dev/dsk/c19t0d5
/dev/vg33
/dev/dsk/c25t0d6
/dev/dsk/c19t0d6
/dev/vg34
/dev/dsk/c25t0d1
/dev/dsk/c19t0d1
/dev/vg35
/dev/disk/disk37