2013-07-01

maillogの世代管理

maillogの世代管理を、デフォルトの4週間から1年(54週)に延ばす。

# cd /etc/logrotate.d/
# cp syslog mail
# vi mail

/var/log/maillog {
    rotate 54
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}


# vi syslog

/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

0 件のコメント:

コメントを投稿

Windows 11 インストール / アップグレード 手順

 Microsoftから、Windows 11 の ISO をダウンロード ダウンロードしたISOを右クリックしてマウント コマンドプロンプトを起動してマウントしたドライブ(D:とか)に移動し、setup /product server を実行 あとは指示に従うだけ これだけ。 ...