欢迎光临
我们一直在努力

在Linux中配置DNS-网管专栏,域名服务

建站超值云服务器,限时71元/月

—-dns的功用是把计算机的名称转换为 ip地址。dns的使用简化了系统管理员及客户对主机文件的操作
和维护。
intranet服务器的系统配置
—-硬件配置:pentium 133 cpu,32mb内存,2.1g硬盘,16倍速ide光驱。
—-操作系统:red hat linux 5.1内核升级为2.2.3版。
—-软件包:apache web server 1.3.6;sendmail 8.9.3; wu-ftp 2.4.2;dns。
—-1.安装red hat linux 5.1
—-参考readme文件,用dos启动盘引导,并将光驱驱动,执行\dosutils\autoload,依照提示进行安装
。软件包选 www、sendmail、 ftp、 dns等,在启动栏选中inetd、httpd、named、sendmail、
snmp、syslog等。
—-2.网卡配置
config mode: manual
primary name + domain: linux.qxj.gov.cn
aliases:qxj_linux
ip address:192.168.0.100
netmask:255.255.255.0
net device:eth0
kernel module:3c509
i/o port:0x210
irq:11
—-缺省网关为:192.168.0.1。
dns的设置
—-1.有关参数
域名: qxj.gov.cn
www服务器: www.qxj.gov.cn
ftp服务器: ftp.qxj.gov.cn
mail服务器: mail.qxj.gov.cn
—-2.配置dns
—-①编辑/etc/named.boot,使之为:
directory /var/named
;cache named.ca
primary 0.0.127.in-addr.arpa named.local
primary qxj.gov.cn qxj.gov.cn
—-②检查/etc/host.conf内容为:
order host, bind
multi on
—-③检查文件/etc/resolv.conf为如下内容:
search qxj.gov.cn
nameserver 127.0.0.1
—-④编辑或建立/etc/named.conf,内容为:
options {
directory“/var/named”;
};
zone“0.0.127.in-addr.arpa” {
type master;
file“named.local”;
};
zone“qxj.gov.cn” {
type master;
file“qxj.gov.cn”;
};
—-⑤检查/var/named/named.local内容为:
@ in soa ns.qxj.gov.cn. hostmaster.qxj.gov.cn. (
1997022700; serial
28800; refresh
14400; retry
3600000; expire
86400); minimum
in ns ns.qxj.gov.cn.
1 in ptr localhost.
—-⑥编辑或建立文件/var/named/qxj.gov.cn:
@ in soa ns.qxj.gov.cn. hostmaster.qxj.gov.cn. (
199904261 ;serial
28800;refresh
7200;retry
3000000;expire
86400);minimum
in ns ns.qxj.gov.cn.
* in mx 10 mail
* in mx 20 qxj.gov.cn.
localhost a 127.0.0.1
ns a 192.168.0.100
qxj.gov.cn. a 192.168.0.100
mail a 192.168.0.100
news cname ns
ftp cname ns
www cname ns
pc1 a 192.168.0.5
pc2 a 192.168.0.6
winnt a 192.168.0.10
—-设置完成后,执行ndc restart重新启动dns。
—-3.检查dns
—-执行nslookup,结果应与以下内容相似,说明你已成功了。
$ nslookup
default server: localhost
address: 127.0.0.1
> set q=any
> qxj.gov.cn
server: localhost
address: 127.0.0.1
qxj.gov.cn
origin = ns. qxj.gov.cn
mail addr = hostmaster.qxj.gov.cn
serial = 199904261
refresh = 28800(8 hours)
retry = 7200(2 hours)
expire = 3000000(34 days 17 hours 20 mins)
minimum ttl = 86400(1 day)
qxj.gov.cn nameserver = ns.qxj.gov.cn
qxj.gov.cn internet address = 192.168.0.100
qxj.gov.cn nameserver = ns.qxj.gov.cn
ns.qxj.gov.cn internet address = 192.168.0.100
>exit
—-注:带下划线的为输入信息。
客户端的配置
—-操作系统:中文windows 95/98
—-控制面板->网络->配置->tcp/ip->ip地址:指定ip地址192.168.0.5掩码255.255.255.0。
—-控制面板->网络->配置->tcp/ip->dns配置->启用dns:主机pc1,域:qxj.gov.cn,
并添加dns搜索顺序192.168.0.100。
—-好了,这下您再不用频繁修改\windows\hosts文件了!

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 在Linux中配置DNS-网管专栏,域名服务
分享到: 更多 (0)