使用dnsmasq来提升CentOS上网速度

1. 安装dnsmasq 
dnsmasq的官方网址是:http://www.thekelleys.org.uk/dnsmasq/doc.html。利用里面的下载链接下载dnsmasq-2.72.tar.xz安装即可。 

2. 配置dnsmasq 
CentOS打开System—>Administration—>Network
到DNS标签下添加一个新的DNS服务器:127.0.0.1,并且放在第一的位置上。原来的保留不变,只是挪一下位置,降一下顺序。 
The other way to do this is to edit /etc/resolv.conf file.Add an new line at the top of the /etc/resolv.conf file and the line looks like this nameserver:127.0.0.1 which means add a new dns server. 

3、启动、停止dnsmasq 
/etc/init.d/dnsmasp start 
/etc/init.d/dnsmasp stop 
/etc/init.d/dnsmasp restart 


利用/etc/init.d/dnsmasp start来启动或者配置修改后用/etc/init.d/dnsmasp restart来重新启动使dnsmasq生效。  

4、测试DNS缓存 

使用dig www.google.com来看看启动前后的时间对比

 

参考:

1. centos 网速慢的解决办法 http://blog.chinaunix.net/uid-25864516-id-3015998.html

 

附件:

下载

转载于:https://www.cnblogs.com/liqipeng/p/4584810.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值