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 件のコメント:

コメントを投稿

sftp専用ユーザー

sftp専用ユーザーはsshでもログインできる必要があるので、ftp専用ユーザーのように、-s /sbin/nologin としない。 # useradd sftpuser # passwd sftpuser New password: Retype new passwo...