IT pass HikiWiki - [ITPASS2011]システムログの保管期間を 3 ヶ月にする Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

{{toc}}

[((<ITPASSサーバ構築ドキュメント>))へ戻る]


= 概要

((<神戸大学学術情報基盤センター発行のサーバ機器管理ガイドライン|URL:http://www.istc.kobe-u.ac.jp/contents/service/otherService/security/>))に書かれてある「6.2 日常ログ管理」に従い, システムログが 3 ヶ月間保存されるように設定する.


= システムログの保管期間を 3 ヶ月にする

== rsyslog の設定

ログが 3 ヶ月間保存されるように, ローテーションを設定する.

/etc/logrotate.d/rsyslog を開き

  rotate 7
  daily

  = 中略 =

  rotate 4
  weekly

の部分を

  rotate 90
  daily

  = 中略 =

  rotate 12
  weekly

に変更する.


== apache2 の設定

ログが 3 ヶ月間保存されるように, ローテーションを設定する.

/etc/logrotate.d/apache2 を開き

rotate 12

の部分を

weekly
rotate 12

に書き換える.


== aptitude の設定

6 ヶ月間保存する設定になっているため, 変更は不要である.

念のため /etc/logrotate.d/aptitude を開き

  rotate 6
  monthly

となっていることを確認する.

== dpkg の設定

12 ヶ月 (1 年) 間保存する設定になっているため, 変更は不要である.

念のため /etc/logrotate.d/dpkg を開き,
dpkg.log, alternatives.log のどちらも

monthly
rotate 12

となっていることを確認する.

= 参考文献

((<[ITPASS2010]システムログの保管期間を 3 ヶ月にする>))



[((<ITPASSサーバ構築ドキュメント>)) へ戻る]