dns bind 安装和配置

1:安装bind
yum install -y bind bind-chroot bind-utils

bind默认使用UDP和TCP协议, 使用端口号为53(domain), 93(rndc)

2:bind配置文件
[img]http://dl2.iteye.com/upload/attachment/0108/6342/877c59e6-bef2-326e-b385-76a98bf7c262.png[/img]

分别拷贝模版到相应的目录
cp -rv /usr/share/doc/bind-9.9.4/sample/etc/* /var/named/chroot/etc/
cp -rv /usr/share/doc/bind-9.9.4/sample/var/* /var/named/chroot/var/
[img]http://dl2.iteye.com/upload/attachment/0108/6350/0d4e1cef-8b30-350c-8060-29e58eb1aa8d.png[/img]


3:域名主服务器配置

[img]http://dl2.iteye.com/upload/attachment/0108/6370/d515fce7-3bb0-3177-99a9-2cf34f103f32.png[/img]

步骤1:配置named.conf文件
在/var/named/chroot/etc/name.conf 配置域
[img]http://dl2.iteye.com/upload/attachment/0108/6380/29438c1a-6de5-3b3b-a249-a9d41e9150fe.png[/img]

步骤2:配置zone文件
www :主机名
IN : Internet
A : IP4类型
[img]http://dl2.iteye.com/upload/attachment/0108/6384/c7db61ff-e427-3d86-aad2-d14d5f4c2394.png[/img]

步骤3:重启bind服务
测试的时候关闭selinux
getenforce
setenfoce 0

[img]http://dl2.iteye.com/upload/attachment/0108/6390/7e69b0b2-00f9-341c-8849-486af76d793a.png[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值