{"id":629,"date":"2014-07-18T15:16:55","date_gmt":"2014-07-18T15:16:55","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=629"},"modified":"2014-07-18T15:16:55","modified_gmt":"2014-07-18T15:16:55","slug":"%e6%b8%85%e9%99%a4%e7%b3%bb%e7%bb%9f%e7%9a%84dns%e7%bc%93%e5%ad%98","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/629.html","title":{"rendered":"\u6e05\u9664\u7cfb\u7edf\u7684DNS\u7f13\u5b58"},"content":{"rendered":"<h5>\u6e05\u9664Windows\u7cfb\u7edf\u7684DNS\u7f13\u5b58<\/h5>\n<p>\u5728Windows\u7cfb\u7edf\u4e2d\u6e05\u9664DNS\u7f13\u5b58\u975e\u5e38\u7b80\u5355\u65b9\u4fbf\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u8f93\u5165\u5982\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<p>C:&gt; <span style=\"color: #ff0000;\">ipconfig \/flushdns<\/span> \u00a0#\u6e05\u9664DNS\u7f13\u5b58<\/p>\n<p>C:&gt; <span style=\"color: #ff0000;\">ipconfig \/displaydns<\/span> \u00a0#\u67e5\u770bDNS<\/p>\n<h5>\u6e05\u9664Ubuntu\u7b49Linux\u7cfb\u7edf\u4e0a\u7684DNS\u7f13\u5b58<\/h5>\n<p>\u6682\u65f6\u8fd8\u6ca1\u6709\u505a\u6d4b\u8bd5\uff0c\u4f46\u4f30\u8ba1\u8fd9\u4e2a\u4e5f\u4e0d\u788d\u4e8b\uff0c\u76f4\u63a5\u8bf4\u65b9\u6cd5\uff1a<\/p>\n<p>\u5982\u679c\u7cfb\u7edf\u4e0b\u6709 nscd\uff0c\u90a3\u4e48\u5c31\u76f4\u63a5\uff1a<\/p>\n<pre class=\"lang:default decode:true\">sudo \/etc\/init.d\/nscd restart<\/pre>\n<p>\u5982\u679c\u6ca1\u6709\u4e5f\u6ca1\u5173\u7cfb\uff0c\u7f51\u4e0a\u641c\u5230\u7684\u65b9\u6cd5\u5927\u90fd\u662f\uff1a<\/p>\n<pre class=\"lang:default decode:true\">sudo aptitude install nscd\n\nsudo \/etc\/init.d\/nscd restart<\/pre>\n<p>\u5176\u5b9e\u6211\u4eec\u4e5f\u53ef\u4ee5\u76f4\u63a5\uff1a<\/p>\n<pre class=\"lang:default decode:true\">sudo \/etc\/init.d\/dns-clean start<\/pre>\n<p>\u6765\u8fbe\u5230\u76ee\u7684\u3002<\/p>\n<h5>\u6e05\u9664Mac\u7cfb\u7edf\u4e0a\u7684DNS\u7f13\u5b58\uff1a<\/h5>\n<h6>Issue the following command for OS X Mountain Lion or Lion<\/h6>\n<pre class=\"lang:default decode:true\">killall -HUP mDNSResponder<\/pre>\n<h6>Mac OS X Mountain Lion or Lion<\/h6>\n<pre class=\"lang:default decode:true\">killall -HUP mDNSResponder<\/pre>\n<h6>Mac OS X 10.5.2 to Mac OS X v10.6<\/h6>\n<p>Click on the Finder icon in your dock. Open your Applications folder.Inside the Applications folder, click on Utilities and then Terminal.<br \/>\nType the following command in the Terminal window and press Enter:<\/p>\n<pre class=\"lang:default decode:true\">dscacheutil -flushcache<\/pre>\n<p>Do not be alarmed if you do not receive any kind of response from the Terminal window after running the command. This is normal.<\/p>\n<h6>Mac OS X 10.5.1 and below<\/h6>\n<p>Click on the Finder icon in your dock. Open your Applications folder.\u00a0Inside the Applications folder, click on Utilities and then Terminal.\u00a0Type the following command in the Terminal window and press Enter:<\/p>\n<pre class=\"lang:default decode:true\">lookupd -flushcache<\/pre>\n<h5>Linux<\/h5>\n<p>One of the most commonly used DNS caching Linux applications is NSCD (Name Service Cachine Daemon).<br \/>\nIf you have NSCD installed you can clear the local DNS cache by running one of the following commands in your favorite terminal\/shell application:<\/p>\n<pre class=\"lang:default decode:true\">nscd -i hosts<\/pre>\n<p>\u2013 Clear local DNS cache for current user.<\/p>\n<pre class=\"lang:default decode:true\">nscd -I hosts<\/pre>\n<p>\u2013 Clear local DNS cache for all users.<\/p>\n<p>\u53c2\u8003\u94fe\u63a5\uff1a<\/p>\n<ul>\n<li><a href=\"http:\/\/www.nenew.net\/linux-ubuntu-dns-clean.html\" target=\"_blank\">Ubuntu\u7b49Linux\u7cfb\u7edf\u6e05\u9664DNS\u7f13\u5b58\u7684\u65b9\u6cd5 | \u5976\u725b\u535a\u5ba2<\/a><\/li>\n<li><a href=\"http:\/\/www.liquidweb.com\/kb\/flush-dns-cache\/\" target=\"_blank\">How To: Flush Your Local DNS Cache<\/a><\/li>\n<li><a href=\"http:\/\/www.cyberciti.biz\/faq\/howto-linux-bsd-unix-set-dns-nameserver\/\" target=\"_blank\">Linux \/ UNIX set the DNS from the command line<\/a><\/li>\n<li><a href=\"http:\/\/ubuntuguide.net\/one-command-to-clearflush-dns-cache-in-ubuntu-linux\" target=\"_blank\">One command to clear\/flush DNS cache in Ubuntu Linux<\/a><\/li>\n<li><a href=\"http:\/\/www.ubuntugeek.com\/howto-clearflush-dns-cache-in-ubuntu.html\" target=\"_blank\">Howto clear\/Flush DNS Cache in Ubuntu<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6e05\u9664Windows\u7cfb\u7edf\u7684DNS\u7f13\u5b58 \u5728Windows\u7cfb\u7edf\u4e2d\u6e05\u9664DNS\u7f13\u5b58\u975e\u5e38\u7b80\u5355\u65b9\u4fbf\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u8f93\u5165\u5982\u4e0b\u547d\u4ee4\u5373 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,11,20],"tags":[205],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","category-windows","tag-dns"],"views":4798,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=629"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/629\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}