RPM quickies – The Ultimate RPM Guide for Newbies!
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. |
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. |
Categories: linux
Terrific work! This is the type of information that should be shared around the web. Shame on the search engines for not positioning this post higher!
You forgot about rpm -Fvh *.rpm which will update from a list of rpm files only the ones already installed.
Useful when you need to update php for example and you don’t want to install all modules and just update the ones you area already using.
it was very interesting to read http://www.mynitor.com
I want to quote your post in my blog. It can?
And you et an account on Twitter?
Very nice cheat-sheet.
Did you also try “man rpm”
Towards the end of the man pages are some nice examples.