[root@10-13-181-14 ~]# yum -y install dnsmasq
[root@10-13-181-14 ~]# systemctl enable dnsmasq
[root@10-13-181-14 ~]# rpm -ql dnsmasq
/etc/dbus-1/system.d/dnsmasq.conf
/etc/dnsmasq.conf
/etc/dnsmasq.d
/usr/lib/systemd/system/dnsmasq.service
/usr/sbin/dnsmasq
/usr/share/doc/dnsmasq-2.76
/usr/share/doc/dnsmasq-2.76/CHANGELOG
/usr/share/doc/dnsmasq-2.76/COPYING
/usr/share/doc/dnsmasq-2.76/COPYING-v3
/usr/share/doc/dnsmasq-2.76/DBus-interface
/usr/share/doc/dnsmasq-2.76/FAQ
/usr/share/doc/dnsmasq-2.76/doc.html
/usr/share/doc/dnsmasq-2.76/setup.html
/usr/share/man/man8/dnsmasq.8.gz
/var/lib/dnsmasq
设置 *openresty-dev.2haohr.com 解析为 10.13.30.224
[root@10-13-181-14 ~]# cat /etc/dnsmasq.d/openresty.conf
address=/openresty-dev.2haohr.com/10.13.30.224
address=/openresty-test.2haohr.com/10.13.66.19
语法检查
[root@10-13-181-14 ~]# dnsmasq -test
[root@10-13-181-14 ~]# systemctl restart dnsmasq
[root@10-13-181-14 ~]# systemctl status dnsmasq