yum downloadonly

简介: How to use yum to download a package without installing it SOLUTION VERIFIED - Updated October 22 2015 at 2:36 PM - English EnvironmentR...

How to use yum to download a package without installing it

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

English 

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:

    Raw

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

    Raw

    # yum install --downloadonly --downloaddir=<directory> <package>
  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:

    Raw

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

    Raw

    # yumdownloader <package>

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


目录
相关文章
|
NoSQL Java Redis
SpringBoot集成Redis解决表单重复提交接口幂等(亲测可用)
SpringBoot集成Redis解决表单重复提交接口幂等(亲测可用)
1167 0
|
JSON API 数据格式
豆瓣电影api系列
豆瓣电影api系列
豆瓣电影api系列
|
存储 Java 关系型数据库
Springboot AOP实现指定敏感字段数据加密 (数据加密篇 二)
Springboot AOP实现指定敏感字段数据加密 (数据加密篇 二)
2565 0
Springboot AOP实现指定敏感字段数据加密 (数据加密篇 二)
|
移动开发 JSON Kubernetes
k8s异常诊断之no space left on device.
某用户反馈,特定节点一直拉不起来pod,提示no space left on device.,手动去docker run也是相同的报错 # docker run --name aestools-perf --cap-add CAP_SYS_ADMIN --privileged -ti --rm registry-vpc.cn-beijing.aliyuncs.com/my-nettools/aestools:onlyperf docker: Error response from daemon: error creating overlay mount to /var/li
4208 135
|
机器学习/深度学习 算法 数据挖掘
量子计算在金融领域的应用探索
量子计算凭借其强大的计算能力和数据处理能力,正逐渐在金融领域展现巨大潜力。本文探讨了量子计算在风险管理、投资组合优化、高频交易、反欺诈及金融衍生品定价等方面的应用,介绍了当前进展及未来挑战,展示了量子计算如何提升金融决策效率和准确性。
1551 8
|
数据采集 传感器 监控
多协议网关BL110钡铼6路RS485转MQTT协议云网关
BL110钡铼6路RS485转MQTT协议云网关是一款高性能、易配置的工业级设备,适用于各种需要远程监控和数据采集的物联网应用场景。通过将传统RS485设备的数据转换为MQTT协议并上传至云平台,实现了设备的远程管理和智能控制,极大地提升了系统的管理效率和响应速度。
753 2
|
JavaScript 前端开发 C#
从入门到放弃,我们为何从 Blazor 回到 Vue
【10月更文挑战第29天】在前端开发中,许多开发者从尝试新技术 Blazor 最终回到熟悉的 Vue。主要原因包括:1) Blazor 学习曲线陡峭,Vue 上手容易;2) Vue 开发工具成熟,开发效率高;3) Vue 性能优异,优化简单;4) Vue 社区庞大,生态丰富;5) 项目需求和团队协作更适配 Vue。选择技术栈需综合考虑多方面因素。
1827 0
|
敏捷开发 存储 数据可视化
无纸化办公用什么软件能够最快提高工作效率!
无纸化办公(Paperless Office)是现代办公的重要趋势,旨在减少纸张使用,保护环境,提高效率,降低成本。通过电子文件管理,无纸化办公实现了快速查找、即时共享和远程协作,大幅提升了工作效率。文章推荐了五款高效无纸化办公软件:板栗看板、Jira、Wrike、Basecamp 和 Monday.com,这些工具在任务管理、项目协作和数据统计等方面表现出色,助力企业实现无纸化转型。
|
Kubernetes 监控 测试技术
在K8S中,如何实现金丝雀发布(灰度发布)?蓝绿发布?
在K8S中,如何实现金丝雀发布(灰度发布)?蓝绿发布?
|
机器学习/深度学习 安全 API
爱回收平台技术揭秘:构建高效、安全、用户友好的二手物品回收生态系统
爱回收利用微服务架构打造高效安全的二手电子回收平台。系统通过API Gateway处理前端请求,各微服务独立处理业务逻辑,如商品评估、订单创建和支付结算,采用机器学习算法预估价格。安全策略包括OAuth2.0授权、数据加密、访问控制和DDoS防护。性能优化涉及缓存、负载均衡及数据库优化,提供便捷、透明的服务,促进可持续发展。
1109 1