[Linux] => [Linuxコマンド(R〜Z)]
yumはパッケージのアップデートをするためのコマンドです。
[使用例]
#パッケージの更新があるかをチェック
yum check-update
#パッケージのアップデート
yum update
#パッケージリストの中からglibを含むものを表示
yum list|grep glib
#パッケージglibc-utilsをインストール
yum install glibc-utils.i386
#glib-configを含むパッケージを検索
yum provides glib-config
※Fedora Core 3の場合、パッケージのアップデート時に以下のようなメッセ-ジが出るかと思います。その場合には
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
としてキーを読み込めばよい。[参照: Thomas Chung's Column]
You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
For more information contact your distribution or package provider.
updateから除外したいパッケージなどがある場合はyumの設定ファイルで以下のようにexcludeを指定します。
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
exclude=iiimf*
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
