您的位置:首页 > 运维架构 > Linux

centos yum

2016-06-06 10:54 351 查看
1.介绍

yum(全 称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载 RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。yum提供了查找、安装、删除某一个、一组甚至 全部软件包的命令,而且命令简洁而又好记。

2.说明

yum的命令形式一般是如下:yum [options] [command] [package ...]
其中的[options]是可选的,选项包括-h(帮助),-y(当安装过程提示选择全部为"yes"),-q(不显示安装的过程)等等。[command]为所要进行的操作,[package ...]是操作的对象。

yum -h 可以看到所有的 参数和命令

3.options 可选参数

-h, --help show this help message and exit
-t, --tolerant 容忍错误
-C, --cacheonly run entirely from system cache, don't update cache
-c [config file], --config=[config file]
配置文件路径
-R [minutes], --randomwait=[minutes]
命令最长等待时间
-d [debug level], --debuglevel=[debug level]
调试输出级别
--showduplicates 在 list/search 命令下,显示仓库里重复的条目。
-e [error level], --errorlevel=[error level]
错误输出级别
--rpmverbosity=[debug level name]
debugging output level for rpm
-q, --quiet 安静的操作
-v, --verbose verbose operation
-y, --assumeyes 回答所有的问题为是
--assumeno answer no for all questions
--version 显示 Yum 版本信息并退出
--installroot=[path] 设置目标根目录
--enablerepo=[repo] 启用一个或多个仓库(支持通配符)
--disablerepo=[repo] 禁用一个或多个仓库(支持通配符)
-x [package], --exclude=[package]
用全名或通配符排除软件包
--disableexcludes=[repo]
禁止从主配置,从仓库或者从任何位置排除
--obsoletes 升级时考虑软件包取代关系
--noplugins 禁用 Yum 插件
--nogpgcheck 禁用 gpg 签名检测
--disableplugin=[plugin]
禁用指定名称的插件
--enableplugin=[plugin]
enable plugins by name
--skip-broken 跳过有依赖问题的软件包
--color=COLOR 配置是否使用颜色
--releasever=RELEASEVER
set value of $releasever in yum config and repo files
--downloadonly don't update, just download
--downloaddir=DLDIR specifies an alternate directory to store packages
--setopt=SETOPTS set arbitrary config and repo options

4.command 指令

check Check for problems in the rpmdb
check-update 检查是否有软件包更新
clean 删除缓存的数据
deplist 列出软件包的依赖关系
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade downgrade a package
erase 从系统中移除一个或多个软件包
groupinfo 显示组的详细信息
groupinstall 向系统中安装一组软件包
grouplist 列出可安装的组
groupremove 从系统中移除一组软件包
help 显示用法信息
history Display, or use, the transaction history
info 显示关于软件包或组的详细信息
install 向系统中安装一个或多个软件包
list 列出一个或一组软件包
load-transaction load a saved transaction from filename
makecache 创建元数据缓存
provides 查找提供指定内容的软件包
reinstall 覆盖安装一个包
repolist 显示已配置的仓库
resolvedep 判断哪个包提供了指定的依赖
search 在软件包详细信息中搜索指定字符串
shell 运行交互式的 yum 外壳
update 更新系统中的一个或多个软件包
update-minimal Works like update, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo Acts on repository update information
upgrade 更新软件包同时考虑软件包取代关系
version Display a version for the machine and/or available repos.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: