Product SiteDocumentation Site

7.2. 通常步驟

本區的目的是說明管理者常用到的作業秘訣。當然,這些步驟不會包括所有的個案,可以視為更困難案件的起點。

7.2.1. 組態程式

When you want to configure an unknown package, you must proceed in stages. First, you should read what the package maintainer has documented. Reading /usr/share/doc/package/README.Debian will allow you to learn of specific provisions made to simplify the use of the software. It is sometimes essential in order to understand the differences from the original behavior of the program, as described in the general documentation, such as howtos. Sometimes this file also details the most common errors in order for you to avoid wasting time on common problems.
然後,應該看看軟體的官方文件 — 參照 節 7.1, “文件來源” 辨識現有的文件來源。dpkg -L 套件名稱 命序列出該套件的檔案清單;也可辨識出可用的文件 (以及組態檔,位於 /etc/)。dpkg -s 套件名稱 列出套件的元資料並顯示建議的套件;從這裡,可找到協助組態軟體的文件及工具。
最後,組態檔本身以說明性評論列出各種組態設定的可能值。通常祗要選其中之一就可以。有些時候,組態檔位於 /usr/share/doc/套件名稱/examples/ 資料夾內。可做為客製化組態的基礎。

7.2.2. 監控後台進程的工作

瞭解後台進程有點複雜,因為它的工作不會直接與管理者互動。檢查實際工作中的後台進程,需要先測試它。例如,以 HTTP 請求,測試 Apache (網頁伺服器) 的後台進程。
為了記錄測試結果,每個後台進程都記錄其工作過程,以及碰到的錯誤,存在 “記錄檔案” 或 “系統記錄” 內。記錄檔案存在 /var/log/ 資料夾或其下的次資料夾。參見此文件,找出每個後台進程記錄檔的正確名稱。注意:單次測試不足以涵蓋所有的情況;某些問題祗在特定環境才會發生。
As a preventive operation, the administrator should regularly read the most relevant server logs. They can thus diagnose problems before they are even reported by disgruntled users. Indeed users may sometimes wait for a problem to occur repeatedly over several days before reporting it. In many cases, there are specific tools to analyze the contents of the larger log files. In particular, such utilities exist for web servers (such as analog, awstats, awffull for Apache), FTP servers, proxy/cache servers, firewalls, e-mail servers, DNS servers, and even for print servers. Other tools, such as logcheck (a software discussed in 章 14, 安全性), scan these files in search of alerts to be dealt with.

7.2.3. 通過郵件列表尋求幫助

If your various searches haven't helped you to get to the root of a problem, it is possible to get help from other, perhaps more experienced people. This is exactly the purpose of the mailing list and its language specific siblings . As with any community, it has rules that need to be followed. Before asking any question, you should check that your problem isn't already covered by recent discussions on the list or by any official documentation.
Once those two conditions are met, you can think of describing your problem to the mailing list. Include as much relevant information as possible: various tests conducted, documentation consulted, how you attempted to diagnose the problem, the packages concerned or those that may be involved, etc. Check the Debian Bug Tracking System (BTS, described in sidebar 節 1.3.2.1, “Reporting bugs”) for similar problems, and mention the results of that search, providing links to bugs found. BTS starts on:
措辭愈得當與精準,愈有機會得到答案,至少,若干回應。若以私訊收到相關的資訊,不妨考慮把它整理公佈以嘉惠其他人。同時可以讓列表典藏它,被搜尋引擎找到,讓碰到同樣問題的人也能看到解決方案。

7.2.4. 以錯誤報告棘手的問題

若所有的努力都沒有結果,很可能不是您的錯,祗是程式本身錯誤造成的問題。在此情況下,正確的程序是向 Debian 或直接向上游開發者報告錯誤。首先,應儘可能單純化錯誤並建立最基本的測試環境。若知道造成問題的程式,可以用命令 dpkg -S 有問題的檔案 找出對應的套件名稱。檢查錯誤追蹤系統 (https://bugs.debian.org/套件名稱) 確定還沒有人報告該錯誤。然後,以 reportbug 命令送出自己的錯誤報告,完整描述測試的基本環境,讓別人也能再生該錯誤。
本章旨在有效解決後面各章可能碰到的問題。有需要就常常用它!