# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
monthly #毎月に変更
# keep 4 weeks worth of backlogs
rotate 3 #ログを世代管理します。ここでは3か月間に設定
# create new (empty) log files after rotating old ones
create #新規ログファイルをローテーション後に作成。デフォルト有効
# use date as a suffix of the rotated file
dateext #ログファイルの末尾に日付(YYYYMMDD)がつく。デフォルト有効
# uncomment this if you want your log files compressed
compress #ログファイルの圧縮。デフォルトは有効でない為、ディスクの空き容量などを考慮し使用するか決めること
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp and btmp -- we'll rotate them here
/var/log/btmp
/var/log/lastlog
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}
#/var/log/XXXファイルは毎月1世代のログを保管し、所有者がrootでグループがutmpで、なおかつパーミッションが644のログファイルを作成
# system-specific logs may be also be configured here.
コメント