荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: georgehill (NCNS), 信区: Linux
标  题: DNS HOWTO 中译版-7(转寄)
发信站: BBS 荔园晨风站 (Tue Feb 20 12:44:13 2001), 站内信件

【 以下文字转载自 georgehill 的信箱 】
【 原文由 georgehill.bbs@smth.org 所发表 】
发信人: czlong (紫龙), 信区: Linux
标  题: DNS HOWTO 中译版-7(转寄)
发信站: BBS 水木清华站 (Sun Feb  4 15:48:19 2001)


7. Bind version 8
Bind version 8 是最新的 bind 技术.我还没有尝试使用,但 David E. Smith <
 dave@bureau42.ml.org> 有.他写了这小节的其馀部份.

没有太多的不同.除了使用 named.conf 而不是 named.boot, 其馀都相同.而且
 bind 8 包含了一个 perl 指令稿来将旧格式的档案转换成新的.例如一份暂存专
用名称伺服器的 named.boot (旧格式):



------------------------------------------------------------------------
--------

directory /var/named
cache   .                                       root.hint
primary 0.0.127.IN-ADDR.ARPA                    127.0.0.zone
primary localhost                               localhost.zone


------------------------------------------------------------------------
--------

在指令列下,於 bind8/src/bin/named 目录中键入:



------------------------------------------------------------------------
--------

named-bootconf.pl < named.boot > named.conf


------------------------------------------------------------------------
--------

这会产生 named.conf:



------------------------------------------------------------------------
--------

// generated by named-bootconf.pl

options {
        directory "/var/named";
};

zone "." {
        type hint;
        file "root.hint";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "127.0.0.zone";
};

zone "localhost" {
        type master;
        file "localhost.zone";
};



------------------------------------------------------------------------
--------


它将 named.boot 中的每样东西都转换过来,然而它并未加入所有 bind 8 所允许
的新强化及配置选项.这里有份较完整的 named.conf 做同样的事,但是效率更好
一点.



------------------------------------------------------------------------
--------

// This is a configuration file for named (from BIND 8.1 or later).
// It would normally be installed as /etc/named.conf.
// The only change made from the `stock' named.conf (aside from this
// comment :) is that the directory line was uncommented, since I
// already had the zone files in /var/named.

options {
        directory "/var/named";
        check-names master warn;                /* default. */
        datasize 20M;
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        check-names fail;
        allow-update { none; };
        allow-transfer { any; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "127.0.0.zone";
        check-names fail;
        allow-update { none; };
        allow-transfer { any; };
};

zone "." IN {
        type hint;
        file "root.hint";
};


------------------------------------------------------------------------
--------


bind8/src/bin/named/test 里有这个□例,以及领域档案的拷贝,许多人可以直
接拿来修改使用.

领域档案及 root.hint (root.cache) 完全相同,更新它们的指令也是.


--

※ 来源:·BBS 水木清华站 smth.org·[FROM: 210.34.33.55]
--
※ 转载:·BBS 荔园晨风站 bbs.szu.edu.cn·[FROM: 192.168.1.113]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店