?? 027.htm
字號:
<HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=GB2312"><TITLE>-->Linux HowTo 中譯版-->DNS HOWTO 中譯版 : 維護工作</TITLE>
<META NAME="keywords" CONTENT=" Linux HowTo 中譯版 DNS HOWTO 中譯版 : 維護工作">
<META NAME="description" CONTENT=" - Linux HowTo 中譯版 - DNS HOWTO 中譯版 : 維護工作">
<style>
<!--
#page {position:absolute; z-index:0; left:0px; top:0px}
.tt3 {font: 9pt/12pt "宋體"}
.tt2 {font: 12pt/15pt "宋體"}
a {text-decoration:none}
a:hover {color: blue;text-decoration:underline}
-->
</style>
</HEAD>
<body text="#000000" aLink=#9900ff link=#006699 vLink=#006699 bgcolor="#FFFFFF" leftmargin="3" topmargin="3" marginheight="3" marginwidth="3">
<TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>
<TR>
<TD CLASS="tt3" VALIGN="top" width="8%" bgcolor="#e0e0e0"><strong><A HREF="028.htm">后一頁</A><BR>
<A HREF="026.htm">前一頁</A><BR>
<A HREF="index.html">回目錄</A><BR>
<A HREF="../../../../index.htm">回首頁</A><BR>
</strong>
</TD>
<TD class="tt2" bgcolor="#F5F8F8" width="84%"><center><B><FONT style="FONT-SIZE: 16.5pt" COLOR="#FF6666" FACE="楷體_GB2312">DNS HOWTO 中譯版 : 維護工作</FONT></B></center>
<hr color="#EE9B73" size="1" width="94%">
姓名:Nicolai Langfeldt<br>
Email:<br>
地址 :<br>
轉摘 :http://member.netease.com/</p>
<BR>
<BR>
<hr SIZE="0">
<BR>
<p><br>
<br>
6. 維護工作 <br>
維持它的運作. <br>
<br>
維持它們的繼續執行之外,對於 named
你還有個維護的任務得要做.那就是維持 root.cache
檔案的更新.最簡單的方法是使用 dig 程式,首先不加任何參數執行
dig 程式,你將會取得從你自己伺服器得到的 root.cache.然後以 dig
@rootserver . ns
查問所列出的根伺服器其中之一.你將會注意到這份輸出看起來非常地像一個
root.cache
檔案,除了一堆額外的數字以外.這些數字不會有什麼妨礙.把它存放到檔案里(dig
@e.root-servers.net . ns >root.cache.new)并且用它來取代原本舊的 root.cache
檔案. <br>
<br>
取代了原先的檔案之後要記得重新啟動 named 程式. <br>
<br>
Al Longyear 寄給我這個指令稿,它可以自動執行來更新 named.cache,為它安裝個
crontab 項目然後忘了它.這個指令稿假設你的電子郵件可以運作而且
`hostmaster' 這個郵件別名有定義.你應該修訂它以便符合你的設定. <br>
<br>
<br>
-------------------------------------------------------------------------------- <br>
<br>
#!/bin/sh <br>
# <br>
# Update the nameserver cache information file once per month. <br>
# This is run automatically by a cron entry. <br>
# <br>
( <br>
echo "To: hostmaster <hostmaster>" <br>
echo "From: system <root>" <br>
echo "Subject: Automatic update of the named.boot file" <br>
echo <br>
<br>
export PATH=/sbin:/usr/sbin:/bin:/usr/bin: <br>
cd /var/named <br>
<br>
dig @rs.internic.net . ns >root.cache.new <br>
<br>
echo "The named.boot file has been updated to contain the following
information:" <br>
echo <br>
cat root.cache.new <br>
<br>
chown root.root root.cache.new <br>
chmod 444 root.cache.new <br>
rm -f root.cache.old <br>
mv root.cache root.cache.old <br>
mv root.cache.new root.cache <br>
ndc restart <br>
echo <br>
echo "The nameserver has been restarted to ensure that the update is complete." <br>
echo "The previous root.cache file is now called /var/named/root.cache.old." <br>
) 2>&1 | /usr/lib/sendmail -t <br>
exit 0 <br>
<br>
<br>
-------------------------------------------------------------------------------- <br>
<br>
<br>
有些人可能用 ftp 從 Internic 得到 root.cache 檔案.請不要用 ftp 來更新
root.cache,上面提到的方法更為便利. </p>
<BR>
<hr color="#EE9B73" size="1" width="94%">
</TD>
<TD CLASS="tt3" VALIGN="bottom" width="8%" bgcolor="#e0e0e0"><strong><A HREF="028.htm">后一頁</A><BR>
<A HREF="026.htm">前一頁</A><BR>
<A HREF="index.html">回目錄</A><BR>
<A HREF="../../../../index.htm">回首頁</A><BR>
</strong>
</TD>
</TR>
</table>
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -