RPM commands

Install, Upgrade and Remove a package:

  • rpm -ivh httpd-2.4.6-45.el7.centos.4.x86_64    (Install a package)
  • rpm -Uvh httpd-2.4.6-45.el7.centos.4.x86_64   (Upgrade a package)
  • rpm -e httpd                                                           (Remove a package)

Query and List package files:

  • rpm -qa | grep httpd*              (Query all installed packages)
  • rpm -qil httpd                             (Query, info and list files in a package)
  • rpm -qf /etc/logrotate.conf       (Query based on config file)

Verify packages:

  • rpm -Va                                        (Verify all installed packages)
  • rpm -V httpd

List and extract the files inside a package:

  • rpm2cpio httpd.rpm | cpio -t
  • rpm2cpio httpd.rpm | cpio -ivd

Naming format and convention of RPM package:

  • <name>-<version>-<release>.<distro>.<architecture>.rpm
  • sed-4.2.1-10.e16.x86_64.rpm
Advertisements

About Ishtiaque

I am IBM Certified Infrastructure Systems Architect, TOGAF 9 Certified, ITIL V3 Foundation certified and Oracle Certified Export in Java Web Component Developer with over 10 years of support and development experience in IBM middleware software and Java. Additionally, have a sound grip in databases, Linux and OpenStack administration. I hold the following certifications: IBM Certified Infrastructure Systems Architect TOGAF 9 Certified Oracle Certified Expert, Java EE6 Web Component Developer Oracle Certified Professional – Java 6 Programmer ITIL v3 Foundation Certified IBM Certified Solution Architect – Cloud Computing Infrastructure V1 IBM Certified System Administrator – WebSphere Portal V8, V7, V6.1, V6 IBM Certified System Administrator – WebSphere Application Server V7, V6.1 IBM Certified System Administrator – AIX V7 IBM Certified System Administrator – WebSphere MQ V7 IBM Certified Deployment Professional – Business Process Manager Advanced V7.5 IBM Certified Solution Advisor – Cloud Computing Architecture V3 IBM Certified Solution Developer – WebSphere Portal V5.1
This entry was posted in LFCS, Linux and tagged , . Bookmark the permalink.