1,安装bind9
sudo apt-get update
apt-get install bind9
2,配置bind9 解析
cd /etc/bind
vim named.conf.zones
# 写入
zone "exp.top"{
type master;
file "/etc/bind/db.exp.top";
};
vim db.exp.top
# 写入
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA exp.top. root.exp.top. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS exp.top.
@ IN A 192.168.31.219
@ IN AAAA ::1
重启,启动bind9
systemctl restart bind9