- Update more translation.

Obtained from:		The FreeBSD Traditional Chinese Project
			https://opensvn.csie.org/traccgi/freebsddoc/wiki
This commit is contained in:
Chin-San Huang 2007-12-02 09:23:40 +00:00
parent 2ebb7d200c
commit 1af2ce50dc
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=31080

View file

@ -614,124 +614,108 @@
<sect2> <sect2>
<title>§ó·s <filename>/etc</filename> ¤ºªº³]©wÀÉ</title> <title>§ó·s <filename>/etc</filename> ¤ºªº³]©wÀÉ</title>
<para>The <filename>/etc</filename> directory contains a large part <para>在 <filename>/etc</filename> 目錄會有系統的相關設定檔,
of your system's configuration information, as well as scripts 以及開機時的各項服務啟動 script。 有些 script 隨 FreeBSD
that are run at system startup. Some of these scripts change from 版本的不同而有些差異。</para>
version to version of FreeBSD.</para>
<para>Some of the configuration files are also used in the day to <para>其中有些設定檔會在每日運作的系統裡也會用到。 尤其是
day running of the system. In particular, <filename>/etc/group</filename>。</para>
<filename>/etc/group</filename>.</para>
<para>There have been occasions when the installation part of <para>有時候在 <command>make installworld</command> 安裝過程中,
<command>make installworld</command> has expected certain usernames or groups 會需要先建立某些特定帳號或群組。 在進行升級之前,它們可能並不存在,
to exist. When performing an upgrade it is likely that these 因此升級時就會造成問題。 有時候 <command>make buildworld</command>
users or groups did not exist. This caused problems when upgrading. 會先檢查這些所需的帳號或群組是否已有存在。</para>
In some cases <command>make buildworld</command> will check to see if
these users or groups exist.</para>
<para>An example of this is when the <para>舉個這樣的例子,像是某次升級之後必須新增 <username>smmsp</username>
<username>smmsp</username> user was added. Users had the 帳號。 若使用者尚未新增該帳號就要完成升級操作的話,
installation process fail for them when 會在 &man.mtree.8; 嘗試建立 <filename>/var/spool/clientmqueue</filename>
&man.mtree.8; was trying to create 時發生失敗。</para>
<filename>/var/spool/clientmqueue</filename>.</para>
<para>The solution is to run &man.mergemaster.8; in <para>解法是在 buildworld 階段之前,先執行 &man.mergemaster.8; 並搭配
pre-buildworld mode by providing the <option>-p</option> option. <option>-p</option> 選項。 它會比對那些執行
This will compare only those files that are essential for the success <maketarget>buildworld</maketarget> 或
of <maketarget>buildworld</maketarget> or <maketarget>installworld</maketarget> 所需之關鍵設定檔。
<maketarget>installworld</maketarget>. If your old version of 若你所用的是早期仍未支援 <option>-p</option> 的
<command>mergemaster</command> does not support <option>-p</option>, <command>mergemaster</command> 版本,那麼直接使用 source tree
use the new version in the source tree when running for the first 內的新版即可:</para>
time:</para>
<screen>&prompt.root; <userinput>cd /usr/src/usr.sbin/mergemaster</userinput> <screen>&prompt.root; <userinput>cd /usr/src/usr.sbin/mergemaster</userinput>
&prompt.root; <userinput>./mergemaster.sh -p</userinput></screen> &prompt.root; <userinput>./mergemaster.sh -p</userinput></screen>
<tip> <tip>
<para>If you are feeling particularly paranoid, you can check your <para>若您是偏執狂(paranoid)
system to see which files are owned by the group you are 可以像下面這樣去試著檢查系統上有哪些檔案屬於已改名或被刪除的群組
renaming or deleting:</para> </para>
<screen>&prompt.root; <userinput>find / -group <replaceable>GID</replaceable> -print</userinput></screen> <screen>&prompt.root; <userinput>find / -group <replaceable>GID</replaceable> -print</userinput></screen>
<para>will show all files owned by group <para>這會顯示所有符合要找的 <replaceable>GID</replaceable> 群組
<replaceable>GID</replaceable> (which can be either a group name (可以是群組名稱,或者是群組的數字代號)的所有檔案。</para>
or a numeric group ID).</para>
</tip> </tip>
</sect2> </sect2>
<sect2 id="makeworld-singleuser"> <sect2 id="makeworld-singleuser">
<title>Drop to Single User Mode</title> <title>切換到 Single User 模式</title>
<indexterm><primary>single-user mode</primary></indexterm> <indexterm><primary>single-user mode</primary></indexterm>
<para>You may want to compile the system in single user mode. Apart <para>您可能會想在 single user 模式下編譯系統。
from the obvious benefit of making things go slightly faster, 除了可以明顯更快完成之外,安裝過程中將會牽涉許多重要的系統檔案,
reinstalling the system will touch a lot of important system 包括所有系統 binaries、libraries、include 檔案等。
files, all the standard system binaries, libraries, include files 若在運作中的系統(尤其有許多使用者在用的時候)內更改這些檔案,
and so on. Changing these on a running system (particularly if 那簡直是自找麻煩的作法。</para>
you have active users on the system at the time) is asking for
trouble.</para>
<indexterm><primary>multi-user mode</primary></indexterm> <indexterm><primary>multi-user mode</primary></indexterm>
<para>Another method is to compile the system in multi-user mode, and <para>另一種模式是先在 multi-user 模式下編譯好系統,然後再切到 single user
then drop into single user mode for the installation. If you would 模式去安裝。 若您比較喜歡這種方式,只需在 build(編譯過程) 完成之後,
like to do it this way, simply hold off on the following steps until 再去執行下面的步驟即可。 一直到可切換 single user 模式時,再去執行
the build has completed. You can postpone dropping to single user <maketarget>installkernel</maketarget> 或
mode until you have to <maketarget>installkernel</maketarget> or <maketarget>installworld</maketarget> 即可。</para>
<maketarget>installworld</maketarget>.</para>
<para>As the superuser, you can execute:</para> <para>切換為 root 身份打:</para>
<screen>&prompt.root; <userinput>shutdown now</userinput></screen> <screen>&prompt.root; <userinput>shutdown now</userinput></screen>
<para>from a running system, which will drop it to single user <para>這樣就會從原本的 multi-user 模式切換到 single user 模式。</para>
mode.</para>
<para>Alternatively, reboot the system, and at the boot prompt, <para>除此之外也可以重開機,接著在開機選單處選擇
select the <quote>single user</quote> option. The system will then boot <quote>single user</quote> 選項。 如此一來就會進入 single user 模式,
single user. At the shell prompt you should then run:</para> 然後在 shell 提示符號處輸入:</para>
<screen>&prompt.root; <userinput>fsck -p</userinput> <screen>&prompt.root; <userinput>fsck -p</userinput>
&prompt.root; <userinput>mount -u /</userinput> &prompt.root; <userinput>mount -u /</userinput>
&prompt.root; <userinput>mount -a -t ufs</userinput> &prompt.root; <userinput>mount -a -t ufs</userinput>
&prompt.root; <userinput>swapon -a</userinput></screen> &prompt.root; <userinput>swapon -a</userinput></screen>
<para>This checks the file systems, remounts <filename>/</filename> <para>這樣會先檢查檔案系統,並重新將 <filename>/</filename>
read/write, mounts all the other UFS file systems referenced in 改以可讀寫的模式掛載,以及 <filename>/etc/fstab</filename>
<filename>/etc/fstab</filename> and then turns swapping on.</para> 內所設定的其他 UFS 檔案系統,最後啟用 swap 磁區。</para>
<note> <note>
<para>If your CMOS clock is set to local time and not to GMT <para>若 CMOS 時鐘是設為當地時間,而非 GMT 時區(若 &man.date.1;
(this is true if the output of the &man.date.1; command 指令沒顯示正確的時間、時區),那可能需要再輸入下列指令:</para>
does not show the correct time and zone),
you may also need to run the following command:</para>
<screen>&prompt.root; <userinput>adjkerntz -i</userinput></screen> <screen>&prompt.root; <userinput>adjkerntz -i</userinput></screen>
<para>This will make sure that your local time-zone settings <para>這步驟可以確認您的當地時區設定是否正確 &mdash;
get set up correctly &mdash; without this, you may later run into some 否則日後會造成一些問題。</para>
problems.
</para>
</note> </note>
</sect2> </sect2>
<sect2> <sect2>
<title>Remove <filename>/usr/obj</filename></title> <title>移除 <filename>/usr/obj</filename></title>
<para>As parts of the system are rebuilt they are placed in <para>在重新編譯系統的過程中,編譯結果會放到(預設情況)
directories which (by default) go under <filename>/usr/obj</filename> 內。 這裡面的目錄會對應到
<filename>/usr/obj</filename>. The directories shadow those under <filename>/usr/src</filename> 的目錄結構。</para>
<filename>/usr/src</filename>.</para>
<para>You can speed up the <command>make buildworld</command> process, and <para>砍掉這目錄,可以讓以後的 <command>make buildworld</command>
possibly save yourself some dependency headaches by removing this 過程更快一些,而且可避免以前編譯的東西跟現在的混淆在一起的相依錯亂
directory as well.</para> </para>
<para>Some files below <filename>/usr/obj</filename> may have the <para>而有些 <filename>/usr/obj</filename> 內的檔案可能會設定不可更動的
immutable flag set (see &man.chflags.1; for more information) flag(細節請參閱 &man.chflags.1;),而必須先拿掉這些 flag 設定才行
which must be removed first.</para> </para>
<screen>&prompt.root; <userinput>cd /usr/obj</userinput> <screen>&prompt.root; <userinput>cd /usr/obj</userinput>
&prompt.root; <userinput>chflags -R noschg *</userinput> &prompt.root; <userinput>chflags -R noschg *</userinput>
@ -739,22 +723,20 @@
</sect2> </sect2>
<sect2 id="cutting-edge-compilebase"> <sect2 id="cutting-edge-compilebase">
<title>Recompile the Base System</title> <title>重新編譯 Base System</title>
<sect3> <sect3>
<title>Saving the Output</title> <title>保留編譯的紀錄</title>
<para>It is a good idea to save the output you get from running <para>建議養成好習慣,把執行 &man.make.1; 時產生的紀錄存起來。
&man.make.1; to another file. If something goes wrong you will 這樣若有哪邊出錯,就會有錯誤訊息的紀錄。 雖然單單這樣,
have a copy of the error message. While this might not help you 你可能不知道如何分析是哪邊出了岔,但若把你問題記錄貼到 &os; 相關的
in diagnosing what has gone wrong, it can help others if you post mailing list 就可以有人可以幫忙看是怎麼一回事情。</para>
your problem to one of the &os; mailing lists.</para>
<para>The easiest way to do this is to use the &man.script.1; <para>最簡單的方是就是用 &man.script.1; 指令,並加上參數
command, with a parameter that specifies the name of the file to (你想存放記錄的檔案位置、檔名)即可。
save all output to. You would do this immediately before 這步驟應該在重新編譯系統時就要作,然後在完成編譯後輸入
rebuilding the world, and then type <userinput>exit</userinput> <userinput>exit</userinput> 即可離開。</para>
when the process has finished.</para>
<screen>&prompt.root; <userinput>script /var/tmp/mw.out</userinput> <screen>&prompt.root; <userinput>script /var/tmp/mw.out</userinput>
Script started, output file is /var/tmp/mw.out Script started, output file is /var/tmp/mw.out
@ -763,60 +745,54 @@ Script started, output file is /var/tmp/mw.out
&prompt.root; <userinput>exit</userinput> &prompt.root; <userinput>exit</userinput>
Script done, &hellip;</screen> Script done, &hellip;</screen>
<para>If you do this, <emphasis>do not</emphasis> save the output <para>對了,還有一點儘量<emphasis>別把</emphasis>檔案存到
in <filename>/tmp</filename>. This directory may be cleared <filename>/tmp</filename> 目錄內。 因為重開機之後,
next time you reboot. A better place to store it is in 這目錄內的東西都會被清空。 比較妥善的地方是
<filename>/var/tmp</filename> (as in the previous example) or <filename>/var/tmp</filename> (如上例所示) 或者是
in <username>root</username>'s home directory.</para> <username>root</username> 的家目錄。</para>
</sect3> </sect3>
<sect3 id="make-buildworld"> <sect3 id="make-buildworld">
<title>Compile the Base System</title> <title>編譯 Base System</title>
<para>You must be in the <filename>/usr/src</filename> <para>首先請先切換到 <filename>/usr/src</filename> 目錄:</para>
directory:</para>
<screen>&prompt.root; <userinput>cd /usr/src</userinput></screen> <screen>&prompt.root; <userinput>cd /usr/src</userinput></screen>
<para>(unless, of course, your source code is elsewhere, in which <para>(當然,除非你把 source code 放到其他地方,若真是這樣,
case change to that directory instead).</para> 就切換到那個目錄即可)。</para>
<indexterm><primary><command>make</command></primary></indexterm> <indexterm><primary><command>make</command></primary></indexterm>
<para>To rebuild the world you use the &man.make.1; command. This <para>使用 &man.make.1; 指令來重新編譯 world。
command reads instructions from the <filename>Makefile</filename>, 這指令會從 <filename>Makefile</filename> 檔(這檔會寫 &os;
which describes how the programs that comprise &os; should be 的程式該如何重新編譯、以哪些順序來編譯等等)去讀取相關指令。</para>
rebuilt, the order in which they should be built, and so on.</para>
<para>The general format of the command line you will type is as <para>一般下指令的格式如下:</para>
follows:</para>
<screen>&prompt.root; <userinput>make -<replaceable>x</replaceable> -D<replaceable>VARIABLE</replaceable> <replaceable>target</replaceable></userinput></screen> <screen>&prompt.root; <userinput>make -<replaceable>x</replaceable> -D<replaceable>VARIABLE</replaceable> <replaceable>target</replaceable></userinput></screen>
<para>In this example, <option>-<replaceable>x</replaceable></option> <para>在這個例子,<option>-<replaceable>x</replaceable></option>
is an option that you would pass to &man.make.1;. See the 是你想傳給 &man.make.1; 的選項,細節說明請參閱 &man.make.1; 說明,
&man.make.1; manual page for an example of the options you can 裡面有相關範例說明。</para>
pass.</para>
<para><option>-D<replaceable>VARIABLE</replaceable></option> <para><option>-D<replaceable>VARIABLE</replaceable></option>
passes a variable to the <filename>Makefile</filename>. The 則是把變數設定傳給 <filename>Makefile</filename>。 這些變數會控制
behavior of the <filename>Makefile</filename> is controlled by <filename>Makefile</filename> 的行為。 這些設定與
these variables. These are the same variables as are set in <filename>/etc/make.conf</filename> 的變數設定是一樣,
<filename>/etc/make.conf</filename>, and this provides another 只是另一種設定方式而已。</para>
way of setting them.</para>
<screen>&prompt.root; <userinput>make -DNO_PROFILE <replaceable>target</replaceable></userinput></screen> <screen>&prompt.root; <userinput>make -DNO_PROFILE <replaceable>target</replaceable></userinput></screen>
<para>is another way of specifying that profiled libraries should <para>上面的例子則是另一種設定方式,也就是哪些不要。
not be built, and corresponds with the</para> 這個例子中的意思是不去編譯 profiled libraries效果就如同設定在
<filename>/etc/make.conf</filename> 的</para>
<programlisting>NO_PROFILE= true # Avoid compiling profiled libraries</programlisting> <programlisting>NO_PROFILE= true # Avoid compiling profiled libraries</programlisting>
<para>line in <filename>/etc/make.conf</filename>.</para> <para><replaceable>target</replaceable> 則是告訴 &man.make.1;
該去做哪些。 每個 <filename>Makefile</filename> 都會定義不同的
<para><replaceable>target</replaceable> tells &man.make.1; what <quote>targets</quote>,然後依您所給的 target 就會決定會做哪些動作
you want to do. Each <filename>Makefile</filename> defines a 。</para>
number of different <quote>targets</quote>, and your choice of
target determines what happens.</para>
<para>Some targets are listed in the <para>Some targets are listed in the
<filename>Makefile</filename>, but are not meant for you to run. <filename>Makefile</filename>, but are not meant for you to run.