CentOS下yum命令详解

Yum: 即Yellowdog Update Modifier,是一种基于rpm的包管理工具

yum命令使用示例

显示yum仓库

显示所有仓库

yum repolist all

显示可用的仓库

repolist enabled

显示可用的仓库

repolist disabled

显示应用程序包

显示所有的程序包

yum list

yum list all [vathe@localhost ~]$yum list tre?
Installed Packages
tree.x86_64 1.6.0-10.el7 @base 还支持通配符格式的查询

显示可安装的程序包

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

显示仓库中最近增加的程序包

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
...

查看指定包所依赖的capabilities

[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
...

查看yum事务历史

[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       #查看包组信息

这些命令和上面的命令用法类似,只是针对于包组而言

CentOS下yum命令详解的更多相关文章

  1. CentOS下rpm命令详解

    CentOS下rpm命令详解 rpm,Redhat Package Manager,即为红帽公司为RHEL开发的专用包管理器,后来更改为RPM Package Manager,类似于GNU项目,使用递 ...

  2. Linux下yum命令详解

    yum是什么yum = Yellow dog Updater, Modified主要功能是更方便的添加/删除/更新RPM包.它能自动解决包的倚赖性问题.它能便于管理大量系统的更新问题yum特点 可以同 ...

  3. CentOS下screen 命令详解

    一.背景 系统管理员经常需要SSH 或者telent 远程登录到Linux 服务器,经常运行一些需要很长时间才能完成的任务,比如系统备份.ftp 传输等等.通常情况下我们都是为每一个这样的任务开一个远 ...

  4. Linux下面的yum命令详解

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...

  5. linux yum命令详解

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...

  6. linux yum命令详解-转

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...

  7. 【转】linux yum命令详解

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...

  8. yum命令详解

    yum(全 称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载 ...

  9. 【转发】linux yum命令详解

    linux yum命令详解 yum(全 称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理, ...

随机推荐

  1. 【做题】arc080_f-Prime Flip——转换、数论及匹配

    题意:有一个无限序列,其中有\(n\)个位置上的数为\(1\),其余都是\(0\).你可以进行若干次操作,每次选取序列上的一个区间\([l,r)\),满足\(r-l\)为奇质数,将在这个区间上的数都异 ...

  2. R class of subset of matrix and data.frame

    a = matrix(     c(2, 4, 3, 1, 5, 7), # the data elements     nrow=2,              # number of rows   ...

  3. P2153 [SDOI2009]晨跑

    思路 典型的最小费用最大流问题,拆点,每个点对应的入点和出点之间连一条cap=1的边表示只能经过一次的限制条件 然后其他边从u的出点连向v的入点即可 代码 #include <cstdio> ...

  4. Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Super-Resolution 论文笔记

    Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Super-Resolution 论文笔记 ECCV 2 ...

  5. C++变量的默认初始化规则

    定义没有初始化式的变量时,系统有时候会帮我们初始化变量.系统如何初始化取决于变量的类型以及变量定义的位置. 内置类型变量是否自动初始化取决于变量定义的位置.函数体外定义的变量初始成0:函数体内定义的变 ...

  6. 【译】第11节---数据注解-TimeStamp

    原文:http://www.entityframeworktutorial.net/code-first/TimeStamp-dataannotations-attribute-in-code-fir ...

  7. JS实现ul,li排序效果

    <!DOCTYPE html> <html> <head> <title>js列表排序</title> <meta charset=& ...

  8. spring boot 配置双数据源mysql、sqlServer

    背景:原来一直都是使用mysql数据库,在application.properties 中配置数据库信息 spring.datasource.url=jdbc:mysql://xxxx/test sp ...

  9. 内连接查询输出到datagridView

    实现步骤: 1. 新建两张对应表的类 例如: 第一张表对应的类 { class ManagerInfo { public Table1 group { get; set; } //重点 需要内连接的字 ...

  10. 创建SpringBoot项目pom.xml文件第一行报错:Non-parseable POM E:\maven\repository\org\springframework\securit

    在编辑pom.xml时,第一行有个刺眼红色×,然后在Problems看到这个问题 [ERROR] The build could not read 1 project -> [Help 1]E: ...