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. 基于centos7实现的nfs

    NFS NFS(Network FileSystem,网络文件系统),最早由Sun公司所发展出来的,主要是通过网络让不同的主机.不同的操作系统,可以彼此分享个别档案,因此我们也可以简单把NFS看成是一 ...

  2. ajax原生js及readystate/status

    菜鸟教程 ←← GET: <script> function  ajaxGet(){ var  xmlhttp; if(window.XMLHttpRequest){ //TE7+  Fi ...

  3. 【Effective c++ 读书笔记】条款01 视 C++ 为一个语言联邦

    一开始,C++只是 C 加上一些面向对象的特性.C++最初的名称 C with Classes 也反映了这个血缘关系. 但是,现在,当这个语言逐渐成熟,它变得更活跃更无拘束,更大胆冒险,开始接受不同于 ...

  4. php 微信公众号图文消息回复的实现 与access_token

    //代码如下 <?phpclass IndexAction extends Action { public function __construct(){ } public function i ...

  5. Dawson City【道森市】

    Dawson City Cities usually have a good reason for being where they are, like a nearby port or river. ...

  6. Aizu:2170-Marked Ancestor

    Marked Ancestor Time limit 8000 ms Memory limit 131072 kB Problem Description You are given a tree T ...

  7. [洛谷1156]垃圾陷阱(DP)

    [Luogu1156] f[i]表示高度为i时的存活时间 Code #include <cstdio> #include <algorithm> #define N 110 u ...

  8. [Django]我的第一个网页,报错啦~(自己实现过程中遇到问题以及解决办法)

    环境配置: python :2.7.13 django:1.10.5 OS:Win7(64位)& Centos7 问题描述  解决办法   global name 'render' is no ...

  9. Idea中maven依赖图查看

    技术交流群: 233513714 使用Intellij idea,想看看它的maven依赖图,根据eclipse的经验,不是很容易能找到Intellij idea对应的功能.在打开的pom.xml文件 ...

  10. ITIBB原创,互联网首部自媒体小说《1024伐木累》-小白篇之入职-总章节一

    小序 IT人不懂爱?代码汪是小白?又有谁,懂我情怀? 逗比青年,背上行囊,懵懵懂懂闯帝都!前途似海,来日方长! 青春无梦妄少年!认定就作,不平就说,碰撞火花,如此绚烂…… IT人有比格?其实,那是顽强 ...