Monday, August 19

RPM Package Manager on Linux RHEL/CentOS 6


  Rpm is the Redhat Package Management system. By using rpm utility the user can instal new packages or upgrade and can also remove existing packages.

Here vsftpd is the name of package & 2.0.6-0.el6 is the version of package & i386 is the type of architecture of the package & .rpm is the extension.

To install rpm:

#rpm <options> <package> --force --aid


  •      -i  =  install
  •     -v  =  verbose
  •     -h  =  to display progress in hashes 
  •   --force = to install forcefully 
  •   --aid    = to install packages with dependencies

ex: rpm  -ivh  nfs-utils   --force  --aid
rpm  -ivh  nfs-utils-lib  --force  --aid

To upgrade:

#rpm <options> <packages> 


  •      -U  =  upgrade
  •      -v  =  verbose
  •      -h  =  to display in hashes

eg: rpm -Uvh 
rpm -Uvh  nfs-utils-lib

 To remove an rpm:

#rpm <options> <package> --nodeps

    -e  = to remove package from the system
   --nodeps =  remove without dependencies


eg: # rpm -e nfs-utils   --nodeps

To query rpm package:

 # rpm  <options>  <package>

  •      -q    =   to query the availability of installed package
  •      -qa  =  queries all installed rpm's in o/s
  •      -qc  =  list only configuration files stored in queried rpm
  •      -qd  =  list only doc files stored in queried rpm
  •      -qi   =  displays complete information about queried rpm
  •      -qs  =  displays status of files in queried rpm
  •      -ql   =  displays files related to queried rpm
  •      -qf   =  query find of the package
Eg :- To display information of Package
                 # rpm -qi nfs-utils 

Note:  1. RPM database is maintained under - /usr/lib/rpm  directory

            2. All your installed rpm's log is under - /root/install.log

            3. To install Packages in GUI Mode, enter this command
                            # system-config-packages &

To get rpm's from server:

#mount   /mnt  (Mount point from 254 server to local system)
#cd /mnt

#cd Server    (In mnt directory Server folder is there.)
#rpm -ivh <package> --force --aid

To get rpm's from CD/DVD:

place rhel-5 or 6 dvd in  cd-rom
#mount /dev/cdrom    /mnt
#cd /mnt
#cd Server
#rpm -ivh <package> --force --aid

No comments:

Post a Comment

:: Linux - Legends ::