查看完整版本: CentOS5 安裝 named

danny 2009-3-1 22:45

CentOS5 安裝 named

我示範的版本是 CentOS 5,當然也適用於 RHLE 5
安裝這些套件 bind,bind-chroot,bind-utils,system-config-bind
# yum -y install bind bind-chroot bind-utils system-config-bind
拷貝 named.conf 示範檔到 /var/named/chroot/etc/
# cp /usr/share/system-config-bind/profiles/default/named.conf /var/named/chroot/etc/
編輯一下 named.conf
# vi /var/named/chroot/etc/named.conf
[indent]options {
directory "/var/named"
dump-file "/var/named/data/cache_dump.db"
statistics-file "/var/named/data/named_stats.txt"
[color=#ff0000]forwarders { 168.95.1.1; 139.175.10.20; };
allow-query { any; };[/color]
};
zone "." IN {
type hint;
file "named.root"
};
zone "localdomain." IN {
type master;
file "localdomain.zone"
allow-update { none; };
};
zone "localhost." IN {
type master;
file "localhost.zone"
allow-update { none; };
};
zone "0.0.127.in-addr.arpa." IN {
type master;
file "named.local"
allow-update { none; };
};
[color=red]zone "yourdomain.tw" IN {
type master;
file "yourdomain.tw.zone"
allow-update { none; };
};[/color]
include "/etc/rndc.key"
[/indent]拷貝 localdomain.zone,localhost.zone,named.local,這些預設檔案到 /var/named/chroot/var/named/
# cd /usr/share/system-config-bind/profiles/default/named
# cp localdomain.zone localhost.zone named.local /var/named/chroot/var/named/
拷貝 named.root 這個重要檔案到 /var/named/chroot/var/named/
# cp /usr/share/doc/bind-9.3.3/sample/var/named/named.root /var/named/chroot/var/named/
再來就設定自已網域設定檔
# cd /var/named/chroot/var/named
# vi yourdomain.tw.zone
頁: [1]
查看完整版本: CentOS5 安裝 named