LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > blue_print
User Name
Password

Notices


Rate this Entry

RPM commands

Posted 06-03-2011 at 03:41 AM by blue_print
Updated 06-03-2011 at 04:23 AM by blue_print

RPM package is a powerful utility to manage the software in all major Linux distributions. RPMs can be used to,
  • Install packages
  • Remove packages
  • Upgrade packages
  • Verify packages

Here are some useful command to manage RPM packages,



1. Getting detailed information about the package httpd

Code:
rpm -qi httpd
2. Determining which package installed the file /etc/httpd/conf.d/httpd-portal.conf,

Code:
rpm -qf /etc/httpd/conf.d/httpd-portal.conf
3. Showing all the files installed my httpd

Code:
rpm -ql httpd
4. Viewing the documentation files for the command httpd,

Code:
rpm -qd httpd
5. Listing all files included in an rpm file,

Code:
rpm -qpl /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm
6. Verify if the package is installed or not,

Code:
rpm -qa | grep httpd
7. To check what has changed in the files on the system since the HTTPD rpm originally installed,

Code:
rpm -V httpd
8. Checking package to ensure its integrity and origin: (NOTE: gpg or pgp software must be installed on your system before you use this command)

Code:
rpm -K /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm
9. To install wget RPM package,

Code:
rpm -ivh /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm
10. Upgrading the package wget: (NOTE: if the package is not installed it will install it for You, like option “-ivh”),

Code:
rpm -Uvh /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm
11. Upgrade the package wget (if it exists already),

Code:
rpm -Fvh /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm
12. Removing the RPM package wget,

Code:
rpm -e wget
13. To list the configuration file of a package,

Code:
rpm -qc httpd
14. To display the list of all recently installed packages,

Code:
rpm -qa –last
15. To find out what dependencies httpd package has,

Code:
rpm -qR httpd
16. To find out what dependencies an rpm file has,

Code:
rpm -qpR /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm
17. To display list of configuration files for a command,

Code:
rpm -qcf /usr/sbin/httpd
Posted in Linux Basics
Views 1766 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration