這件事早該做了,無耐懶惰總是大於行動…噗
假設 apache log 檔設定在別的地方,大小設定 100M 好了…
# cp /etc/logrotate.d/httpd /etc/logrotate.d/httpd2
# vi /etc/logrotate.d/httpd2
加入下列:
size 100M
存檔。然後強制重啟:
# logrotate -f /etc/logrotate.conf
這樣應該就可以了。
假設 apache log 檔設定在別的地方,大小設定 100M 好了…
# cp /etc/logrotate.d/httpd /etc/logrotate.d/httpd2
# vi /etc/logrotate.d/httpd2
加入下列:
size 100M
存檔。然後強制重啟:
# logrotate -f /etc/logrotate.conf
這樣應該就可以了。
留言
張貼留言