設定 /var/log/named/named.log 每 5M 就會 rotate 並且只保留三份。
1. 建立 /var/log/named 目錄
mkdir /var/log/named
touch /var/log/named/named.log
cd /var/log
chown -R named:named named/
2. 設定 /etc/named.conf 加上 logging 功能
vi /etc/named.conf
logging {
channel Named_log {
file "/var/log/named/named.log" versions 3 size 5m;
severity info;
print-severity yes;
print-time yes; };
category default {Named_log; };
category xfer-out {Named_log; };
category queries {Named_log; };
};
3. 重啟 named 服務
/etc/rc.d/init.d/named restart
沒有留言:
張貼留言