如何使用yum 下载 一个 package ?如何使用 yum install package 但是保留 rpm 格式的 package ? 或者又 如何通过yum 中已经安装的package 导出它,即yum导出rpm?
注意 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?的更多相关文章
- 下载一个vue项目执行npm install 后运行项目npm run dev后出错 - 问题解决
在SVN上拉下来一个vue项目,上面没有提交项目里面的node_modules文件夹,所以要自己执行 npm install 安装,但安装完后运行项目后却报错了: $ npm run dev > ...
- 使用yum下载rpm包
查看系统有哪些可用的yum源yum repolist all yum指定本地源安装rpm包yum install <package-name> --enablerepo=<repos ...
- Linux centosVMware yum更换国内仓库源、yum下载rpm包、源码包安装
一.yum更换国内仓库源 cd /etc/yum.repos.d/ rm -f dvd.repo wget http://mirrors.163.com/.help/CentOS7-Base-163. ...
- 如何使用yum下载rpm包
一.使用 yum-downloadonly 插件 参考文章:ghosTzone 的博客http://ghostm55.is-programmer.com/posts/6422.html yum是一个优 ...
- 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 ...
- Centos7使用yum下载rpm包而不执行安装
yum-downloadonly是yum的一个插件,使得yum可以从RHN或者yum的仓库只下载包而不安装. 举例,从yum源下载ricci软件包 # yum install --downloadon ...
- yum 下载RPM包而不进行安装
yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了--downloadonly(只下载)的选项来达到这个目的. $ sudo yum install --downloadonly < ...
- 利用yum下载rpm离线包
# 利用yum下载rpm包 ### 简介-----------------------------yum是基于red hat系统的默认包管理器.使用yum可以安装或更新一个rpm包,并且他会自动解决包 ...
- yum更换国内源及yum下载rpm包
一.yum更换国内源 运维开发技术交流群欢迎大家加入一起学习(QQ:722381733) 1.前往yum文件路径地址 [root@web1 ~]# cd /etc/yum.repos.d/ [root ...
随机推荐
- [APUE]系统数据文件与信息
一.口令文件 UNIX口令文件包含下表中的各个字段,这些字段包含在 由于历史原因,口令文件是/bin/passwd,而且是一个文本文件,每一行都包括了上表中的七个字段,字段之间用":&quo ...
- My TWI
前言 对TWI没有什么特别的印象,因为有一个更出名的TWU,而我去年又刚好错过了它,因此TWU的光辉完全掩盖了TWI.对TWI印象最深的是在邮件中看到的38th北京的这期,看到他们的图文记录,在圈子中 ...
- Entity Framework 手动使用migration里面的up 和down方法。
add-migration -IgnoreChanges 201606100717405_201606100645298_InitialCreate 执行这一句后 ,清空使用map生成的代码,个人不太 ...
- Python爬虫小白入门(四)PhatomJS+Selenium第一篇
一.前言 在上一篇博文中,我们的爬虫面临着一个问题,在爬取Unsplash网站的时候,由于网站是下拉刷新,并没有分页.所以不能够通过页码获取页面的url来分别发送网络请求.我也尝试了其他方式,比如下拉 ...
- VB.NET设置控件和窗体的显示级别
前言:在用VB.NET开发射频检测系统ADS时,当激活已存在的目标MDI子窗体时,被其他子窗体遮住了,导致目标MDI子窗体不能显示. 这个问题怎么解决呢?网上看到一篇帖子VB.NET设置控件和窗体的显 ...
- A*算法应用[转]
转自:http://www.cnblogs.com/zhoug2020/p/3468167.html 这是一篇十分精彩/易懂的博客,感谢原博主!本文通过自己的理解在原博文基础上突出一些重点字眼,句子. ...
- Git的四个基本概念及 git的工作流程
- VS2015 Git 源码管理工具简单入门
1.VS Git插件 1.1 环境 VS2015+GitLab 1.2 Git操作过程图解 1.3 常见名词解释 拉取(Pull):将远程版本库合并到本地版本库,相当于(Fetch+Meger) 获取 ...
- SQL-日期函数
GETDATE() :取得当前日期时间 DATEADD (datepart , number, date ),计算增加以后的日期.参数date为待计算的日期:参数number为增量:参数datepar ...
- 如何搭建git服务器
一.前言 现在越来越多的公司用git进行版本控制,不过git是默认是开源的,如果私有的话是需要付费的,如果不想付费自己可以搭建一个git服务器用来版本控制. 二.服务器端操作 1.安装git sudo ...