感觉在ubuntu下网速特别的慢,所以网上找了下解决方案,本地缓存域名解析相关信息。
首先,安装dns服务
命令: sudo install dnsmasq 编辑dnsmasq的配置文件 命令: sudo gedit /etc/dnsmasq.conf 找到下面这一项 #resolv-file= 用下面的一条语句替换 resolv-file=/etc/resolv.dnsmasq.conf 确保你没有更改过/etc/resolv.conf文件,如果改过,恢复原状 然后执行命令 sudo cp /etc/resolv.conf /etc/resolv.dnsmasq.conf 然后编辑resolv.conf 命令;sudo vi /etc/resolv.conf 将其中的域名服务器全部去掉,加入以下这行 nameserver 保存,退出 执行以下命令 sudo vi /etc/ppp/peers/provider 在 usepeerdns 前面增加 # ,也就是把这条注释 以防,resolv.conf的设置被pppoe覆盖。 设置网络DNS服务器:系统设置---网络连接管理----IPv4----dns服务器设置 然后重启dns服务:/etc/init.d/dnsmasq restart