注意 RHEL5 和 RHEL6 的不同

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

Install the package including "downloadonly" plugin:
Raw (RHEL5)
# yum install yum-downloadonly (RHEL6)
# yum install yum-plugin-downloadonly Run yum command with "--downloadonly" option as follows:
Raw # yum install --downloadonly --downloaddir=<directory> <package> 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.

Install the yum-utils package:
Raw # yum install yum-utils 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.

https://access.redhat.com/solutions/10154

如何使用yum 下载 一个 package ?如何使用 yum install package 但是保留 rpm 格式的 package ? 或者又 如何通过yum 中已经安装的package 导出它,即yum导出rpm?的更多相关文章

  1. 下载一个vue项目执行npm install 后运行项目npm run dev后出错 - 问题解决

    在SVN上拉下来一个vue项目,上面没有提交项目里面的node_modules文件夹,所以要自己执行 npm install 安装,但安装完后运行项目后却报错了: $ npm run dev > ...

  2. 使用yum下载rpm包

    查看系统有哪些可用的yum源yum repolist all yum指定本地源安装rpm包yum install <package-name> --enablerepo=<repos ...

  3. Linux centosVMware yum更换国内仓库源、yum下载rpm包、源码包安装

    一.yum更换国内仓库源 cd /etc/yum.repos.d/ rm -f dvd.repo wget http://mirrors.163.com/.help/CentOS7-Base-163. ...

  4. 如何使用yum下载rpm包

    一.使用 yum-downloadonly 插件 参考文章:ghosTzone 的博客http://ghostm55.is-programmer.com/posts/6422.html yum是一个优 ...

  5. yum更换国内源 yum下载rpm包 源码包安装

    7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 yum更换国内源 cd  /etc/yum.repo.d/ 删除源 rm -f   dvd.repo rm -f  C ...

  6. Centos7使用yum下载rpm包而不执行安装

    yum-downloadonly是yum的一个插件,使得yum可以从RHN或者yum的仓库只下载包而不安装. 举例,从yum源下载ricci软件包 # yum install --downloadon ...

  7. yum 下载RPM包而不进行安装

    yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了--downloadonly(只下载)的选项来达到这个目的. $ sudo yum install --downloadonly < ...

  8. 利用yum下载rpm离线包

    # 利用yum下载rpm包 ### 简介-----------------------------yum是基于red hat系统的默认包管理器.使用yum可以安装或更新一个rpm包,并且他会自动解决包 ...

  9. yum更换国内源及yum下载rpm包

    一.yum更换国内源 运维开发技术交流群欢迎大家加入一起学习(QQ:722381733) 1.前往yum文件路径地址 [root@web1 ~]# cd /etc/yum.repos.d/ [root ...

随机推荐

  1. Scrapy框架爬虫初探——中关村在线手机参数数据爬取

    关于Scrapy如何安装部署的文章已经相当多了,但是网上实战的例子还不是很多,近来正好在学习该爬虫框架,就简单写了个Spider Demo来实践.作为硬件数码控,我选择了经常光顾的中关村在线的手机页面 ...

  2. Hyper-V3:虚拟机的配置

    在Hyper-V成功新建一台虚拟机,在正式使用之前,必须配置VM使用的硬件资源,并授予用户访问VM的权限等,本文罗列出一些常见的配置,供读者参阅. 一,为虚拟机分配使用的内存 在Hyper-V Man ...

  3. 百度 flash html5自切换 多文件异步上传控件webuploader基本用法

    双核浏览器下在chrome内核中使用uploadify总有302问题,也不知道如何修复,之所以喜欢360浏览器是因为帮客户控制渲染内核: 若页面需默认用极速核,增加标签:<meta name=& ...

  4. 带你实现开发者头条APP(三) 首页实现

    title: 带你实现开发者头条APP(三) 首页实现 tags: 轮播广告,ViewPager切换,圆形图片 grammar_cjkRuby: true --- 一.前言 今天实现开发者头条APP的 ...

  5. shiro权限管理框架与springmvc整合

    shiro是apache下的一个项目,和spring security类似,用于用户权限的管理‘ 但从易用性和学习成本上考虑,shiro更具优势,同时shiro支持和很多接口集成 用户及权限管理是众多 ...

  6. Quartz2D总结

    天了噜,脑子完全懵了,最起码说出来个上下文啊,连这个都给忘了,特此总结一下,并以此缅怀这次面试 Quartz2D的API来自于Core Graphics(这就是为什么CGContextRef是以CG开 ...

  7. ASP.NET MVC 5 系列 学习笔记 目录 (持续更新...)

    前言: 记得当初培训的时候,学习的还是ASP.NET,现在回想一下,图片水印.统计人数.过滤器....HttpHandler是多么的经典! 不过后来接触到了MVC,便立马爱上了它.Model-View ...

  8. Mysql - 游标/动态sql/事务

    游标这个在我目前的项目里面用的还不多, 但是其功能还是很强大的. 动态sql以前都没用过, 是跟着富士康(不是张全蛋的富土康哦)过来的同事学的. 还是挺好用的. 我的数据库方面, 跟他学了不少. 在此 ...

  9. CentOS7 + mono +Jexus 环境的搭建

    CentOS7的安装和配置 1,从http://www.centos.org/下载CentOS7的镜像,并在VMWare中创建该镜像的虚拟机,为方便操作,把虚拟机的网络连接设置为桥接模式:在安装过程中 ...

  10. Membership三步曲之入门篇 - Membership基础示例

    Membership 三步曲之入门篇 - Membership基础示例 Membership三步曲之入门篇 -  Membership基础示例 Membership三步曲之进阶篇 -  深入剖析Pro ...