轻量级的DNS服务器——DNSmasq

  

简介:

#,yum  list  | grep  dnsmasq   dnsmasq.x86_64 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 2.48 - -17. el6 ,,,,,,,,,,,,,,,,, @base    dnsmasq-utils.x86_64 ,,,,,,,,,,,,,,,,,,,,,,, 2.48 - -17. el6 ,,,,,,,,,,,,,,,,,基地

# yum  -y  install  dnsmasq

#,cp /etc/dnsmasq.conf /etc/dnsmasq.conf。贝克

#,rpm  -ql  dnsmasq/etc/dbus-1/system.d/dnsmasq.conf/etc/dnsmasq.conf ,,,,,,,,,,, #主配置文件/etc/dnsmasq.d/etc/rc.d/init.d/dnsmasq/usr/sbin/dnsmasq/usr/share/doc/dnsmasq - 2.48/usr/share/doc/dnsmasq - 2.48/更新日志/usr/share/doc/dnsmasq - 2.48/复制/usr/share/doc/dnsmasq - 2.48/DBus-interface/usr/share/doc/dnsmasq - 2.48/常见问题解答/usr/share/doc/dnsmasq - 2.48/doc.html/usr/share/doc/dnsmasq - 2.48/setup.html/usr/share/man/man8/dnsmasq.8.gz/var/lib/dnsmasq

# echo “nameserver  127.0.0.1”,在/etc/说吧。参看

cp /etc/resolv.conf /etc/resolv.dnsmasq.conf   echo “nameserver  8.8.8.8”,在/etc/resolv.dnsmasq。参看

#,cat /etc/dnsmasq.conf , |, grep  -v “^ #”, |, grep  -v “^ $”   resolv-file=/etc/resolv.dnsmasq.conf   严厉要求=eth0接口   listen-address=192.168.30.131,127.0.0.1   bind-interfaces   addn-hosts=/etc/hosts ,,, #域名映射文件

(root@sh-puppet-node2 等等)#,cat /etc/resolv.conf   nameserver  127.0.0.1      (root@sh-puppet-node2 等等)#,cat /etc/resolv.dnsmasq.conf   nameserver  8.8.8.8 ,,,,,,, # 4个8谷歌的dns服务器,可能会比较慢   nameserver  114.114.114.114

#,cat /etc/主机   127.0.0.1 ,, localhost  localhost.localdomain  localhost4  localhost4.localdomain4   ::1,,,,,,,,,localhost  localhost.localdomain  localhost6  localhost6.localdomain6   时间,192.168.30.128  sh-puppet-master.com   时间,192.168.30.130  sh-puppet-node1.com   192.168.30.131 ,,, sh-puppet-node2.com

#,/etc/摆在/dnsmasq 重新启动   Shutting  down  dnsmasq:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (OK 才能,,)   Starting  dnsmasq:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (OK 才能;,)


#,dig  sh-puppet-node2.com

轻量级的DNS服务器——dnsmasq

[root@sh-puppet-node2  ~] #, cat /etc/resolv.conf   ,,generated  by /sbin/dhclient-script   search  shjygw  com   # nameserver  202.96.209.5   nameserver  127.0.0.1   (root@sh-puppet-node2  ~) #, cat /etc/resolv.dnsmasq.conf   nameserver  127.0.0.1

www.baidu.com


说明:图片毁坏就不展示了,有空补上。

轻量级的DNS服务器——DNSmasq