Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Monday, 28 August 2017

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.
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

1 comment: