8.2. 讓您自己轉向 Debian

Debian 和其它的發行版有些不同。即使您熟悉其它發行版的 Linux,您也應該瞭解 Debian 的一些東西,以便保持您的系統處在整潔良好的狀態。本章包含的內容可以幫助您瞭解 Debian﹔但這並不是一個如何使用 Debian 的入門指南,而僅僅是對整個系統的一個粗略的介紹。

8.2.1. Debian 軟體套件系統

要掌握的最重要概念是 Debian 的軟體套件系統。事實上,您系統的絕大部分都該由軟體套件系統來控制。包括:

  • /usr (除了 /usr/local 之外)

  • /var (您可以建立 /var/local,在那裡面進行安全的操作)

  • /bin

  • /sbin

  • /lib

例如,如果您替換了 /usr/bin/perl,它可以正常工作,但以後您升級了 perl 軟體套件,那個檔案仍將被替換回來。有經驗的使用者可以將軟體套件設置為 hold 狀態,以避免這種情況,這需要使用 aptitude

One of the best installation methods is apt. You can use the command line version of apt as well as tools like aptitude or synaptic (which are just graphical frontends for apt). Note that apt will also let you merge main, contrib, non-free, and non-free-firmware so you can have restricted packages (strictly speaking not belonging to Debian) as well as packages from Debian GNU/Linux at the same time.

8.2.2. Additional Software Available for Debian

There are official and unofficial software repositories that are not enabled in the default Debian install. These contain software which many find important and expect to have. Information on these additional repositories can be found on the Debian Wiki page titled The Software Available for Debian's Stable Release.

8.2.3. 應用程式版本管理

可選版本的應用程式可以透過 update-alternatives 來管理。 如果您維護著多個版本的應用程式,請參閱 update-alternatives 的 man 手冊。

8.2.4. 任務排程管理

Any jobs under the purview of the system administrator should be in /etc, since they are configuration files. If you have a root cron job for daily, weekly, or monthly runs, put them in /etc/cron.{daily,weekly,monthly}. These are invoked from /etc/crontab, and will run in alphabetic order, which serializes them.

On the other hand, if you have a cron job that (a) needs to run as a special user, or (b) needs to run at a special time or frequency, you can use either /etc/crontab, or, better yet, /etc/cron.d/whatever. These particular files also have an extra field that allows you to stipulate the user account under which the cron job runs.

在任何情況下,您只需編輯這些檔案,cron 將會自動處理它們。沒有必要再執行某個特殊的指令。欲瞭解更多的資訊,請參閱 cron(8),crontab(5),以及 /usr/share/doc/cron/README.Debian