Download RPM packages from a YUM repo without installing
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的更多相关文章
- ClickHouse RPM packages installation from packagecloud.io
Table of Contents Introduction Script-based installation Install script Install packages after scrip ...
- 制定RPM包和加入YUM源
##################################################### ##如有转载,请务必保留本文链接及版权信息 ##欢迎广大运维同仁一起交流linux/unix ...
- [Linux系统] (3)应用安装方式详解(编译安装、rpm包安装、yum安装)
软件的安装方式: 编译安装 RPM包安装 yum安装 一.编译安装 1.下载一个源码安装包:tengine-2.3.0.tar.gz.这是淘宝二次开发过的nginx.将其解压. .tar.gz 2.查 ...
- Redhat配置yum源(使用阿里云yum Repo)
1. 查看版本号和系统类别: cat /etc/redhat-release archor cat /etc/issue && arch 2.检查yum是否安装,以及安装了哪些依赖源并 ...
- redhat 配置yum源(配置163 yum repo)
一般安装好redhat后,不能注册的话,不能使用系统自带的yum源.但是我们可以自己配置yum源来解决这一问题.下面介绍下redhat配置163yum源. 1) 查看版本号和系统类别: cat /et ...
- Linux CentOS7 VMware 安装软件包的三种方法、rpm包介绍、rpm工具用法、yum工具用法、yum搭建本地仓库
一.安装软件包的三种方法 Linux下游三种安装方法,rpm工具.yum工具.源码包.rpm按装一个程序包时,有可能因为该程序包依赖另一个程序包而无法安装:yum工具,可以连同依赖的程序包一起安装. ...
- 别人的Linux私房菜(23)软件安装RPM、SRPM、YUM
RPM(RedHat Package Manager),不同Linux发行版发布的RPM文件甚至不同版本,不通用. SRPM为Source RPM,所提供的软件内容没有经过编译,格式为xxx.src. ...
- linux运维、架构之路-rpm定制、本地yum仓库搭建
一.定制rpm包 1.环境 [root@m01 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@m01 ~]# uname - ...
- rpm 系 linux 系统中 repo 文件中的 $release 到底等于多少?
rpm 系 linux 系统中 repo 文件中的 $release 到底等于多少? 结论 对于 8 来说,通过以下命令 #/usr/libexec/platform-python -c 'impor ...
随机推荐
- Shell脚本使用汇总整理
Shell脚本使用汇总整理 一.Shell脚本常用的头部格式: 头部的作用就是告知linux此脚本的类型: 常用的头部格式如下:(/bin/bash,是bash的路径,如果不知道路径可以通过which ...
- Redis数据库 : python与java操作redis
redis 包 from redis import * 连接: r = StrictRedis(host='localhost', port='6379') 读写:r.set('key','value ...
- 在CentOS VPS上通过SSH安装 MySQL
输入 yum install mysql-server 按Y继续 安装完成,设置开机启动Mysql,输入 chkconfig --levels 235 mysqld on 然后启动tomcat,输入s ...
- 使用union all 命令之后如何对hive表格进行去重
业务场景大概是这样的,这里由两个hive表格,tableA 和 tableB, 格式内容都是这样的: uid cate1 cate2 在hive QL中,我们知道union有着自动去重的功能,但是那是 ...
- YCM的使用
YCM大概用来做3件事: (1)自动补全 (2)检查语法 (3)跳转到函数定义 然后涉及到两个关键的文件.vimrc 和 .ycm_extra_conf.py 首先需要正确的配置,在.vimrc中写入 ...
- python创建字典
创建: {x:x**2 for x in (2,4,6)} dict(xjm=110,lxh=119,pzq=120) dict([('a',1),('b',2),('c',3)])
- 笔记-python-redis接口
笔记-python-redis接口 1. python 与redis接口 redis是redis数据库的python接口包,为python提供的redis的调用接口. 注:文档内容主要基于h ...
- spark streaming的应用
今天我们讲spark streaming的应用,这个是实时处理的,类似于Storm以及Flink相关的知识点, 说来也巧,今天的自己也去听了关于Flink的相关的讲座,可惜自己没有听得特别清楚,好像是 ...
- Android 数据库的线程合作
前言:之前琢磨了很多线程相关的东西,一直摸不着头脑,直到学到了数据库,终于发现世界原来如此美好,任何事物都有存在的理由. 1.主线程,我把它比作长江,作为母亲河的长江,想必大家每个人都不会很陌生. 2 ...
- JAVA API访问Hbase org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=32
Java使用API访问Hbase报错: 我的hbase主节点是spark1 java代码访问hbase的时候写的是ip 结果运行程序报错 不能够识别主机名 修改主机名 修改主机hosts文 ...