Jul 252010

From mynitor.com

Every once in awhile I find myself looking around for an rpm command to provide info on a specific thing such as displaying installed location of all files of a package that’s already been installed. Sure there is the man page but finding something from a man page is like finding a hard booger stuck way up in your nose….as you reach for it, you scratch other areas way too much and by the time you get that damn booger, you’re already bleeding from your nose!

Anyhow, didn’t mean to get so graphic talking about RPM (Redhat Package Manager). Here is a quick reference to go by when you’re dealing with RPM.

rpm -ivh apache2.i386.rpm

Install package apache2 already download on the system.

rpm -i ftp://ftp.mynitor.com/apache-3.i386.rpm

You can do it with http:// as well. Simple of installing RPM from remote server.

rpm -ev apache2

Uninstall apache2 package..

rpm -Uvh apache2-1.i386.rpm

Upgrade an existing package.

You can also do

rpm -Uvh ftp/http

to fetch pkg.

rpm –verify apache2

List files that did not pass the verify tests.

rpm -qpl apache2.i386.rpm

List location where RPM would be installed.

rpm -ql apache2

List location of files on the system where the RPM has already been installed.

rpm -qi apache2

This one is my favorite. It displays pkg information such as version, release, installed date and much more.

rpm -qf /etc/apache2/conf/httpd.conf

This will tell you which package the file httpd.conf belongs to.

rpm -qa

List all installed RPM packages on the system.

rpm -qa –last

List all the recently installed RPM packages.

rpm -qR apache2.i386.rpm

Outputs dependencies for the RPM.

Share This!
 Posted by at 3:33 am

Sorry, the comment form is closed at this time.