[root@ns1 ~]# cd /usr/ports/sysutils/logrotate
[root@ns1 logrotate]# make install clean
[root@ns1 logrotate]# cd
[root@ns1 ~]# cp /usr/local/etc/logrotate.conf.sample /usr/local/etc/logrotate.conf
[root@ns1 ~]# vi /usr/local/etc/logrotate.conf
errors root
↓
#errors root ←コメントアウト
compress
↓
#compress ←コメントアウト
↓下記をコメントアウト
#/var/log/lastlog {
# monthly
# rotate 1
#}
[root@ns1 ~]# mkdir /usr/local/etc/logrotate.d
[root@ns1 ~]# vi /etc/crontab
0 0 * * * root /usr/local/sbin/logrotate /usr/local/etc/logrotate.conf > /dev/null 2>&1
摘自:http://freebsd.server-manual.com/logrotate.html
沒有留言:
張貼留言