南京网站关键词,建设一个做资料库的网站,线上运营推广是做什么的,wordpress diy主题下面的配置就是实现解析test.zp.com到不同的IP地址 安装dns server软件包$ apt-get install bind9 配置dns配置文件的路径在/etc/bind路径下面添加一个zone$ /etc/bind# vim /etc/bind/named.conf.local 添加下面#xff0c;语法可以参照/etc/bind/zones.rfc1918中的语法添加语法可以参照/etc/bind/zones.rfc1918中的语法添加如下 zone zp.com { type master; file /etc/bind/db.zp.com; }; 修改db的配置文件$ /etc/bind# cp db.local db.zp.com$ /etc/bind# vim db.zp.com;; BIND data file for local loopback interface;$TTL 604800 IN SOA zp.com. root.localhost. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL; IN NS localhost. IN A 127.0.0.1 IN AAAA ::1test IN A 192.168.0.11test IN A 192.168.0.12test IN A 192.168.0.13test IN A 192.168.0.14test IN A 192.168.0.15test IN A 192.168.0.16 修改/etc/bind/named.conf.option 配置文件在 named.conf 中可以设置 bind 的 round-robin 的给出结果的顺序 rrset-order { order cyclic; }; rrset-order 支持三个参数fixed, random, cyclic 。fixed 会将多个A记录按配置文件的顺序固定给出random 会随机给出cyclic 会循环给出重启服务$ /etc/bind# /etc/init.d/bind9 restart检查配置效果修改域名解析配置文件$ /etc/bind# vim /etc/resolv.conf nameserver 192.168.0.***添加你的域名服务器的IP地址$ dig test.zp.com 更加简单的选择 dnsmasq转载于:https://www.cnblogs.com/zhangeamon/p/5121663.html