系统相关
首页 > 系统相关> > linux yum命令

linux yum命令

作者:互联网

 

yum下载安装包;

安装iscsiadm
因yum install默认安装完之后会自动清理安装包,如果只想通过yum下载软件的安装包,但是不需要进行安装的话,可以使用 yumdownloader 命令。

当然也可以在repo文件中添加keepcache=1,下载的rpm文件也会自动保存在 /var/cache/yum/x86_64/目录下
yumdownloader 命令在软件包 yum-utils 里面;
下载yum插件,帮助下载安装包;

//yum provides,查找命令所属的安装包
# yum provides */yumdownloader      
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
ISO/filelists_db                                                                                                                                                                      | 3.2 MB  00:00:00
yum-utils-1.1.31-50.el7.noarch : Utilities based around the yum package manager
Repo        : ISO
Matched from:
Filename    : /usr/bin/yumdownloader
yum-utils-1.1.31-50.el7.noarch : Utilities based around the yum package manager
Repo        : @anaconda
Matched from:
Filename    : /usr/bin/yumdownloader

下载:

# yumdownloader iscsi-initiator-utils
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
iscsi-initiator-utils-6.2.0.874-10.el7.x86_64.rpm                                                                                                                                     | 421 kB  00:00:00

 

yum常用命令

 

创建新的yum配置文件后:

运行以下命令生成缓存

yum clean all
yum makecache

 

标签:00,缓存,yumdownloader,命令,yum,clean,linux
来源: https://www.cnblogs.com/lei2017/p/16287026.html