[root@hdp01 ~]# yum list available |grep ambari ######列出可安裝的程序包
ambari-infra-solr.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-infra-solr-client.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-logsearch-logfeeder.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-logsearch-portal.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-metrics-collector.x86_64 2.6.1.5-3 ambari-2.6.1.5
ambari-metrics-common.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-metrics-grafana.x86_64 2.6.1.5-3 ambari-2.6.1.5
[root@hdp01 ~]# yum list installed |grep ambari ######列出已安裝的程序包
ambari-agent.x86_64 2.6.1.5-3 @ambari-2.6.1.5
ambari-metrics-hadoop-sink.x86_64
2.6.1.5-3 @ambari-2.6.1.5
ambari-metrics-monitor.x86_64
2.6.1.5-3 @ambari-2.6.1.5
ambari-server.x86_64 2.6.1.5-3 @ambari-2.6.1.5
smartsense-hst.x86_64 1.4.4.2.6.1.5-3 @ambari-2.6.1.5php
[root@hdp01 ~]# yum list ambari*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
ambari-agent.x86_64 2.6.1.5-3 @ambari-2.6.1.5
ambari-metrics-hadoop-sink.x86_64 2.6.1.5-3 @ambari-2.6.1.5
ambari-metrics-monitor.x86_64 2.6.1.5-3 @ambari-2.6.1.5
ambari-server.x86_64 2.6.1.5-3 @ambari-2.6.1.5
Available Packages
ambari-infra-solr.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-infra-solr-client.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-logsearch-logfeeder.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-logsearch-portal.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-metrics-collector.x86_64 2.6.1.5-3 ambari-2.6.1.5
ambari-metrics-common.noarch 2.6.1.5-3 ambari-2.6.1.5
ambari-metrics-grafana.x86_64 2.6.1.5-3 ambari-2.6.1.5 web
Yum: 即Yellowdog Update Modifier,是一種基於rpm的包管理工具shell
yum命令使用示例centos
顯示全部倉庫緩存
yum repolist all
顯示可用的倉庫app
repolist enabled
顯示可用的倉庫ide
repolist disabled
顯示全部的程序包工具
yum list 或 yum list all [vathe@localhost ~]$yum list tre? Installed Packages tree.x86_64 1.6.0-10.el7 @base 還支持通配符格式的查詢
顯示可安裝的程序包oop
yum list available [vathe@localhost ~]$yum list available php Available Packages php.x86_64 5.4.16-42.el7 base
顯示可更新或已安裝的程序包ui
yum list updates yum list installed
顯示倉庫中最近增長的程序包
yum list recent
#安裝 tree 程序 yum install tree
yum update tree
yum remove tree 或 yum erase tree
yum info tree
查看某一文件來自於那個程序包
[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 #查看包組信息 這些命令和上面的命令用法相似,只是針對於包組而言