解决ubuntu/linux打开网页慢、网速慢的问题
Ubuntu感觉网速慢,打开网页比较慢,主要是把时间浪费在域名解析上。我们可以用dnsmasq解决这问题。
安装dnsmasq
命令:
sudo apt-get 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 gedit /etc/resolv.conf
将其中的域名服务器全部去掉,加入以下这行
nameserver 127.0.0.1
如果用路由上网也可以加上路由的地址
保存,退出
执行以下命令
sudo gedit /etc/ppp/peers/wvdial
在 usepeerdns 前面增加 # ,也就是把这条语句覆盖掉。
以防,resolv.conf的设置被pppoe覆盖。
重启电脑。不重启,你会发现无法解析域名。所以一定要重启电脑,来达到重新启动dnsmasq的目的。
重启后, 你会发现解析速度比以前快了很多.
解决ubuntu/linux打开网页慢、网速慢的问题
- rosn
- 帖子: 1014
- 注册时间: 2006-01-14 18:33
解决ubuntu/linux打开网页慢、网速慢的问题
我是初学python的新手,希望得到大家的耐心指教,先感谢大家对我的付出!
-
- 帖子: 31
- 注册时间: 2012-02-26 11:54
Re: 解决ubuntu/linux打开网页慢、网速慢的问题
标记下,以后试试,现在网速还不错