標題:
設定 BIND9 獨立輸出 log 到 /var/log/named/named.log 不要輸出到 /var/log/messages
[打印本頁]
作者:
service.support
時間:
2010-8-10 14:25
標題:
設定 BIND9 獨立輸出 log 到 /var/log/named/named.log 不要輸出到 /var/log/messages
設定 /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
歡迎光臨 HGIGA Service Docs (http://docs.hgiga.com/Discuz4/)
Powered by Discuz! 4.1.0