yumに関するログ(ログファイル)を把握する


図解60p「Linuxサーバー構築入門マニュアル」無料
登録10秒/自動返信でDL/合わなければ解除3秒
HOMELinux技術 リナックスマスター.JP(Linuxマスター.JP)LinuxtipsLinuxtips, RPM > yumに関するログ(ログファイル)を把握する

yumの設定ファイルは、「/etc/yum.conf」になり、このファイルでyumのログファイル管理が行えます。
下記の例でいうと、ログファイルは、「logfile=」項目に設定される「/var/log/yum.log」になります。

[root@Tiger ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log ←yumログファイルの指定
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

yumが実行されると、その実行ログが/var/log/yum.logに出力されます。
下記の例ではnmapコマンドをインストールし、その後削除しています。

[root@Tiger ~]# ls -l /var/log/yum.log
-rw------- 1 root root 50 10月 24 13:45 2013 /var/log/yum.log
[root@Tiger ~]# tail /var/log/yum.log
Oct 24 13:45:42 Installed: 2:nmap-5.51-2.el6.i686
Oct 24 13:54:16 Erased: nmap




無料プレゼント
図解60p「Linuxサーバー構築入門マニュアル」
独学で詰まる前に、“型(手順書)”で最初の環境構築をサクッと終わらせましょう。
登録10秒/自動返信でDL/合わなければ解除3秒
無料で受け取る ※メールアドレスだけでもOK(必須項目は最小限)

<<関連記事>>
・64bit環境に32bitのRPMをyumでインストールするには
・yumでダウンロードしたrpmを残す
・RPMパッケージの更新情報を表示する
・RPMパッケージデータベースを新たに作成する
・RPMデータベースを再構築する

図解60pのLinux無料マニュアル
登録10秒/自動返信でDL
無料で受け取る