1、安装相关组件
yum -y install bind bind-chroot(bind-chroot为可选组件)
2、配置文件
①chroot环境:
vi /etc/named/chroot/etc/named.conf
options{
directory "/var/named/chroot/var/named/";
};
zone "user.test.com" IN {
type master;
file "user.test.com.zone";
allow-update { none; };
};
vi /var/named/chroot/var/named/user.test.com.zone
$ TTL 86400
@ IN SOA user.test.com root (
2017070301
1H
10M
7D
1D
)
@ IN NS user.test.com.
user.test.com. IN A 192.168.1.110
②非chroot环境
vi /etc/named.conf
options{
directory "/var/named";
};
zone "user.test.com" IN {
type master;
file "user.test.com.zone";
allow-update { none; };
};
vi /var/named/user.test.com.zone
$ TTL 86400
@ IN SOA user.test.com root (
2017070301
1H
10M
7D
1D
)
@ IN NS user.test.com.
user.test.com. IN A 192.168.1.110
3、启动服务:
systemctl start named
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。