LoginSignup
43
54

More than 5 years have passed since last update.

yumまとめ

Last updated at Posted at 2015-03-07

忘れてしまいやすいのでまとめた

インストール

yum install [パッケージ名やglob]

-y オプションで確認なしでインストール

更新

yum update [パッケージ名]

パッケージ名を指定しないと全てのパッケージを更新する

検索

yum search [文字列]

文字列を含むパッケージを表示

一覧表示

yum list [ all | installed | available ]
  • all - 全てのパッケージを表示
  • installed - インストール済みのパッケージを表示
  • available - リポジトリにある利用可能なパッケージを表示

詳細情報の表示

yum info [パッケージ名]

削除

yum remove [パッケージ名やglob]

yumコマンド実行履歴の表示

yum history list [all]
  • allなし - 過去20件を表示
  • all有り - 過去全ての履歴を表示

yumコマンド実行履歴の詳細情報を表示

yum history info [yum history list コマンドで表示されるID]

yumコマンド実行履歴を元に戻す

yum history undo [yum history list コマンドで表示されるID]

yumコマンド実行履歴を再度実行する

yum history redo [yum history list コマンドで表示されるID]

yumリポジトリの一覧表示

yum repolist [all]

yumの設定ファイル

  • 全体の設定 - /etc/yum.confに記載する
  • リポジトリ固有の設定 - /etc/yum.repos.d/*.repoに記載する。*にはリポジトリ名が入る。既存のyumのリポジトリではインストールできるバージョンが低い場合など利用する。

現在の設定の表示

yum-config-manager

リポジトリを追加

yum-config-manager --add-repo [リポジトリのURL]

リポジトリを有効化

yum-config-manager --enable-repo [リポジトリ名]

リポジトリを無効化

yum-config-manager --disable-repo [リポジトリ名]
43
54
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
43
54