The Open Source Swiss Army Knife

/unix/commandline/
/unix/commandline/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /unix   /commandline 
Permalink: rpm.htm
Title: link to the other rpm file
article options : please login   |  print view

rpm

  1. introduction (this page link)
  2. basics (this page link)
  3. making rpm packages, source rpms, making rpm packages (link to /unix/rpm/rpmbuild.htm)

introduction

rpm is a an executable which allows for package manipulation; everything on redhat is rpm now, they don't have any tarballs. Actually, this is a good idea, it's like the "uninstall wizard" on MS machines. In other words, it's a workign record of all the things you have done to your machine, from day 0. If you wonder where a certain file came from just query using "the rpm wizard" and you can then find what to uninstall, change, etc.

If a application needs to be installed from tarball instead of from rpm, uninstall the old rpms before you install a tarball. I then install the tarballs always into /usr/local to compensate for lack of rpm's centralized database control.


if you have the problem "cannot open database in db3 format" make sure CRON daemon is not running, as this will perfomr the lock. I think if the error number is (13) it's because your'e not root and you should be, and if it's (1) then it 's the cron thing.

basics

  1. install
  2. uninstall
  3. querying a package
  4. verification
installing packages
rpm -Vatells which files are missing or corrupted
rpm -ivh something.rpminstalling a package
if the rpm is something.src.rpm go then to /usr/src/redhat/SOURCES/ and there will be the unpackaged files
rpm -ivh --replacepkgs something.rpmto overwrite
rpm -Uvh something.rpmto overwrite and replace packages
uninstalling packages
rpm -e foouninstalling a package
querying and package management
rpm -qdf /usr/bin/ispellprints out all DOCUMENTATION which was installed along with the rest of the package
rpm -qlf /usr/bin/ispellprints out all files which belong to the package
rpm -qqueeries the package name, version and release version
rpm -qf /usr/bin/gawkresponds with the package that gawk belongs to
rpm -idisplays package name, version, and description; in other words, the description of the package as prepared by the maintenars
rpm -qif /usr/bin/gawkresponds with the package that gawk belongs to
rpm -qpi something.1.2-3.rpmresponds with the long description
rpm -qp[fi] actually_existing_rpm_file_name.rpmdoes the qeurying against the file there on your hard drive
rpm -qa | grep -i gcc
rpm -qi gcc-2.96-81
rpm -qf rpmfile rpm: No such file or directory
rpm -qf /sbin/ifupinitscripts-5.49-1 (responds with package owning that file; requires absolute path)
rpm -q --whatrequires /sbin/ifupresponds with no package requires /sbin/ifup
rpm -ql lists piles in a package
rpm -ql `rpm -qa | grep dhcpcd`prints out all files in the rpm package whose name contains 'dhcpcd'
rpm -ql | rpm -qa | grep "apache" prints out the name of the installed package which contains the words "apache"
verification
rpm -VrpmIn case there is a discrepancy in the 'verification', responds in a line with 5.L T c path/file-name
  • L: symbolic link
  • T: file modification time
rpm -Vf /bin/viverifies that the file /bin/vi exists on the system, comes from a package, and is THE SAME as when first installed
rpm -Vp foo-1.10.1.i386.rpmverifies that both the file you just downloaded and the one installed are the same

Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top