手机版
你好,游客 登录 注册
背景:
阅读新闻

Yum命令解析

[日期:2012-06-04] 来源:Linux社区  作者:Linux [字体:大 中 小]

options

 -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            #手动系统更新

linux
相关资讯       Yum命令 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款