Xav Tau Xyuas Xyuas DNS Siv Hauv Zos Kev Siv Hosts ntawm OSX?

OSX Mac Terminal

Ib qho ntawm kuv cov neeg tau xa lawv lub vev xaib mus rau qee tus account hosting. Lawv tau hloov kho lawv cov npe DNS chaw rau A thiab CNAME cov ntaub ntawv tab sis tau muaj lub sijhawm nyuaj los txiav txim siab seb qhov chaw ntawd puas tau kho nrog cov tshiab hosting account (IP chaw nyob tshiab).


Muaj ob peb yam uas yuav tsum nco ntsoov thaum daws teeb meem DNS. Nkag siab li cas DNS ua haujlwm, nkag siab li cas koj Tus Tso Npe Sau Npe ua haujlwm, thiab tom qab ntawd nkag siab li cas koj tus tswv tswj hwm lawv cov nkag nkag.


DNS ua haujlwm li cas


Thaum koj ntaus tus sau rau hauv qhov browser:


  1. Tus sau yog ntsia hauv Is Taws Nem npe neeg rau zaub mov los nrhiav qhov twg thov yuav tsum xa mus.
  2. Nyob rau hauv rooj plaub ntawm lub vev xaib (http), ib lub npe server yuav rov tus IP chaw nyob rau koj lub computer.
  3. Koj lub khoos phis tawm tom qab khaws cov ntawv no hauv zos, hu ua koj tus DNS Cache.
  4. Qhov kev thov xa mus rau tus tswv tsev, uas txoj kev thov cov lus nug hauv tsev thiab nthuav tawm koj lub xaib.


Koj Qhov Chaw Sau Npe Ua Haujlwm Li Cas


Ib qho lus ceeb toom ntawm qhov no… tsis yog txhua tus neeg sau npe sau npe tiag tiag yuav tswj hwm koj lub DNS. Kuv muaj ib tus neeg siv, piv txwv li, tias lawv sau npe rau lawv cov npe hauv Yahoo! Yahoo! tsis tau tswj hwm tus sau txawm tias nws tshwm sim hauv lawv txoj kev tswj hwm. Lawv nyob nraum tsuas yog tus muag khoom rau TucowsCov. Raws li qhov tshwm sim, thaum koj ua qhov hloov pauv rau koj cov DNS chaw hauv Yahoo !, nws tuaj yeem siv sijhawm ua ntej cov kev hloov no tau raug hloov tshiab hauv tiag tiag sau npe tus neeg sau npe kawm ntawv.


Thaum koj cov chaw DNS tau hloov kho tshiab, lawv tom qab tau tshaj tawm cov kab ntawm cov servers thoob plaws Is Taws Nem. Feem ntau ntawm cov sij hawm, qhov no cia tsuas siv ob peb feeb kom tshwm sim. Nov yog ib qho laj thawj uas tib neeg yuav them rau tswj hwm DNSCov. Tswj cov tuam txhab DNS feem ntau muaj ob qho kev ua yuam kev thiab muaj qhov nrawm nrawm… feem ntau nrawm dua li koj tus neeg sau npe kawm npe.


Thaum siv Is Taws Nem hauv Internet hloov tshiab, lwm zaus koj lub kaw lus ua rau DNS thov, IP chaw nyob uas koj tus xaib yog xa rov qab. CEEB TOOM: Nco ntsoov tias kuv tau hais lwm zaus koj lub kaw lus ua qhov kev thov. Yog tias koj tau thov yav dhau los qhov chaw ntawd, Is Taws Nem siv tau mus txog hnub kawg tab sis koj cov chaw hauv zos yuav daws tau qhov chaw nyob qub IP raws li koj tus DNS Cache.


Koj Tus Tswv DNS Ua Haujlwm Li Cas


Tus IP address uas xa rov qab thiab mus cached los ntawm koj cov kab ke hauv zos tsis muaj qhov tshwj xeeb rau tib lub vev xaib. Ib tus tswv tsev yuav muaj kaum ob lossis ntau pua lub vev xaib tuav ntawm tib tus IP Chaw nyob (feem ntau yog ib qho server lossis virtual server). Yog li, thaum koj lub npe thov ntawm IP chaw nyob, koj tus tswv tsev forwards koj qhov kev thov mus rau qhov chaw ceev cov ntaub ntawv tsis pub dhau lub server thiab nthuav tawm koj nplooj ntawv.


Yuav Ua Li Cas Txog Teeb Meem DNS


Vim tias muaj peb qhov system nyob ntawm no, kuj tseem muaj peb qhov system los daws teeb meem! Ua ntej, koj yuav xav cia li tshawb xyuas koj qhov kev nyob ze hauv zos txhawm rau saib qhov chaw nyob tus IP yog taw rau hauv koj qhov system:


OSX Davhlau ya nyob twg Ping


Qhov no ua tau yooj yim los ntawm kev qhib lub qhov rooj Terminal thiab ntaus ntawv:


ping domain.com


Lossis koj tuaj yeem ua ib lub npe tshwj xeeb rau server:


nslookup domain.com


Lub davhlau ya nyob twg nslookup


Yog tias koj tau hloov kho cov chaw DNS nyob rau hauv koj tus neeg sau npe hauv lub npe, ces koj yuav xav kom koj lub DNS cache tau tshem thiab koj yuav xav ua qhov kev thov dua. Txhawm rau tshem koj cov cache DNS hauv OSX:


sudo dnscacheutil -flushcache


Dav davhlau ya nyob twg DNS Cache


Koj tuaj yeem sim rov qab lub ping or nslookup txhawm rau saib seb lub npe daws rau tus IP chaw nyob tshiab ntawm lub sijhawm no.


Cov kauj ruam tom ntej yog xav pom yog tias Internets DNS servers tau hloov kho tshiab. Khaws Ntawv Txom Nyem ke rau qhov no, koj tuaj yeem tau txais tag nrho DNSreport los ntawm lawv cov platform uas tau zoo heev. flywheel muaj ib tus yawm DNS tshawb hauv nws lub platform uas lawv yuav mus nug Google, OpenDNS, Fortalnet, thiab Sojntsuam Tes Haujlwm los saib seb koj lub chaw tau qhia zoo ib ncig ntawm lub vev xaib.


Yog tias koj pom tus IP chaw tso tawm kom pom thoob plaws hauv lub vev xaib thiab koj lub vev xaib tseem tsis pom, koj tuaj yeem hla lub Internet cov servers thiab qhia koj lub system cia li xa cov ntawv thov ncaj qha rau IP Address. Koj tuaj yeem ua tiav qhov no los ntawm kev hloov kho koj cov ntaub ntawv hosts thiab yaug koj DNS. Ua qhov no, qhib Terminal thiab hom:


sudo nano / etc / hosts


Chaw nres tsheb Sudo Nano Cov tswv


Ntaus koj qhov system password thiab nias ntaus. Uas yuav coj mus ncaj cov ntaub ntawv hauv Terminal rau kho kom raug. Txav koj tus cursor siv koj cov xib xub thiab ntxiv ib txoj kab tshiab nrog tus IP nyob tom qab ntawm lub npe sau npe.


Dav Dav Hlau Tseg Tseg Cov Ntaub Ntawv


Txhawm rau khaws cov ntaub ntawv, nias tswj-o ntawm koj cov keyboard ces rov los txais yuav lub npe hu ua. Tawm ntawm tus editor los nias tswj-x, uas yuav xa rov qab rau koj rau kab hais kom ua. Tsis txhob hnov ​​qab yaug koj lub cache. Yog tias lub vev xaib tsis tuaj yeem, nws yuav yog qhov teeb meem hauv zos rau koj tus tswv tsev thiab koj yuav tsum hu rau lawv thiab qhia lawv paub.


Kawg daim ntawv… tsis txhob hnov ​​qab xa koj cov ntaub ntawv hom rau nws tus thawj version. Koj tsis xav tau tawm qhov kev nkag mus rau qhov ntawd koj xav hloov kho sai sai!


Los ntawm ua raws cov kauj ruam no, Kuv tuaj yeem tshawb xyuas qhov tseeb tias kuv tus DNS nkag rau hauv tus neeg sau npe mus txog hnub, qhov nkag DNS hauv Is Taws Nem tau hloov tshiab, kuv Mac tus DNS cache tau dhau, thiab lub web host tus DNS tau dhau los rau hnub tim… zoo mus!

Yuav ua li cas koj xav hais tias?

Qhov Web site no siv Akismet los txo cov kev pabcuam. Kawm li cas koj cov ntaub ntawv tawm tswv yim tiav.