下载前先安装一个小插件
[root@wang yum.repos.d]# yum install -y yum-plugin-downloadonly
安装一个包的同时 加上 yum install yap --downloadonly --downloaddir=/tmp/
查看 [root@wang yum.repos.d]# ls /tmp/yap-5.1.3-2.1.el6.x86_64.rpm /tmp/yap-5.1.3-2.1.el6.x86_64.rpm
之前下载的前提是没有安装的包可下载 下边是已经安装的包在下载命令 reinstall 关键词
# yum reinstall vim-enhanced –downloadonly –downloaddir=/tmp/
[root@wang yum.repos.d]# ls /tmp/vim-enhanced-7.4.629-5.el6.x86_64.rpm /tmp/vim-enhanced-7.4.629-5.el6.x86_64.rpm
原创文章,作者:sunnyman218,如若转载,请注明出处:https://blog.ytso.com/268284.html