RPM Package Manager
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.
Pattern:

vsftpd-2.0.6-0.el6.i386.rpm
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 –force –aid

options:

-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:
-U  =  upgrade
-v  =  verbose
-h  =  to display in hashes

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

To remove an rpm:

#rpm –nodeps

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

eg: # rpm -e nfs-utils   –nodeps

To query rpm package:

# rpm

options:
-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 192.168.0.254:/var/ftp/pub   /mnt  (Mount point from 254 server to local system)
#cd /mnt

#cd Server    (In mnt directory Server folder is there.)
#rpm -ivh –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 –force –aid

Leave a Reply

Your email address will not be published. Required fields are marked *