DNS缓存
# emerge dnsmasq
|
# nano /etc/resolv.conf
|
nameserver
127.0
.
0.1
|
# nano /etc/resolv.dnsmasq.conf
|
# Generated by net-scripts
for
interface
lo
|
nameserver
8.8
.
8.8
|
nameserver
8.8
.
4.4
|
# nano /etc/dnsmasq.conf
|
resolv-file=/etc/resolv.dnsmasq.conf
|
# rc-update add dnsmasq
default
|
本地DNS设置
# nano /etc/dnsmasq.conf
|
addn-hosts=/etc/dnsmasq.hosts
|
# nano /etc/dnsmasq.hosts
|
192.168
.
0.171
name0.hadoop.com
|
#/etc/init.d/dnsmasq restart
|
# ping name0.hadoop.com
|
成功
本文介绍如何通过DNSmasq配置本地DNS服务器,包括修改resolv.conf文件来指定nameserver,以及设置dnsmasq.conf文件来使用特定的DNS解析器。
927

被折叠的 条评论
为什么被折叠?



