免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 931 | 回复: 0
打印 上一主题 下一主题

让linux 解析域名加速!!! [复制链接]

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-01 10:06 |只看该作者 |倒序浏览

兄弟们是否用LINUX 的时候觉得firefox 打开网站的时候显示正在解析主机。ie是正在连接主机。。有什么让我们第一次连接这个让点以后。第二次花更少点时间来解析这个域名呢。可能有些说历史记录可以。但我认为历史记录不过是记录网页的内容。域名的应该不会被缓存下来。。我以cent os 平台为例。这里介绍一个软件包叫 dnsmasq 可能通用yum 安装
1: yum -y install dnsmasq
2: hash
3: 修改/etc/dnsmasq.conf
把listen_address= 前面的#号去掉,然后再=后面加上本机环回地址127.0.0.1
或者在配置文件底部增加一行
listen-address=127.0.0.1
修改/etc/resolv.conf 文件
把第一DNS SERVER 改成 nameserver 127.0.0.1
4: 然后启动dnsmasq 服务
/etc/rc.d/init.d/dnsmasq start
chkconfig dnsmasq on
现在我把安装dnsmasq 前解析域名的时间和安装dnsmasq 后解析域名所用的时间贴出来。
安装dnsmasq 前:
ig baidu.com
; > DiG 9.2.4 > baidu.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER> DiG 9.2.4 > baidu.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER> DiG 9.2.4 > baidu.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER> DiG 9.2.4 > baidu.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER> DiG 9.2.4 > baidu.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER> DiG 9.2.4 > baidu.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31/showart_653929.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP