CentOSのパッケージの管理(yum)
yumはLinuxのRPM互換パッケージ管理システム。
/etc/yum.confや/etc/yum以下のディレクトリが設定ファイル。
yumコマンドは基本的に下記のように使用する。
yum [<オプション>] <コマンド> [<サブオプション>] [<パッケージ>]
コマンド | 概要 |
---|---|
list | 利用可能なパッケージの一覧を表示 |
list installed | インストール済みのパッケージ一覧を表示 |
list パッケージ名 | パッケージのバージョンを確認する |
search キーワード | パッケージ情報などからキーワードを検索 |
whatprovides キーワード | パッケージに含まれるファイル名からパッケージを検索する |
info | 利用可能なパッケージの情報を表示 |
info パッケージ名 | 指定したパッケージの情報を表示 |
install パッケージ名 | 指定したパッケージをインストール |
grouplist | パッケージグループの一覧を表示 |
groupinfo 'パッケージグループ名' | パッケージグループの情報を表示 |
groupinstall 'パッケージグループ名' | パッケージグループをインストールする |
clean | ダウンロードしたパッケージと古いヘッダを削除する |
remove パッケージ名 | 指定したパッケージをアンインストールする |
check-update | アップデート可能なパッケージの一覧を表示 |
update | アップデート可能な全パッケージをアップデート |
update パッケージ名 | 指定したパッケージをアップデート |
$yum grouplist Installed Groups: Dialup Networking Support Editors Mail Server Network Servers System Tools Text-based Internet Yum Utilities Available Groups: Administration Tools Authoring and Publishing Base Beagle Cluster Storage Clustering DNS Name Server Development Libraries Development Tools Emacs Engineering and Scientific FTP Server FreeNX and NX GNOME Desktop Environment GNOME Software Development Games and Entertainment Graphical Internet Graphics Horde Java Java Development KDE (K Desktop Environment) KDE Software Development KVM Legacy Network Server Legacy Software Development Legacy Software Support Mono MySQL Database News Server Office/Productivity OpenFabrics Enterprise Distribution PostgreSQL Database Printing Support Ruby Server Configuration Tools Sound and Video Tomboy Virtualization Web Server Windows File Server X Software Development X Window System XFCE-4.4 Done