Search This Blog

Thursday, March 17, 2011

All about rpm.

RPM (Redhat package Manager).
There have been lot of changes since it was named .So RPM doesnt only relates to redhat distribution of linux .Now most of linux distributions supports RPM package manager.


Topic covered so far

1) RPM Naming convention.
2) How to check list of installed rpm(s).
3) How to list file(s) stored in rpm.


1) RPM Naming convention.

name-version-release.architecture.rpm
for example.

samba-32bit-3.4.2 -1.1.3.1.x8664.rpm

2) How to check list of installed rpm(s).  

run rpm -qa to list all the installed rpm.
-q : Query rpm.
-a : Query all installed packages. 


 3) How to list file(s) stored in rpm. 

use rpm -qpl to find the list of files included in rpm. 
$ rpm -qpl myrpm-1-0.noarch.rpm
/usr/local/bin/myscript.sh
 


 -p, --package PACKAGE_FILE :
              Query  an  (uninstalled) package PACKAGE_FILE.  The PACKAGE_FILE may be specified as an ftp or http style URL, in which case the package header will be downloaded and queried.  See  FTP/HTTP  OPTIONS for information on rpmâs internal ftp and http client support. The PACKAGE_FILE argument(s), if not a binary package, will be interpreted as an ASCII package manifest.  Comments are permitted, starting  with  a  â#â,  and each line of a package manifest file may include white space separated glob expressions, including URLâs with remote glob expressions, that will be expanded to paths that  are substituted in place of the package manifest as additional PACKAGE_FILE arguments to the query.


-l :
              List files in package.

In above example rpm myrpm-1-0.noarch.rpm contains script named /usr/local/bin/myscript.sh

No comments:

Post a Comment