Tuesday, November 20, 2012

Redhat Package Manager



Redhat Package Manager(RPM)

RPM is a used for both installation and package format.
RPM packages were mainly created for redhat linux but now many linux distributions are using this
RPM is used to
->Install new package
->upgrage existing packages
->Remove installed applications
Query packages

RPM Label Pattern
Package Name-Package version.package architechture.package extension
Ex:Bind-9.3.3-7.el5.i386.rpm
Bind-package name ,9.3.3-7.el5-package version,i386-package architechture,rpm-package extension
Syntax of package
 [root@raju~]#rpm <option> <package name>  --force
Options:-
-i: to install package
-v: verbose
-h:Displays the progess in hashes
-U:to update existing package
--force:install package forcefully
-e:to remove package
--nodeps :to remove dependencies package
-q:query the availability of package
-qa:list all the installed packages
-qc:Displays the configuration files of the package
-qi-displays information of package
-ql:Displays all the files associated with the installed package
-qs:to check the status of package
For sharing the packages over a network we have to mount the packages
[root@raju~]#mkdir /mnt/packages
[root@raju~]#mount 192.168.0.254:/var/ftp/pub/Server  /mnt/packages
[root@raju~]#mount
[root@raju~]#cd/mnt/packages
[root@raju~]#ls
Displays all rpm packages under /mnt /packages

Examples:
Install and Upgrade the packages

[root@raju~]#rpm –ivh samba-* .rpm #to install the package with verbose and hash progress
[root@raju~]#rpm –i vsftpd-*.rpm   #to install the package
[root@raju~]#rpm –iv nfs*.rpm      #to install the package verbosefully
[root@raju~]#rpm –ivh pptpd*.rpm  --force  #to install the package with verbose, hash progress and forcefully
[root@raju~]#rpm –Uvh samba-*.rpm      #to upgrade the package with verbose and hash progress
Removal of  installed packages
[root@raju~]#rpm –e samba-* .rpm                          #to remove the package
[root@raju~]#rpm –e samba-*.rpm  --nodeps           #to remove package dependencies
Quering the packages
[root@raju~]#rpm -qa                                       #to query all installed packages
[root@raju~]#rpm –q samba-*.rpm                            #to query particular packages
[root@raju~]#rpm –qd samba-*.rpm                          #to view the documentation of  packages
[root@raju~]#rpm –ql samba-* .rpm                          #to list of files  of particular packages
[root@raju~]#rpm –qc samba-*.rpm                          #to configure the files of  package
root@raju~]#rpm –qi samba-*.rpm                            #to view the information of the packages
[root@raju~]#rpm –qs samba-*.rpm                          #to view the status of the packages

Stay Connected With Free Updates!

Subscribe via Email

Follow me!

Leave Your Comment Below If You Like This Post

0 comments: