{"id":1824,"date":"2014-02-03T12:57:56","date_gmt":"2014-02-03T12:57:56","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=1824"},"modified":"2014-02-03T12:57:56","modified_gmt":"2014-02-03T12:57:56","slug":"yum-download-only","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=1824","title":{"rendered":"Yum Download only"},"content":{"rendered":"<p>You need to install plugin called\u00a0<strong>yum-downloadonly<\/strong>. This plugin adds a &#8211;downloadonly flag to yum so that yum will only download the packages and not install\/update them. Following options supported by this plugin:<\/p>\n<p>[a]\u00a0<strong>&#8211;downloadonly<\/strong>\u00a0: don&#8217;t update, just download a rpm file<br \/>\n[b]\u00a0<strong>&#8211;downloaddir=\/path\/to\/dir<\/strong>\u00a0: specifies an alternate directory to store packages such as \/tmp<\/p>\n<p>Please note following instructions are only tested on CentOS server but should work with RHN and RHEL without any problem.<\/p>\n<h2>How do I install yum-downloadonly plugin?<\/h2>\n<p>Type the following command to install plugin, enter:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\"># yum install yum-downloadonly<\/div><\/div>\n<p>Sample output:<\/p>\n<pre>Loading \"fastestmirror\" plugin\r\nLoading \"security\" plugin\r\nLoading mirror speeds from cached hostfile\r\n * base: centos.mirrors.tds.net\r\n * updates: mirror.myriadnetwork.com\r\n * addons: mirrors.gigenet.com\r\n * extras: holmes.umflint.edu\r\nSetting up Install Process\r\nParsing package install arguments\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package yum-downloadonly.noarch 0:1.1.10-9.el5.centos set to be updated\r\n--&gt; Finished Dependency Resolution\r\nDependencies Resolved\r\n=============================================================================\r\n Package                 Arch       Version          Repository        Size\r\n=============================================================================\r\nInstalling:\r\n yum-downloadonly        noarch     1.1.10-9.el5.centos  base              9.0 k\r\nTransaction Summary\r\n=============================================================================\r\nInstall      1 Package(s)\r\nUpdate       0 Package(s)\r\nRemove       0 Package(s)\r\nTotal download size: 9.0 k\r\nIs this ok [y\/N]: y\r\nDownloading Packages:\r\n(1\/1): yum-downloadonly-1 100% |=========================| 9.0 kB    00:00\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nFinished Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n  Installing: yum-downloadonly             ######################### [1\/1]\r\nInstalled: yum-downloadonly.noarch 0:1.1.10-9.el5.centos\r\nComplete!<\/pre>\n<h3>How do I download a RPM package only from RHN or CentOS mirror, without installing it?<\/h3>\n<p>Download httpd package but don&#8217;t install\/update, enter:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\"># yum update httpd -y --downloadonly<\/div><\/div>\n<p>By default package will by downloaded and stored in \/var\/cache\/yum\/ directory. But, you can specifies an alternate directory to store packages such as \/opt, enter:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\"># yum update httpd -y --downloadonly --downloaddir=\/opt<\/div><\/div>\n<p>Sample output:<\/p>\n<pre>yum install httpd -y --downloadonly\r\nLoading \"downloadonly\" plugin\r\nLoading \"fastestmirror\" plugin\r\nLoading \"security\" plugin\r\nLoading mirror speeds from cached hostfile\r\n * base: centos.mirrors.mypsh.com\r\n * updates: mirror.steadfast.net\r\n * addons: mirrors.gigenet.com\r\n * extras: holmes.umflint.edu\r\nSetting up Install Process\r\nParsing package install arguments\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package httpd.i386 0:2.2.3-11.el5_1.centos.3 set to be updated\r\nfilelists.xml.gz          100% |=========================| 2.8 MB    00:03\r\nfilelists.xml.gz          100% |=========================| 681 kB    00:11\r\nfilelists.xml.gz          100% |=========================| 122 kB    00:00\r\nfilelists.xml.gz          100% |=========================|  150 B    00:00\r\n--&gt; Finished Dependency Resolution\r\nDependencies Resolved\r\n=============================================================================\r\n Package                 Arch       Version          Repository        Size\r\n=============================================================================\r\nInstalling:\r\n httpd                   i386       2.2.3-11.el5_1.centos.3  base              1.1 M\r\nTransaction Summary\r\n=============================================================================\r\nInstall      1 Package(s)\r\nUpdate       0 Package(s)\r\nRemove       0 Package(s)\r\nTotal download size: 1.1 M\r\nDownloading Packages:\r\n(1\/1): httpd-2.2.3-11.el5 100% |=========================| 1.1 MB    00:01\r\nexiting because --downloadonly specified<\/pre>\n<p>To see downloaded file, enter:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\"># ls -l \/opt\/*.rpm<\/div><\/div>\n<p>Sample output:<\/p>\n<pre>-rw-r--r-- 1 root root 1116426 Jan 17 03:36 \/opt\/httpd-2.2.3-11.el5_1.centos.3.i386.rpm\r\n-rw-r--r-- 1 root root   83452 Oct  2  2007 \/opt\/lighttpd-fastcgi-1.4.18-1.el5.rf.i386.rpm\r\n-rw-r--r-- 1 root root  635045 Oct 20  2007 \/opt\/psad-2.1-1.i386.rpm<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You need to install plugin called\u00a0yum-downloadonly. This plugin adds a &#8211;downloadonly flag to yum so that yum will only download the packages [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1824","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1824"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1824\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}