现在的位置: 首页 > 综合 > 正文

解决Ubuntu 8.10上网速度慢的问题

2018年05月27日 ⁄ 综合 ⁄ 共 650字 ⁄ 字号 评论关闭

dnsmasq一个DNS本地缓存工具,可以减少firefox的dns域名解析时间,从而提高上网速度

sudo apt-get install dnsmasq

在/etc/dnsmasq.conf 中找到
#listen-address
并改成
listen-address=127.0.0.1

接下来编辑文件 /etc/dhcp3/dhclient.conf

#prepend domain-name-servers 127.0.0.1

去掉前面的#变成

prepend domain-name-servers 127.0.0.1
接下来打开文件 /etc/resolv.conf
in your text editor. It probably looks like:
在你的文字编辑器里出现像下面的文字:

nameserver xxx.xxx.xxx.xx

将nameserver 127.0.0.1 加到最前面,改成下面的样子

nameserver 127.0.0.1
nameserver xxx.xxx.xxx.xx

现在你需要用下面的命令重新启动dnsmasq
sudo /etc/init.d/dnsmasq restart.
现在你就有了一个本地的dns缓存

测试一下你的本地缓存
If you want to measure your speed improvement, type the command
如果你想确认你有速度上的提升,输入如下命令:
dig yahoo.com
你会发现如下字样 “;; Query time: 38 msec”
然后再次输入,又会变成:”;; Query time: 2 msec”

抱歉!评论已关闭.