转自:http://blog.csdn.net/huangbiao86/article/details/6646471

Yum配置文件位于/etc/yum.conf和/etc/yum.repos.d/CentOS-Base.repo目录下

使用yum时注意:必须使用root身份来执行yum;yum配置文件内的镜像站点必须能与自己进行网络连接;镜像站点越近,带宽越大越好,方便下载。

[root@localhost ~]# yum [options] COMMAND 软件

List of Commands:

install:Install a package or packages on your system

update:Update a package or packages on your system

remove:移出某个软件,后跟软件名称

search:Search package details for the given string 搜索某个软件或重要关键字

list:List a package or groups of packages列出yum所管理的软件名称与版本,类似于rpm –qa

info:Display details about a package or group of packages,类似于rpm –qai

clean:Remove cached data 下载文件被放置在/var/cache/yum中,可以使用clean清除。

check-update:Check for available package updates

Groupinfo:Display details about a package group

groupinstall   Install the packages in a group on your system

grouplist:List available package groups

groupremove:Remove the packages in a group from your system

groupupdate:升级整个软件群组

help:Display a helpful usage message

Deplist:List a package's dependencies    列出软件包的依赖关系,在使用本地源软件包进行安装时,可以查看依赖关系

Downgrade:downgrade a package

Erase:Remove a package or packages from your system

localinstall:Install a local RPM安装本地的rpm软件包

makecache:Generate the metadata cache 生成数据缓存

provides:Find what package provides the given value 找到包提供的给定值

reinstall:reinstall a package 重装软件包

repolist:Display the configured software repositories

resolvedep:Determine which package provides the given dependency

shell:Run an interactive yum shell

upgrade:Update packages taking obsoletes into account

 -y:answer yes for all questions当yum询问用户意见时,主动回答yes不需由键盘输入

-installroot=[path]:set install root安装在其他的路径,而不再当前目录树的架构中

-h --help:show this help message and exit
 -t --tolerant:be tolerant of errors
 -C:run entirely from cache, don't update cache
 -c:[config file]config file location

-R  [minutes]         maximum command wait time
 -d  [debug level]     debugging output level
-showduplicates      show duplicates, in repos, in list/search commands
 -e  [error level]     error output level
 -q, --quiet           quiet operation
 -v, --verbose         verbose operation
-version             show Yum version and exit
-enablerepo=[repo] enable one or more repositories (wildcards allowed)

-disablerepo=[repo] disable one or more repositories (wildcards allowed)

-x[package], --exclude=[package]exclude package(s) by name or glob

-disableexcludes=[repo]disable exclude from main, for a repo or for everything

-obsoletes:enable obsoletes processing during updates

-noplugins:disable Yum plugins

-nogpgcheck:disable gpg signature checking

-disableplugin=[plugin] disable plugins by name

-enableplugin=[plugin] enable plugins by name

-skip-broken:skip packages with depsolving problems

-color=COLOR: control whether color is used

[root@localhost ~]# yum search gcc 查找主机上是否有gcc的相关软件,如果有,就会陈列出来。

[root@localhost ~]# yum info gcc 列出已安装的yum所管理的软件名称与版本

……………………………………………………………………

Name:gcc
Arch:i386
Version: 4.1.2
Release: 48.el5
Size:9.6 M
Repo:installed
Summary:各类编译器(C、C++、Objective-C、Java, ...)
URL:http://gcc.gnu.org
License:GPL

Description:The gcc package contains the GNU Compiler Collection version 4.1.You'll need this package in order to compile c code

……………………………………………………………………

显示该软件版本名称,数据大小,软件出处等信息。需要注意summary和description的信息

可以依据yum search 软件名查找此软件的信息,yum list软件名 列出此软件的版本和名称,决定是否安装此软件。

安装之前使用rpm –q 软件名,查看此软件是否安装,如没有安装,使用yum install 软件名 进行安装

使用yum可以主动处理好依赖关系,下载好的软件一般都放置在/var/cache/yum中,可以清除以节省磁盘空间。

[root@localhost ~]# yum clean packages        #清除下载的软件包

[root@localhost ~]# yum -y update            #手动系统更新

Yum常用命令及Yum中文手册的更多相关文章

  1. CentOS下yum常用命令

    1.自动搜索最快镜像插件:yum install yum-fastestmirror 2.更换163的源. 首先:备份/etc/yum.repos.d/CentOS-Base.repomv /etc/ ...

  2. yum常用命令大全

    yum命令是在Fedora和RedHat以及SUSE中基于rpm的软件包管理器,它可以使系统管理人员交互和自动化地更细与管理RPM软件包,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性 ...

  3. linux YUM常用 命令

    语法 yum(选项)(参数) 选项 -h:显示帮助信息: -y:对所有的提问都回答“yes”: -c:指定配置文件: -q:安静模式: -v:详细模式: -d:设置调试等级(0-10): -e:设置错 ...

  4. sudo apt-get 与 yum 常用命令

    yum -RedHat:CentOS... -xxx.rpmsudo apt-get  -Debian:Ubuntu...   -xxx.deb 安装工具rpm -ivh yum-2.0.4-1.rh ...

  5. yum常用命令

    Yum list kmod-coretemp[查找kmod-coretemp模块状态] Yum clean all[清空yum缓存] Yum remove kmod-coretemp [卸载kmod- ...

  6. YUM常用命令介绍

    http://www.cnblogs.com/lostyue/archive/2012/05/06/2485653.html 1.列出所有可更新的软件清单 命令:yum check-update 2. ...

  7. Linux常用命令之Yum

    Linux Yum命令详解Yum全称Yellow dog Updater,Modified,是一个在Fedora和RedHat以及SUSE中提供的基于RPM包的软件包管理工具,能够从指定的服务器自动下 ...

  8. linux常用命令:yum 命令

    用于添加/删除/更新RPM包,自动解决包的依赖问题以及系统更新升级. 1.命令格式:    yum  [参数] [软件名]2.命令功能:    功能:  yum提供了查找.安装.删除某一个.一组甚至全 ...

  9. yum 常用命令

    yum是一个用于管理rpm包的后台程序,用python写成,可以非常方便的解决rpm的依赖关系.在建立好yum服务器后,yum客户端可以通过 http.ftp方式获得软件包,并使用方便的命令直接管理. ...

随机推荐

  1. drawer principle in Combinatorics

    Problem 1: Given an array of real number with length (n2 + 1) A: a1,  a2, ... , an2+1. Prove that th ...

  2. Uva 12563,劲歌金曲,01背包

    题目链接:https://uva.onlinejudge.org/external/125/12563.pdf 题意:n首歌,每首歌的长度给出,还剩 t 秒钟,由于KTV不会在一首歌没有唱完的情况下切 ...

  3. UVa(11292),贪心水题

    蓝书P1, 很简单的一个贪心选择,用能力小的去砍小的.本来想双重循环,哎,傻逼了,直接遍历选手,碰到能砍的就砍掉. #include <stdio.h> #include <algo ...

  4. hdu 2089 不要62 数位dp

    不要62 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

  5. 华东交通大学2016年ACM“双基”程序设计竞赛 1002

    Problem Description 今天小学弟又训练完了,但是小学弟又不想看球赛,于是小学弟看马赛了.他发现马鞍是一个奇怪的东西.于是小学弟根据马鞍定义了一种马鞍数:在一个二位矩阵中,马鞍数在当前 ...

  6. 2016年10月17日 星期一 --出埃及记 Exodus 19:1

    2016年10月17日 星期一 --出埃及记 Exodus 19:1 In the third month after the Israelites left Egypt--on the very d ...

  7. 使用 JavaScript

    我们要用 JavaScript,但是把它写在哪里呢?   这里 ↘   1. HTML 页面中 .   2. 单独的一个文件中,文件后缀名是“.js”.     ——————————————————— ...

  8. 华为S5700S配置总结

    需要使用通讯控制线缆连接电脑和交换机, 一头接交换机的Console口,一头接电脑(应该需要串口,没有的话得用USB转串口). 在PC机上运行终端仿真程序,设置终端通信参数为: 波特率为9600bit ...

  9. CentOS7安装Docker,运行Nginx镜像、Centos镜像

    摘要 总体思路:yum命令直接安装Docker,下载想要的镜像并启动 1.环境,CentOS7 Minimal 64位,Docker必须要64位的系统 2.通过yum命令直接安装,yum instal ...

  10. join(添加字符)与id显示

    #!/usr/bin/env python li = ["alex",'sb'] l1 = "_".join(li) print(l1) print(id(li ...