{"id":222,"date":"2015-07-06T11:04:44","date_gmt":"2015-07-06T11:04:44","guid":{"rendered":"http:\/\/www.howtolearnlinux.com\/?p=222"},"modified":"2018-01-04T09:39:01","modified_gmt":"2018-01-04T09:39:01","slug":"redhat-package-manager-rpm","status":"publish","type":"post","link":"http:\/\/shijuvarghese.com\/?p=222","title":{"rendered":"Redhat Package Manager (RPM)"},"content":{"rendered":"<p><span style=\"font-family: verdana; font-size: small;\">Set of binary files, which are compiled programs. This is similar to add\/remove programs in windows. RPM is used to manage installation packages including installation and un-installation.<\/span><\/p>\n<p>The database that contains information of all rpms is stored in \/var\/lib\/rpm\/.<\/p>\n<p><b># rpm -ivh :<\/b> i = To install a package.<\/p>\n<p><b># rpm -e &lt;rpm&#8217;s base=&#8221;&#8221; name=&#8221;&#8221;&gt; :<\/b> to remove an rpm.<\/p>\n<p><b># rpm -q &lt;rpm&#8217;s base=&#8221;&#8221; name=&#8221;&#8221;&gt; :<\/b> query an rpm<\/p>\n<p><b># rpm -qa :<\/b> Query all rpms<\/p>\n<p><b># rpm -qa | grep ldap :<\/b> List all rpms installed that had the word ldap in it<\/p>\n<p><b># rpm -qf \/bin\/cat :<\/b> This will display the name of rpm associated with cat.<\/p>\n<p><b># rpm -force coreutils-5.2.1-31.i386.rpm :<\/b> This will erase the old coreutils rpm and install the new one.<\/p>\n<p><b># rpm -ql coreutils :<\/b> This will list all the files that was installed by this rpm.<\/p>\n<p><b># rpm httpd.rpm &#8211;aid :<\/b> This will install the httpd rpm along with its dependencies.<\/p>\n<p><b># rpm -qi coreutils :<\/b> Information of am rpm including manufacturer, developer, etc<\/p>\n<p>Rpmdb-redhat is the rpm that contains all the dependencies of rpm<\/p>\n<p><b># rpm -qpi zsh-4.2.rpm :<\/b> View information of a package before installation<\/p>\n<p><b># rpm -qc httpd-3.rpm :<\/b> List the configuration files of the rpm<\/p>\n<p><b># rpm -V httpd :<\/b> This will check the default files installed by the rpm and display any missing files.<\/p>\n<p><b># rpm -qR vsftpd :<\/b> Display all the dependencies of a package.<\/p>\n<p><b># rpm -Uvh vsftpd :<\/b> Upgrade am rpm. Do not use this to upgrade the kernal. This will uninstall the old kernal and install a new one. It is always good to keep the old one too till the functionality of the new kernal is tested.<\/p>\n<p><b># rpm -q :<\/b> This will display the scripts used at the time of installation.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Set of binary files, which are compiled programs. This is similar to add\/remove programs in windows. RPM is used to manage installation packages including installation <a class=\"mh-excerpt-more\" href=\"http:\/\/shijuvarghese.com\/?p=222\" title=\"Redhat Package Manager (RPM)\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":256,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=222"}],"version-history":[{"count":2,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":431,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/222\/revisions\/431"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/media\/256"}],"wp:attachment":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}