MFen 1.208 -> 1.216:

Local revisions: 1.1.1000.1-1.1.1000.3

Part of language improvements submitted by:
	"samcall" from FreeBSDChina Community

Obtained from:	The FreeBSD Simplified Chinese Project CVS
This commit is contained in:
Xin LI 2005-04-06 12:00:04 +00:00
parent cba270a1a2
commit 7bc7b239ee
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=24247

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.208
Original Revision: 1.216
$FreeBSD$
-->
@ -144,11 +144,10 @@
<orderedlist>
<listitem>
<para>因为您听说里边有些新而酷 (cool) 的功能,
而且您想在首先在您的天地 (block) 里拥有它,
所以紧紧跟随、不放过预先发行的每一个字节。
由于是系统中第一个使用新功能的人,
也就意味着在系统里产生新问题的您是第一个。</para>
<para>追求最新功能, 您听说里面有一些很酷的新功能,
并希望成为您周围的人中第一个尝试它们的人。
尽管您能够因此首先了解到最新的功能,
但这也意味着在出现新的 bug 时您也首当其冲。</para>
</listitem>
<listitem>
@ -435,23 +434,28 @@
(kernel panics)、数据出错。</para>
</warning>
<indexterm><primary>Anonymous CVS</primary></indexterm>
<para><application>Anonymous CVS</application> 和
<indexterm>
<primary>CVS</primary>
<secondary>匿名</secondary>
</indexterm>
<para><application>匿名 CVS</application> 和
<application>CVSup</application> 使用 <emphasis>下拉(pull)</emphasis>
模式更新源码。在 <application>CVSup</application> 方式下,用户
(或 <command>cron</command> 脚本) 调用 <command>cvsup</command>
程序,并且与某个地方的 <command>cvsupd</command>
服务器交互一起更新您的文件。您收到的更新文件是更新到秒的,
并且在您得到他们时,也只有那时您会需要它们。
您可以轻易的限定您的更新到您感兴趣的指定文件或目录。
服务器会根据您所有的和您想要的更新在空闲时生成。
<application>Anonymous CVS</application> 相比
<application>CVSup</application> 要简单一点,
<application>CVSup</application> 只是
<application>CVS</application>(让您可以直接从远端的
CVS 仓库里下拉更改)的扩展。<application>CVSup</application>
完成得更有效率,但 <application>Anonymous CVS</application>
更易使用。</para>
模式来更新源代码。 在
<application>CVSup</application> 中, 用户 (或者
<command>cron</command> 叫本)
会调用 <command>cvsup</command> 程序, 后者会同某一个
<command>cvsupd</command> 服务进行交互, 以更新您的文件。
您接到的更新是更新时刻最新的, 并且您只会收到那些需要的更新。
您可以很容易地限制更新的范围, 只更新那些您需要的文件。
服务器端会根据您手头已经有的文件即时地生成更新内容。
<application>匿名 CVS</application>
相对于 <application>CVSup</application> 而言要简单一些, 因为它只是对
<application>CVS</application> 的一种扩展,
让您可以从远程的 CVS 代码库得到更新。
<application>CVSup</application> 相对而言,
要比 <application>匿名 CVS</application> 更有效率,
然而后者却更容易使用。</para>
<indexterm>
<primary><application>CTM</application></primary>
@ -534,15 +538,29 @@
<sect2>
<title>更新系统的规范途径</title>
<para>要更新系统,就要使用下面的过程:</para>
<para>要更新系统, 您必须查看
<filename>/usr/src/UPDATING</filename> 文件, 以了解
buildworld 之前需要完成的步骤,
然后使用下面的过程:</para>
<screen>&prompt.root; <userinput>make buildworld</userinput>
&prompt.root; <userinput>make buildkernel</userinput>
&prompt.root; <userinput>make installkernel</userinput>
&prompt.root; <userinput>reboot</userinput></screen>
<para>您应该启动到单用户模式下(例如从启动提示符处使用
<command>boot -s</command>)。然后执行:</para>
<note>
<para>有些时候, 需要额外地执行一次
<command>mergemaster -p</command> 才能够完成
<maketarget>buildworld</maketarget> 步骤。
这些会在 <filename>UPDATING</filename> 中进行描述。
一般而言, 您可以简单地跳过这一步, 只要进行的不是
&os; 的大跨度版本升级。</para>
</note>
<para>在 <maketarget>installkernel</maketarget> 成功完成之后,
您需要引导到单用户模式
(例如, 在加载器提示后面输入 <command>boot -s</command>)。
接下来执行:</para>
<screen>&prompt.root; <userinput>mergemaster -p</userinput>
&prompt.root; <userinput>make installworld</userinput>
@ -610,10 +628,10 @@
<para>有些配置文件在天天运行的系统里也是要使用到的。尤其是
<filename>/etc/group</filename>。</para>
<para>偶尔,某些<quote>make
installworld</quote>的安装需要特定的用户名或用户组存在
升级时,有可能这些用户或组就不存在。这会在升级过程造成出错
有时,<quote>make installworld</quote>会首先检查这些用户或组是否存在。</para>
<para>偶尔, 作为安装过程的一部分,
<command>make installworld</command> 会要求事先创建某些特定的用户或组
进行升级时, 它们可能并不存在。 这会给升级造成问题
有时, <command>make buildworld</command> 会检查它们是否已经存在。</para>
<para>最近就有个这样的例子,当时 <username>smmsp</username>
用户是被增加了的。当 &man.mtree.8; 试着建立
@ -697,16 +715,16 @@
<sect2>
<title>删除 <filename>/usr/obj</filename></title>
<para>在重建部分系统时,它们被(默认地)放到了
<filename>/usr/obj</filename> 目录下边。这些目录影射到了
<filename>/usr/src</filename> 下边。</para>
<para>随着重新构建系统的进行, 编译结果会放到 (默认情况下)
<filename>/usr/obj</filename> 下。 这些目录会映射到
<filename>/usr/src</filename>。</para>
<para>删除这个目录,您可以加快<quote>make buildworld</quote>的过程,
并且省下与依赖关系有关的许多头痛的事情。</para>
<para>通过删除这个目录, 可以加速 <command>make buildworld</command>
的过程, 并避免相互依赖关系等复杂的问题。</para>
<para><filename>/usr/obj</filename> 下的有些文件可能设置了不可改
(immutable) 属性(查看 &man.chflags.1; 了解更多)
您必须先把这些标志去掉。</para>
<para><filename>/usr/obj</filename>
中的某些文件可能设置了不可改标记 (详情参见 &man.chflags.1;)
需要首先去掉这些标志。</para>
<screen>&prompt.root; <userinput>cd /usr/obj</userinput>
&prompt.root; <userinput>chflags -R noschg *</userinput>
@ -860,7 +878,7 @@ Script done, &hellip;</screen>
<sect3>
<title>耗时</title>
<indexterm>
<primary>Rebuilding <quote>world</quote></primary>
<primary>rebuilding <quote>world</quote></primary>
<secondary>timings</secondary>
</indexterm>
@ -913,8 +931,8 @@ Script done, &hellip;</screen>
调高到了 1 以上,而且还设置了 <literal>noschg</literal>
或相似的标识到了您的内核二进制里边,您可能会发现转换到单用户模式里使用
<maketarget>installkernel</maketarget> 是很有必要的。
另外您应该也能毫无问题地从多用户模式执行这两个命令。查看
&man.init.8; 了解更多关于 <literal>内核安全级(kern.securelevel)</literal>
如果您没有设置它, 则应该也能毫无问题地在多用户模式执行这两个命令。 请参考
&man.init.8; 了解更多关于 <literal>内核安全级(kern.securelevel)</literal>
的信息;查看 &man.chflags.1; 了解更多关于不同文件标识的信息。</para>
<para>如果您升级到 &os; 4.0 以前版本,您应旧的内核 build
程序。但还是推荐您使用新版的 &man.config.8;
@ -1242,11 +1260,13 @@ Script done, &hellip;</screen>
<title>更新<filename>/stand</filename></title>
<note>
<para>这一步只是为了收尾,可以安全省略。如果您在使用
FreeBSD&nbsp;5.2 或更新的版本,<filename>/rescue</filename>
目录会为用户进行自动更新,使用的是在 <command>make installworld</command>
期间静态编译地最新的二进制文件,因此也就不用废话更新
<filename>/stand</filename> 的必要性了。</para>
<para>这一步应被看作最后的扫尾工作。 您可以安全地跳过这一步。
如果正在使用的是 FreeBSD&nbsp;5.2 或更新的版本,
<filename>/rescue</filename> 目录会为用户自动更新,
其内容是在 <command>make installworld</command>
过程中所生成的静态联编的可执行程序,
这就不需要更新 <filename>/stand</filename> (在 FreeBSD&nbsp;5.2
和更新版本中不再存在) 了。</para>
</note>
<para>为了完成,您可能想额外地更新 <filename>/stand</filename>
@ -1346,11 +1366,12 @@ Script done, &hellip;</screen>
<para><filename>/usr/obj</filename>
包含了所有在编译阶段生成的目标文件。通常,
<quote>make buildworld</quote>过程中第一步之一就是删除这个目录重新开始。
<command>make buildworld</command> 过程中第一步之一就是删除这个目录重新开始。
这种情况下,在您完成后,保留 <filename>/usr/obj</filename>
没有多大意义,还可释放一大堆磁盘空间(通常在 340&nbsp;MB 左右)。</para>
<para>只是,如果您清楚您在干什么,您可以让<quote>make buildworld</quote>跳过这一步。
<para>只是,如果您清楚您在干什么,您可以让
<command>make buildworld</command> 跳过这一步。
这会让后继的 build 执行得更快,因为大部分的源码都不必再进行编译了。
这个的另一面就在于敏感的依赖问题可以潜在,
并以奇怪的方式引起 build 的失败。这在 &os; 邮件列表里经常引起沸腾,
@ -1367,22 +1388,23 @@ Script done, &hellip;</screen>
<answer>
<para>依赖于您在您找到问题之前整个过程进行了多远。</para>
<para><emphasis>大体上</emphasis> (这个并不是硬性规定)
<quote>make buildworld</quote>过程会建立新版的基本工具
(如 &man.gcc.1; 和 &man.make.1;) 以及系统二进制文件。
这些工具和二进制文件然后被安装。新的工具和库然后用来重建它们自已,
并再次被安装。整个系统 (现在包括了常规的用户程序,如
&man.ls.1; 或 &man.grep.1;) 然后使用新的系统文件被重建。</para>
<para><emphasis>一般而言</emphasis> (当然这并不是硬性规定)
<command>make buildworld</command>
的过程中将会首先构建新版的基本构建工具 (例如 &man.gcc.1; 以及
&man.make.1;) 和系统库。 随后会安装这些工具和库。
这些新版本的工具和库在随后将被用于重新编译和连接它们本身。
整个系统 (现在包括了常规的用户程序, 例如
&man.ls.1; 或 &man.grep.1;) 会同新版的系统文件一起被重新构建。</para>
<para>如果您处在最后阶段,您就知道了
(因为您已经看过您存储的输出),然后您可以做(相当安全)</para>
<para>如果您正处于最后一个阶段, 并且了解它 (因为您已经看过了所保存的输出)
则可以 (相当安全地) 做</para>
<screen><emphasis>&hellip; 问题修复 &hellip;</emphasis>
&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make -DNOCLEAN all</userinput></screen>
<para>这将不能取消
<quote>make buildworld</quote>先前所做的工作。</para>
<para>这样就不会取消先前的
<command>make buildworld</command> 所做的工作。</para>
<para>在<quote>make buildworld</quote>的输出中如果看到如下信息:</para>
@ -1390,9 +1412,11 @@ Script done, &hellip;</screen>
Building everything..
--------------------------------------------------------------</screen>
<para>那么这样做就是相当安全的。</para>
<para>如果您没有看到那个信息,或者您不能确定,那么安全第一,从头开始。</para>
<para>出现在 <command>make buildworld</command> 的输出中,
则这样做应该不会有什么问题。</para>
<para>如果没有看到这样的信息, 或者您不确定,
则从头开始构建将是万无一失的做法。</para>
</answer>
</qandaentry>