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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值