博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
yum downloadonly
阅读量:6079 次
发布时间:2019-06-20

本文共 2076 字,大约阅读时间需要 6 分钟。

How to use yum to download a package without installing it

 SOLUTION VERIFIED - Updated October 22 2015 at 2:36 PM - 

Environment

  • Red Hat Enterprise Linux (RHEL) 7

  • Red Hat Enterprise Linux 6

  • Red Hat Enterprise Linux 5

Issue

  • How do I use yum to download a package without installing it?

Resolution

There are two ways to download a package without installing it.

One is using the "downloadonly" plugin for yum, the other is using "yumdownloader" utility.

Downloadonly plugin for yum

  1. Install the package including "downloadonly" plugin:

    (RHEL5)# yum install yum-downloadonly(RHEL6)# yum install yum-plugin-downloadonly
  2. Run yum command with "--downloadonly" option as follows:

    # yum install --downloadonly --downloaddir=
     
  3. Confirm the RPM files are available in the specified download directory.

Note:

  • Before using the plugin, check /etc/yum/pluginconf.d/downloadonly.conf to confirm that this plugin is "enabled=1"

  • This is applicable for "yum install/yum update" and not for "yum groupinstall". Use "yum groupinfo" to identify packages within a specific group.

  • If only the package name is specified, the latest available package is downloaded (such as sshd). Otherwise, you can specify the full package name and version (such as httpd-2.2.3-22.el5).

  • If you do not use the --downloaddir option, files are saved by default in /var/cache/yum/ in rhel-{arch}-channel/packages

  • If desired, you can download multiple packages on the same command.

  • You still need to re-download the repodata if the repodata expires before you re-use the cache. By default it takes two hours to expire.

Yumdownloader

If downloading a installed package, "yumdownloader" is useful.

  1. Install the yum-utils package:

    # yum install yum-utils
  2. Run the command followed by the desired package:

    # yumdownloader 

Note:

  • The package is saved in the current working directly by default; use the --destdir option to specify an alternate location.

  • Be sure to add --resolve if you need to download dependencies

本文转自 Wilson9527 51CTO博客,原文链接:http://blog.51cto.com/devops9527/1888910,如需转载请自行联系原作者
你可能感兴趣的文章
学习日志---图的基础和邻接矩阵的建立&&图的遍历
查看>>
Windows Server 2008 小技巧(一)IP地址和MAC地址的绑定
查看>>
redis 集群
查看>>
spora分析过程的产生的部分笔记
查看>>
word中的dde
查看>>
AsyncTask实现代码原理
查看>>
我的友情链接
查看>>
MySQL服务器进程CPU占用100%的解决方法
查看>>
我的友情链接
查看>>
apache启动报错 httpd: apr_sockaddr_info_get() failed for
查看>>
xen创建Domain步骤
查看>>
我的友情链接
查看>>
【学神-RHEL7】1-26-case、for、while语句的使用和循环嵌套
查看>>
用大白话聊聊JavaSE -- 自定义注解入门
查看>>
我的友情链接
查看>>
shell符号
查看>>
时钟和时区
查看>>
apache/httpd 安装
查看>>
oracle 可传输的表空间:rman
查看>>
模拟两地公司通过***专用网路远程搭建AD DC额外域的实验
查看>>