Yum: 即Yellowdog Update Modifier,是一種基於rpm的包管理工具php
yum命令使用示例web
顯示全部倉庫shell
yum repolist all
顯示可用的倉庫centos
repolist enabled
顯示可用的倉庫緩存
repolist disabled
顯示全部的程序包app
yum list 或 yum list all [vathe@localhost ~]$yum list tre? Installed Packages tree.x86_64 1.6.0-10.el7 @base 還支持通配符格式的查詢
顯示可安裝的程序包ide
yum list available [vathe@localhost ~]$yum list available php Available Packages php.x86_64 5.4.16-42.el7 base
顯示可更新或已安裝的程序包工具
yum list updates yum list installed
顯示倉庫中最近增長的程序包ui
yum list recent
#安裝 tree 程序 yum install tree
yum update tree
yum remove tree 或 yum erase tree
yum info tree
查看某一文件來自於那個程序包spa
[vathe@localhost ~]$yum provides /bin/mv coreutils-8.22-18.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts Repo : base Matched from: Filename : /bin/mv #表示/bin/mv文件來自於coreutils-8.22-18.el7.x86_64程序包
yum clean all #清楚插件緩存 yum clean plugins
yum makecache
[vathe@localhost ~]$yum search php ============================================== N/S matched: php =============================================== graphviz-php.x86_64 : PHP extension for graphviz php.x86_64 : PHP scripting language for creating dynamic web sites php-bcmath.x86_64 : A module for PHP applications for using the bcmath library ...
[vathe@localhost ~]$yum deplist php package: php.x86_64 5.4.16-42.el7 dependency: httpd provider: httpd.x86_64 2.4.6-45.el7.centos ...
[root@localhost ~]# yum history Repository 'base' is missing name in configuration, using id ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 2 | Vathe Su <vathe> | 2017-04-17 17:07 | Install | 1 1 | System <unset> | 2017-03-23 22:19 | Install | 1405 history list
yum groupinstall # 安裝包組 yum groupupdate #更新包組 yum grouplist #顯示包組 yum groupremove #移除包組 yum groupinfo #查看包組信息 這些命令和上面的命令用法相似,只是針對於包組而言