1.使用yum下载。
yum install bind* -y
2.安装完成进入文件修改
cd /
cd /etc/named.conf
3.添加开机自启动
systemctl enable named
4. 进入主配置文件【vim /etc/named.rfc1912.zones】,修改或添加以下内容
zone "bgy.com" IN {
type master;
file "bgy.com.zone";
allow-update { none; };
};
zone "7.168.192-in-addr.arpa" IN {
type master;
file "192.168.7.zone";
allow-update { none; };
};
5.创建正向或反向解析文件
cd /var/named/
cp -a named.localhost bgy.com.zone
cp -a named.localhost 192.168.7.zone
vim /var/named/bgy.com.zone
6.调整权限
chown :named /var/named/bgy.com.zone
chown :named /var/named/192.168.7.zone
7.IP与DNS
8.重启named服务
systemctl restart named
8.测试