红联Linux门户
Linux帮助

Redhat9上配置DNS

发布时间:2006-09-17 00:25:33来源:红联作者:flycocoon
前提:机器名为bak.5ilinux.com 域名为5ilinux.com

1。从安装盘安装

[code]rpm -ivh bind-9.2.2-21.i386.rpm[/code]

2。增加配置文件

[code]vi /etc/named.conf

## named.conf - configuration for bind # # Generated automatically by redhat-config-bind, alchemist et al. # Any changes not supported by redhat-config-bind should be put # in /etc/named.custom # controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; include "/etc/rndc.key";
options {
directory "/var/named/";
};

zone "." {
type hint;
file "named.ca";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};

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

zone "5ilinux.com" {
type master;
file "5ilinux.com.zone";
};[/code]

下载named.ca

wget ftp://ftp.rs.internic.net/domain/named.root
下载后改名为named.ca 存在/var/named目录下

[code]vi /var/named/localhost.zone

$TTL 86400 @ IN SOA @ root.localhost (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

IN NS localhost.

@ IN A 127.0.0.1

vi /var/named/0.0.127.in-addr.arpa.zone

$TTL 86400 @ IN SOA localhost. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

@ IN NS localhost.

1 IN PTR localhost.

1 IN PTR bak.

vi /var/named/5ilinux.com.zone

$TTL 86400 @ IN SOA bak.wapya.com. root.localhost (
3 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

IN NS bak.wapya.com.

www IN A 210.51.0.124
bak IN A 210.51.0.124
mail IN CNAME www
wap IN A 210.51.0.122
5ilinux.com IN MX 10 www[/code]

ok了,就是这些配置文件,至于原理我就不讲了。

只是为了方便以后查资料,所以把配置过程写下来

[code]/etc/rc.d/iinit.d/named restart[/code]

重启一下服务就可以用了
文章评论

共有 68 条评论

  1. CXWMX 于 2009-11-27 01:12:56发表:

    复习!!

  2. qq274575499 于 2009-11-25 22:38:15发表:

    谢谢

  3. shengtai 于 2009-11-16 20:20:25发表:

    好东西

  4. 自由疯子 于 2009-11-12 12:52:29发表:

    怎么没有反解析呢?

  5. love35459 于 2009-11-07 17:54:39发表:

    有?有?文介?的

  6. 195.238.169.* 于 2007-07-17 16:27:19发表:

    http://95292e7d31fb39cf1edbdccd89a3366c-t.xkktxb.org 95292e7d31fb39cf1edbdccd89a3366c http://95292e7d31fb39cf1edbdccd89a3366c-b1.xkktxb.org 95292e7d31fb39cf1edbdccd89a3366c http://95292e7d31fb39cf1edbdccd89a3366c-b3.xkktxb.org 8d1f2bfe3cbc5359328d95464cab8b7c