yum源部署
安装bind(yum源安装)
yum -y install bind bind-utils bind-chroot
修改/etc/named.conf 访问权限
#chroot模式修改chroot下的配置文件
vim /etc/named.conf
启动命令
#systemctl enable named-chroot && systemctl start namedchroot
systemctl enable named && systemctl start named
主配置文件
#主节点解析文件配置
zone "dlsc.com" IN{
type master;
file "dlsc.com.zone";
};
#从节点解析文件配置
zone "com" IN{
type slave;
file "sgcc.zone";
masters{主节点IP; };
};
区域数据库文件详解
$TTL 3H
dlsc.com. IN SOA dns.dlsc.com. rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS dns.dlsc.com.
dns A IP
; 基础仓库或源 (VPN)
; mirrors A IP
; registry A IP
; 基础仓库或源 (内网)
mirrors A IP
;rancher A IP
rancher A IP
registry CNAME mirrors
ntp CNAME mirrors
验证dns命令
nslookup 域名
dig 域名