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