个人工具
登录
查看“Serverguide”的源代码 - Ubuntu中文
页面
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“Serverguide”的源代码
来自Ubuntu中文
←
Serverguide
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
===== 4.8.2. 配置 ===== DNS 配置文件被保存在 /etc/bind 目录中。主配置文件叫 /etc/bind/named.conf。缺省配置文件的内容如下所示: <pre><nowiki> // This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind/README.Debian for information on the // structure of BIND configuration files in Debian for BIND versions 8.2.1 // and later, *BEFORE* you customize this configuration file. // include "/etc/bind/named.conf.options"; // reduce log verbosity on issues outside our control logging { category lame-servers { null; }; category cname { null; }; }; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; // add local zone definitions here include "/etc/bind/named.conf.local";</nowiki></pre> include 行指定包含 DNS 选项的文件名。在选项文件中的directory 行告诉 DNS 在哪儿寻找文件。所有 BIND 用到的文件都与该目录相关。 名为 /etc/bind/db.root 的文件描述世界上的根名称服务器。这些服务器按时更新并不时被维护。 zone 部分定义一个主服务器,并将其保存在 file 标签所指定的文件中。每个 zone 文件包括 3 个资源记录 (RRs):一个 SOA RR、一个 NS RR 以及一个 PTR RR。SOA 是授权开始的缩写。"@" 符是一个特定的符号表示原点。NS 是名称服务器 RR。PTR 是域名指针。要开始 DNS 服务器,可以在终端提示符后运行以下命令: <pre><nowiki> sudo /etc/init.d/bind start</nowiki></pre> 详情您可以参考在参考部分所提及的文档。
返回至
Serverguide
。