yumコマンド
yumのコマンド一覧になります。 これは全てのyumコマンドの完全な一覧ではありませんが、基本的な/一般的/重要なコマンドの一覧です。 完全なリストを参照したければ、yumのmanページを参照してください。
- yum list
- yum install/remove/update
- yum check-update
- yum group***
- yum info
- yum search
- yum provides / yum whatprovides
- yum shell
- yum makecache
- yum clean
yum list
yum list [available | installed | extras | updates | obsoletes | all | recent] [pkgspec]
このコマンドは、あなたのシステム上で有効なリポジトリ、またはインストールされているパッケージの一覧を表示してくれます。 また、パッケージの一覧を表示するだけでなく、パッケージの名前、arch(?)、バージョン、リリース、epoch(?)を特定して、 絞り込んでの一覧表示も行ってくれます。
yum install/remove/update
…
yum check-update
yum list updatesのように動作しますが、更新可能なものがあれば100の終了コードを返します。
これはシェルスクリプトを組む際に便利です。
yum group***
yum grouplist
yum groupinfo
yum groupinstall
yum groupupdate
yum groupremove
これらのコマンドについての情報は、yum groupsのページを参照してください。
yum info
インストールされた、または利用可能なパッケージの詳細情報を表示します。
yum listと同じ引数を取ることが出来ますが、パッケージ名を特定するかglobすることをお勧めします。
$ yum info yum
Installed Packages
Name : yum
Arch : noarch
Version : 3.2.20
Release : 3.fc10
Size : 2.5 M
Repo : installed
Summary : RPM installer/updater
URL : http://yum.baseurl.org/
License : GPLv2+
Description: Yum is a utility that can check for and automatically download and
: install updated RPM packages. Dependencies are obtained and downloaded
: automatically prompting the user as necessary.
yum search
yum search
利用可能なパッケージについての様々なメタデータから、情報を検索してくれます。
これは複数の引数を受け取ることが可能です。
一致条件が最も多いを最初に、次にマッチ数がより多いパッケージが出力されます。
とりわけyum searchは、名前、概要、説明、URLのフィールドを見ます。
もし、何のパッケージが特定のコマンドを提供しているかを探す場合は、代わりにyum providesを試してみてください。
$ yum search python rsync ssh
========================= Matched: python, rsync, ssh ==========================
rdiff-backup.i386 : Convenient and transparent local/remote incremental
: mirror/backup
============================ Matched: python, rsync ============================
cobbler.noarch : Boot server configurator
============================= Matched: python, ssh =============================
denyhosts.noarch : A script to help thwart ssh server attacks
pexpect.noarch : Pure Python Expect-like module
python-paramiko.noarch : A SSH2 protocol library for python
python-twisted-conch.i386 : Twisted SSHv2 implementation
============================= Matched: rsync, ssh ==============================
duplicity.i386 : Encrypted bandwidth-efficient backup using rsync algorithm
pssh.noarch : Parallel SSH tools
yum provides / yum whatprovides
このコマンドは、要求されたファイルの依存関係をどのパッケージが提供しているのかを探します。 また、ファイルにワイルドカードを指定することが出来ます。
$ yum provides MTA
2:postfix-2.5.5-1.fc10.i386 : Postfix Mail Transport Agent
Matched from:
Other : MTA
exim-4.69-7.fc10.i386 : The exim mail transfer agent
Matched from:
Other : MTA
sendmail-8.14.3-1.fc10.i386 : A widely used Mail Transport Agent (MTA)
Matched from:
Other : Provides-match: MTA
$ yum provides *bin/ls
coreutils-6.12-17.fc10.i386 : The GNU core utilities: a set of tools commonly
: used in shell scripts
Matched from:
Filename : /bin/ls
yum shell
…
yum makecache
現在有効なyumリポジトリの全てのメタデータをダウンロードして、使用可能にするために使用されます。 キャッシュを続行する前に、すべてのメタデータのキャッシュを完全に最新にしたい場合に便利です。
yum clean
yumは普通に使用されていれば、メタデータとパッケージのキャッシュを作成します。
このキャッシュは沢山の容量を占有します。
yum cleanコマンドは、これらのファイルをクリーンアップしてくれます。
yum cleanの対象となる全てのファイルは、通常/var/cache/yumに格納されています。
下記でコマンドのサンプルと、それらが何をしているかを説明します。
© 2010 - 2017 STUDIO KINGDOM