|
8.
|
|
|
Orienting Yourself to Debian
|
|
|
Tag: title
|
|
|
|
让自己适应 Debian
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:76
|
|
9.
|
|
|
Debian is a little different from other distributions. Even if you're familiar with Linux in other distributions, there are things you should know about Debian to help you to keep your system in a good, clean state. This chapter contains material to help you get oriented; it is not intended to be a tutorial for how to use Debian, but just a very brief glimpse of the system for the very rushed.
|
|
|
Tag: para
|
|
|
|
Debian 和其它的发行版有些不同。即使您熟悉其它发行版的 Linux,您也应该了解 Debian 的一些东西,以便保持您的系统处在良好整洁的状态。本章包的材料可以帮助您适应;但这并不是一个如何使用 Debian 的入门指南,而仅仅是对整个系统的一个粗略的介绍。
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:77
|
|
10.
|
|
|
Debian Packaging System
|
|
|
Tag: title
|
|
|
|
Debian 软件包系统
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:88
|
|
11.
|
|
|
The most important concept to grasp is the Debian packaging system. In essence, large parts of your system should be considered under the control of the packaging system. These include: <itemizedlist> <listitem><para> <filename>/usr</filename> (excluding <filename>/usr/local</filename>) </para></listitem> <listitem><para> <filename>/var</filename> (you could make <filename>/var/local</filename> and be safe in there) </para></listitem> <listitem><para> <filename>/bin</filename> </para></listitem> <listitem><para> <filename>/sbin</filename> </para></listitem> <listitem><para> <filename>/lib</filename> </para></listitem> </itemizedlist> For instance, if you replace <filename>/usr/bin/perl</filename>, that will work, but then if you upgrade your <classname>perl</classname> package, the file you put there will be replaced. Experts can get around this by putting packages on <quote>hold</quote> in <command>aptitude</command>.
|
|
|
Tag: para
|
|
|
|
要掌握的最重要概念是 Debian 的软件包系统。事实上,您系统的绝大部分都应该由软件包系统来控制。包括:<itemizedlist> <listitem><para> <filename>/usr</filename> (除了 <filename>/usr/local</filename>) </para></listitem> <listitem><para> <filename>/var</filename> (您可以创建 <filename>/var/local</filename>,在那里面进行安全的操作) </para></listitem> <listitem><para> <filename>/bin</filename> </para></listitem> <listitem><para> <filename>/sbin</filename> </para></listitem> <listitem><para> <filename>/lib</filename> </para></listitem> </itemizedlist> 例如,假设您替换了 <filename>/usr/bin/perl</filename>,它可以正常工作,但以后升级您的 <classname>perl</classname> 软件包,那里的文件将被替换。有经验的用户可以在 <command>aptitude</command> 里面将软件包设置为 <quote>hold</quote>状态,以避免这种情况。
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:89
|
|
12.
|
|
|
One of the best installation methods is apt. You can use the command line version <command>apt-get</command> or full-screen text version <application>aptitude</application>. Note apt will also let you merge main, contrib, and non-free so you can have export-restricted packages as well as standard versions.
|
|
|
Tag: para
|
|
|
|
apt 是最好的安装方法之一。您可以使用命令行模式的 <command>apt-get</command> 或者全屏幕文本模式的 <application>aptitude</application>。注意,apt 还可以让您合并 main、contrib 和 non-free,从而使您可以像使用标准版本那样使用具有出口限制的软件包。
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:130
|
|
13.
|
|
|
Application Version Management
|
|
|
Tag: title
|
|
|
|
应用程序版本管理
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:141
|
|
14.
|
|
|
Alternative versions of applications are managed by update-alternatives. If you are maintaining multiple versions of your applications, read the update-alternatives man page.
|
|
|
Tag: para
|
|
|
|
可选版本的应用程序可以通过 update-alternatives 来管理。如果您维护着应用程序的多个版本,请阅读 update-alternatives 的 man 手册。
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:142
|
|
15.
|
|
|
Cron Job Management
|
|
|
Tag: title
|
|
|
|
定时任务管理
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:152
|
|
16.
|
|
|
Any jobs under the purview of the system administrator should be in <filename>/etc</filename>, since they are configuration files. If you have a root cron job for daily, weekly, or monthly runs, put them in <filename>/etc/cron.{daily,weekly,monthly}</filename>. These are invoked from <filename>/etc/crontab</filename>, and will run in alphabetic order, which serializes them.
|
|
|
Tag: para
|
|
|
|
任何系统管理员权限内的任务都必须位于 <filename>/etc</filename> 内,这是因为它们都是配置文件。如果您有一些需要以管理员身份每天(daily)、每周(weekly)或每月(monthly)运行的定时任务,请将它们放置在 <filename>/etc/cron.{daily,weekly,monthly}</filename> 中。它们将在 <filename>/etc/crontab</filename> 中被激活,然后按照文件名的字典顺序依次运行。
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:153
|
|
17.
|
|
|
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 <filename>/etc/crontab</filename>, or, better yet, <filename>/etc/cron.d/whatever</filename>. These particular files also have an extra field that allows you to stipulate the user account under which the cron job runs.
|
|
|
Tag: para
|
|
|
|
另一方面,如果您有某个定时任务 (a) 需要以某个特定的用户身份运行,或者 (b) 需要在某个特定时刻或以特定周期运行,您可以使用 <filename>/etc/crontab</filename>,或者更好的 <filename>/etc/cron.d/whatever</filename>。这些特殊的文件可以包含一个额外的域,允许您指定运行该定时任务的用户帐户。
|
|
Translated by
Ji YongGang
|
|
|
|
Located in
post-install.xml:162
|