如何使用yum 下载 一个 package ?如何使用 yum install package 但是保留 rpm 格式的 package ? 或者又 如何通过yum 中已经安装的package 导出它,即yum导出rpm?
2016-09-18 11:27
766 查看
注意 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
Issue
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
Note:
Yumdownloader
If downloading a installed package, "yumdownloader" is useful.
Note:
https://access.redhat.com/solutions/10154
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
相关文章推荐
- Linux 有问必答:如何使用yum来下载RPM包而不进行安装
- 如何使用yum来下载RPM包而不进行安装
- 如何使用yum来下载RPM包而不进行安装
- 如何使用yum来下载RPM包而不进行安装
- Linux 有问必答:如何使用yum来下载RPM包而不进行安装
- 如何使用yum来下载RPM包而不进行安装
- 如何使用yum来下载RPM包而不进行安装
- 如何使用yum来下载RPM包而不进行安装
- 如何安装整个linux系统中所需要的mp3播放库插件? 可以在安装rpmfusion仓库后直接通过dnf install进行按照就可以了
- YUM安装rpm包安装后本地不清楚的方法(即如何让安装包在本地保留下来)
- 如何通过Intent启动一个已经安装好的APP
- 如何使用yum工具从红帽企业linux5的iso镜像文件上安装或者更新软件包?
- linux/centos安装nginx常见错误及解决办法【make错误,需要yum -y install openssl openssl-devel或者自己下载然后重新./configure】
- 如何在 Linux 中列出通过 RPM 或者 DEB 包安装的文件
- 如何使用yum下载rpm包
- Centos7使用yum下载rpm包而不执行安装
- 使用yum下载而不安装rpm包
- Linux系统 yum 命令安装软件时保留(下载)rpm包
- 如何通过命令行或者使用代码打开一个apk文件
- 如何通过命令行或者使用代码打开一个apk文件