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
$TTL86400
@INSOAuser.test.comroot (
2017070301
1H
10M
7D
1D
)
@INNSuser.test.com.
user.test.com.INA192.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
$TTL86400
@INSOAuser.test.comroot (
2017070301
1H
10M
7D
1D
)
@INNSuser.test.com.
user.test.com.INA192.168.1.110
3、启动服务:
systemctl start named |