QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 736|回复: 3

我的DNS在RH8.0上的成功配置

[复制链接]
发表于 2003-1-23 16:44:00 | 显示全部楼层 |阅读模式
作者:tonybeo
时间:2003.1.23
一.在成功安装redhat8.0后,在终端模式下的SETUP设置中查看NAMED是否正常,以确定你的DNS已启动.至于8.0中DNS的安装就不介绍了,很简单.只要用

rpm qa|grep bind

查看一下安装是否全

二.先介绍一下DNS的配置文件:

/etc/named.conf 要配置
/etc/resolv.conf 要配置
/etc/host.conf 要配置
/var/named/named.local 系统自带,不需要修改
/var/named/named.ca 系统自带,不需要修改
/var/named/163.com.hosts 要配置
/var/named/111.99.222.hosts 要配置

三.开如配置工作,以下是我个人的实例,已在网上测试成功
1
/etc/host.conf
-------------------------------------------------------------------
order hosts,bind
multi on
-------------------------------------------------------------------
2
/etc/named.conf
--------------------------------------------------------------------
// generated by named-bootconf.pl

options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};

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; };
};
zone "163.com" IN {
type master;
file "163.com.hosts";
allow-update { none;};
};
zone "111.99.222.in-addr.arpa" IN{
type master;
file "111.99.222.hosts";
allow-update { none;};
};

include "/etc/rndc.key";
------------------------------------------------------------------

3.
/etc/resolv.conf
------------------------------------------------------------------
nameserver 222.99.111.88
domain 163.com
------------------------------------------------------------------

4.
/var/named/163.com.hosts
-------------------------------------------------------------------
;
; zone file for 163.com
;
$TTL 86400
@ IN SOA ns.163.com. root.163.com. (
2003010800 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ) ; minimum
;
IN NS ns.163.com.
IN MX 10 mail.163.com.
;
localhost IN A 127.0.0.1
IN A 222.99.111.88
ns IN A 222.99.111.88
mail IN A 222.99.111.88
ftp IN A 222.99..111.99
proftp IN A 222.99.111.88
linux IN A 222.99.111.66
;
www CNAME ns
www2 CNAME proftp
;
;EOF
-------------------------------------------------------------------------

5.
111.99.222.hosts
------------------------------------------------------------------------
;Begin
$TTL 86400
@ IN SOA ns.163.com. root.163.com.(
20030106 ;serial
28800 ;refresh
7200 ;retry
604800 ;expire
86400) ;minimum TTL
IN NS ns.163.com.
;
;
; server
;
88 PTR 163.com.
88 PTR ns.163.com.
88 PTR mail.163.com.
99 PTR ftp.163.com.
88 PTR proftp.163.com.
66 PTR linux.163.com.
;EOF
-------------------------------------------------------------------------------------------
四.重新启动NAMED
/etc/rc.d/init.d/service named restart
or
/etc/rc.d/init.d/service xinetd restart

五.用nslookup查看DNS运行状态.啊!我成功了!
在MOZILLA里看了看不错!
相信你也会成功!
发表于 2003-2-13 17:23:08 | 显示全部楼层
你说一下各段的意思?
回复

使用道具 举报

发表于 2003-2-16 12:34:35 | 显示全部楼层
我有个问题请教:我配DNS后,在一台win2000的电脑上无法ping DNSname,只能ping ip地址,但是win2000却能显示我在linux dns中设的机器域名!!不知是何缘故?希望能指点!!谢谢!!!
回复

使用道具 举报

 楼主| 发表于 2003-2-21 10:03:44 | 显示全部楼层
老兄这只是个例子,具体的说明你还是拿本书看吧!这怎么写说明?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-17 09:55 , Processed in 0.039792 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表