本文共 1041 字,大约阅读时间需要 3 分钟。
yum -y install bind bind-utils bind-chroot
systemctl start named
systemctl start named-chroot
systemctl start named-chroot-setup
chroot服务将DNS服务器禁锢在/var/named/chroot/中,也就是DNS服务器将>/var/named/chroot/当成自己的家目录
存放主配置文件的目录:/var/named/chroot/etc/
存放从配置文件的目录:/var/named/chroot/var/named#cd /var/named/chroot/etc/
#cat /dev/null>named.conf //删除之前的配置文件#vim named.conf //编辑主配置文件opoptions{ directory "/var/named"; };zone "youngfit.cn." IN{ type master;file "youngfit.cn.zone";};#chown named.named named.conf#cd /var/named/chroot/var/named#touch youngfit.cn.zone //编辑从配置文件$TTL 86400@ IN SOA clear-vm.youngfit.cn. root.youngfit.cn ( 100000000 1M 15M 1W 1D) IN NS clear-vm.youngfit.cn.clear-vm IN A 10.18.44.70www.youngfit.cn. IN A 10.18.44.210tiger.youngfit.cn. IN A 10.18.44.209#systemctl restart named
#yum -y install bind-utils
#vim /etc/resolv.confnameserver 10.18.44.70#host -t a tiger.youngfit.cn
转载于:https://blog.51cto.com/13523939/2053074