文档介绍:RHEL5DNS服务器配置已有1351次阅读2010-4-2213:25首先,应该检查自己是否已经安装了bind。[******@killgoogle~]#rpm-qabind*bind-chroot-----libbind-devel---utils---sdb---devel---libs---nameserver[******@killgoogle~]#rpm-qacaching-nameservercaching-nameserver--:以下方法安装[******@killgoogle~]#yuminstallbind*[******@killgoogle~]#yuminstallcaching-nameserver安装过后BIND服务就已经完成三分之一了,剩下的三分之二就是配置BIND服务。好,开始!我是想配置一个DNS可以解析我的域名:.。假设我的IP是:[******@killgoogle~]#cd/var/named/chroot/etc/[******@killgoogleetc]#lslocaltime                             -                 这里我们可以看到在/var/named/chroot/etc/下的几个主要的配置文件。但是我们还是不要动这些文件的好,可以先复制它们并对它们进行修改。在进行复制的时候应该加上参数-P,这样在复制的时候把文件的属性不会改变。[******@killgoogleetc]#cp--。(对原文件进行了改变的地方着红色)[******@killgoogleetc]#{   listen-onport53{any;};   listen-on-v6port53{::1;};   directory   "/var/named";   dump-file   "/var/named/data/";       statistics-file"/var/named/data/";       memstatistics-file"/var/named/data/";   query-source   port53;      query-source-v6port53;   allow-query    {any;};};logging{       channeldefault_debug{               file"data/";               severitydynamic;       };};viewlocalhost_resolver{   match-clients     {any;};   match-destinations{any;};   recursionyes;   include"/etc/";};[******@killgoogleetc]#。下面是我的文件内容zone"."IN{   typehint;   file"";};zone"localdomain"IN{   typemaster;   file"";   allow-update{none;};};zone"localhost"IN{   typemaster;   file"";   allow-update{none;};};zone"-"IN{   typemaster;   file"";   allow-update{none;};};zone""