您的位置:首页 > Web前端

A few things you might not know about RHEL-6.1+ yum

2012-01-04 14:57 295 查看
http://illiterat.livejournal.com/8221.html

更友好的search命令

yum search kvm manager

yum search python url

新的updateinfo命令

yum updateinfo list security all

yum update-minimal --sec-severity=critical

新的versionlock命令

# Lock to the version of yum currently installed.

yum versionlock add yum

# Opposite, disallow versions of yum currently available:

yum versionlock exclude yum

yum versionlock list

yum versionlock delete yum\*

yum versionlock clear

# This will show how many "excluded" packages are in each repo.

yum repolist -x .

管理自己的.repo变量

可以自行把文件放在/etc/yum/vars目录下,然后在yum配置里把这些文件名做为变量,就像$basearch或者$releasever。

一个特殊的变量,名为$uuid,用于跟踪指定的机器。

yum自己的DB(还没明白是什么意思)

新的yum保存installed_by和changed_by属性。

yumdb

yumdb info yum

yumdb set installonly keep kernel-2.6.32-71.7.1.el6

yumdb sync

yum history命令有更多的信息

yum history

yum history pkgs yum

yum history summary

yum history undo last

yum history addon-info 1 config-main

yum history addon-info last saved_tx

yum install与kickstart完全兼容

install/upgrade/downgrade/remove都与kickstart兼容。

yum install 'config(postfix) >= 2.7.0'

yum install MTA

yum install '/usr/kerberos/sbin/*'

yum -- install @books -javanotes

更方便的更改yum配置

新增--setop参数可以修改yum配置。

yum --setopt=alwaysprompt=false upgrade yum

yum-config-manager

yum-config-manager --enable myrepo

yum-config-manager --add-repo https://example.com/myrepo.repo
更容易的管理多台服务器

# Find the current rpmdb version for this machine (available in RHEL-6.0)

yum version nogroups

# Completely re-image a machine, or dump it's "package image"

yum-debug-dump

yum-debug-restore

--install-latest

--ignore-arch

--filter-types=install,remove,update,downgrade

# This is the easiest way to get a transaction file without modifying the rpmdb

echo | yum update blah

ls ${TMPDIR:-/tmp}/yum_save_tx-* | sort | tail -1

# You can now load a transaction and/or see the previous transaction from the history

yum load-ts /tmp/yum_save_tx-2011-01-17-01-00ToIFXK.yumtx

yum -q history addon-info last saved_tx > my-yum-saved-tx.yumtx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: