This how-to will explain how to download rpm packages from a yum repository without installing them. This will work on Redhat Enterprise Linux 5.x, Fedora and CentOS 5.x.

You need to install yum plugin called yum-downloadonly. This plugin adds a --downloadonly flag to yum so that yum can download the packages without installing/updating them. Following options supported by this plugin:

  • --downloadonly : don't update, just download a rpm file to default yum cache directory/var/cache/yum/.
  • --downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp

Install the yum-downloadonly plugin:

Type the following command to install plugin, enter:

# yum install yum-downloadonly

Now for downloading rpm packages from an already configured yum repository use the following command:

# yum update httpd -y --downloadonly
By default package will by downloaded and stored in /var/cache/yum/ directory. But, you can specifies an alternate directory to store packages such as /opt, enter:

# yum update httpd -y --downloadonly --downloaddir=/opt

Method 2: yum-utils.noarch Package

Downloading rpm packages from a yum repository can be accomplished by the below described method also!!!

yum-utils is a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and more powerful to use. These tools include: debuginfo-install, package-cleanup, repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader, yum-debug-dump and yum-groups-manager.

# yum -y install yum-utils.noarch

Now use the yumdownloader command which is a program for downloading RPMs from Yum repositories. Type the following command to download httpd rpm file:

# yumdownloader httpd

Sample output:

Loaded plugins: rhnplugin
httpd-2.2.3-31.el5_4.2.x86_64.rpm       1.2 MB 00:00

Download RPM packages from a YUM repo without installing的更多相关文章

  1. ClickHouse RPM packages installation from packagecloud.io

    Table of Contents Introduction Script-based installation Install script Install packages after scrip ...

  2. 制定RPM包和加入YUM源

    ##################################################### ##如有转载,请务必保留本文链接及版权信息 ##欢迎广大运维同仁一起交流linux/unix ...

  3. [Linux系统] (3)应用安装方式详解(编译安装、rpm包安装、yum安装)

    软件的安装方式: 编译安装 RPM包安装 yum安装 一.编译安装 1.下载一个源码安装包:tengine-2.3.0.tar.gz.这是淘宝二次开发过的nginx.将其解压. .tar.gz 2.查 ...

  4. Redhat配置yum源(使用阿里云yum Repo)

    1. 查看版本号和系统类别: cat /etc/redhat-release archor cat /etc/issue && arch 2.检查yum是否安装,以及安装了哪些依赖源并 ...

  5. redhat 配置yum源(配置163 yum repo)

    一般安装好redhat后,不能注册的话,不能使用系统自带的yum源.但是我们可以自己配置yum源来解决这一问题.下面介绍下redhat配置163yum源. 1) 查看版本号和系统类别: cat /et ...

  6. Linux CentOS7 VMware 安装软件包的三种方法、rpm包介绍、rpm工具用法、yum工具用法、yum搭建本地仓库

    一.安装软件包的三种方法 Linux下游三种安装方法,rpm工具.yum工具.源码包.rpm按装一个程序包时,有可能因为该程序包依赖另一个程序包而无法安装:yum工具,可以连同依赖的程序包一起安装. ...

  7. 别人的Linux私房菜(23)软件安装RPM、SRPM、YUM

    RPM(RedHat Package Manager),不同Linux发行版发布的RPM文件甚至不同版本,不通用. SRPM为Source RPM,所提供的软件内容没有经过编译,格式为xxx.src. ...

  8. linux运维、架构之路-rpm定制、本地yum仓库搭建

    一.定制rpm包 1.环境 [root@m01 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@m01 ~]# uname - ...

  9. rpm 系 linux 系统中 repo 文件中的 $release 到底等于多少?

    rpm 系 linux 系统中 repo 文件中的 $release 到底等于多少? 结论 对于 8 来说,通过以下命令 #/usr/libexec/platform-python -c 'impor ...

随机推荐

  1. css页面出现滚动条左右跳动

    问题描述:页面首次加载的时候内容是一屏,不会出现纵向滚动条,但是当点击加载的内容更多时页面会出现左右跳动一下的情况.出现跳动的主要原因就是出现了滚动条,滚动条的宽度影响了内容区域的宽度. 1.查看导航 ...

  2. python__基础 : 类的 __slots__ 方法

    实例在创建出来之后,可以动态的添加属性和方法, 那如果想要限制添加的实例属性,可以用一下 __slots__ 这个东西: class Test(object): __slots__ = ('name' ...

  3. 【jQeury】input输入框状态,input事件,blur事件,focus事件

    //输入框正在输入时 $("#test1").on('input',function(){ alert('正在输入'); }) //输入框得到焦点时 $("#test2& ...

  4. 实用jquery插件

    jquery toast 一个弹窗插件 jquery.form.min.js 一个Ajax表单插件

  5. python3 练习题100例 (二十)

    #!/usr/bin/env python3# -*- coding: utf-8 -*-"""练习二十:判断一个年份是否是闰年公历闰年计算方法:1.普通年能被4整除且不 ...

  6. 重头开始学Qt——day1

    以前学过Qt,但只是为了学分,现在重学. 1. 认识Qt应用程序框架 直接新建一个项目后,自动生成了一下文件,下面一个个理解. (1)main.cpp main.cpp中特别的是QApplicatio ...

  7. 排序-InsertSort

    数据结构之插入排序 参考----王道论坛2015年数据结构联考复习指南---- 算法稳定性:如果待排序表中有任意两个元素x1,x2相等,且排序前x1在x2的前面,使用某个排序算法之后,若x1仍然在x2 ...

  8. java练习题——数组

    上述代码可以顺利通过编译,并且输出一个“很奇怪”的结果:[Ljava.lang.Object;@2a139a55 为什么会出现这种情况? 直接输出object的对象,系统会输出地址,如果想要输出其中的 ...

  9. URL地址传参中特殊符号的转码和解码

    背景: URL传参在web开发中很常见,一般来说这种方式并不推荐,原因就是浏览器多种多样,各家浏览器对URL地址的解析的表现很不一样,特别是当参数有非ASCII字符.英文字母.阿拉伯数字时. 在CRM ...

  10. UR官网特效

    <!DOCTYPE html>                              <!--申明文档类型:html--> <html lang="en&q ...