aboutsummaryrefslogtreecommitdiff
path: root/zh_CN.GB2312/books
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2006-03-15 19:38:56 +0000
committerXin LI <delphij@FreeBSD.org>2006-03-15 19:38:56 +0000
commitb99e83b0a7c48690c2e6b7699bbd549e9a2c8da1 (patch)
tree61578f2c24f19d8d92ac0907829272ba8ae92e3e /zh_CN.GB2312/books
parentf266a6a31f7f22bbb73de28eccf694ca3317afaa (diff)
Notes
Diffstat (limited to 'zh_CN.GB2312/books')
-rw-r--r--zh_CN.GB2312/books/handbook/Makefile61
-rw-r--r--zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml160
-rw-r--r--zh_CN.GB2312/books/handbook/audit/chapter.sgml161
-rw-r--r--zh_CN.GB2312/books/handbook/basics/chapter.sgml106
-rw-r--r--zh_CN.GB2312/books/handbook/book.sgml32
-rw-r--r--zh_CN.GB2312/books/handbook/boot/chapter.sgml115
-rw-r--r--zh_CN.GB2312/books/handbook/chapters.ent3
-rw-r--r--zh_CN.GB2312/books/handbook/config/chapter.sgml152
-rw-r--r--zh_CN.GB2312/books/handbook/cutting-edge/chapter.sgml92
-rw-r--r--zh_CN.GB2312/books/handbook/desktop/chapter.sgml210
-rw-r--r--zh_CN.GB2312/books/handbook/disks/chapter.sgml575
-rw-r--r--zh_CN.GB2312/books/handbook/eresources/chapter.sgml10
-rw-r--r--zh_CN.GB2312/books/handbook/firewalls/chapter.sgml125
-rw-r--r--zh_CN.GB2312/books/handbook/geom/chapter.sgml105
-rw-r--r--zh_CN.GB2312/books/handbook/install/chapter.sgml75
-rw-r--r--zh_CN.GB2312/books/handbook/introduction/chapter.sgml4
-rw-r--r--zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml95
-rw-r--r--zh_CN.GB2312/books/handbook/l10n/chapter.sgml114
-rw-r--r--zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml143
-rw-r--r--zh_CN.GB2312/books/handbook/mac/chapter.sgml12
-rw-r--r--zh_CN.GB2312/books/handbook/mail/chapter.sgml92
-rw-r--r--zh_CN.GB2312/books/handbook/mirrors/Makefile2
-rw-r--r--zh_CN.GB2312/books/handbook/mirrors/chapter.sgml264
-rw-r--r--zh_CN.GB2312/books/handbook/multimedia/chapter.sgml77
-rw-r--r--zh_CN.GB2312/books/handbook/network-servers/chapter.sgml470
-rw-r--r--zh_CN.GB2312/books/handbook/pgpkeys/chapter.sgml959
-rw-r--r--zh_CN.GB2312/books/handbook/ports/chapter.sgml547
-rw-r--r--zh_CN.GB2312/books/handbook/ppp-and-slip/Makefile2
-rw-r--r--zh_CN.GB2312/books/handbook/ppp-and-slip/chapter.sgml15
-rw-r--r--zh_CN.GB2312/books/handbook/preface/preface.sgml11
-rw-r--r--zh_CN.GB2312/books/handbook/printing/chapter.sgml169
-rw-r--r--zh_CN.GB2312/books/handbook/security/chapter.sgml76
-rw-r--r--zh_CN.GB2312/books/handbook/serialcomms/chapter.sgml756
-rw-r--r--zh_CN.GB2312/books/handbook/users/chapter.sgml19
-rw-r--r--zh_CN.GB2312/books/handbook/x11/chapter.sgml29
35 files changed, 2889 insertions, 2949 deletions
diff --git a/zh_CN.GB2312/books/handbook/Makefile b/zh_CN.GB2312/books/handbook/Makefile
index 11fc62cd47..e10f5e63cc 100644
--- a/zh_CN.GB2312/books/handbook/Makefile
+++ b/zh_CN.GB2312/books/handbook/Makefile
@@ -3,7 +3,7 @@
#
# Build the FreeBSD Handbook (Simplified Chinese).
#
-# Original revision: 1.95
+# Original revision: 1.97
# ------------------------------------------------------------------------
#
@@ -223,43 +223,46 @@ DOC_PREFIX?= ${.CURDIR}/../../..
JADEFLAGS+= -V withpgpkeys
.endif
-.for p in ftp cvsup
-SRCS+= mirrors.sgml.${p}.inc
-CLEANFILES+= mirrors.sgml.${p}.inc
-CLEANFILES+= mirrors.sgml.${p}.inc.tmp
-.endfor
-
-SRCS+= eresources.sgml.www.inc
-CLEANFILES+= eresources.sgml.www.inc
-CLEANFILES+= eresources.sgml.www.inc.tmp
-
URL_RELPREFIX?= ../../../..
DOC_PREFIX?= ${.CURDIR}/../../..
+#
+# rules generating lists of mirror site from XML database.
+#
+XMLDOCS= mirrors-ftp:::mirrors.sgml.ftp.inc.tmp \
+ mirrors-cvsup:::mirrors.sgml.cvsup.inc.tmp \
+ eresources:::eresources.sgml.www.inc.tmp
+DEPENDSET.DEFAULT= transtable mirror
+XSLT.DEFAULT= ${XSL_MIRRORS}
+XML.DEFAULT= ${XML_MIRRORS}
+NO_TIDY.DEFAULT= yes
+
+PARAMS.mirrors-ftp+= --param 'type' "'ftp'" \
+ --param 'proto' "'ftp'" \
+ --param 'target' "'handbook/mirrors/chapter.sgml'"
+PARAMS.mirrors-cvsup+= --param 'type' "'cvsup'" \
+ --param 'proto' "'cvsup'" \
+ --param 'target' "'handbook/mirrors/chapter.sgml'"
+PARAMS.eresources+= --param 'type' "'www'" \
+ --param 'proto' "'http'" \
+ --param 'target' "'handbook/eresources/chapter.sgml'"
+
+SRCS+= mirrors.sgml.ftp.inc \
+ mirrors.sgml.cvsup.inc \
+ eresources.sgml.www.inc
+
+CLEANFILES+= mirrors.sgml.ftp.inc mirrors.sgml.ftp.inc.tmp \
+ mirrors.sgml.cvsup.inc mirrors.sgml.cvsup.inc.tmp \
+ eresources.sgml.www.inc eresources.sgml.www.inc.tmp
+
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
.for p in ftp cvsup
-mirrors.sgml.${p}.inc: ${XML_MIRRORS} ${XSL_MIRRORS}
- ${XSLTPROC} ${XSLTPROCOPTS} \
- -o $@.tmp \
- --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
- --param 'type' "'$p'" \
- --param 'proto' "'$p'" \
- --param 'target' "'handbook/mirrors/chapter.sgml'" \
- ${XSL_MIRRORS} ${XML_MIRRORS}
+mirrors.sgml.${p}.inc: mirrors.sgml.${p}.inc.tmp
${SED} -e 's,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,,'\
< $@.tmp > $@ || (${RM} -f $@ && false)
- ${RM} -f $@.tmp
.endfor
-eresources.sgml.www.inc: ${XML_MIRRORS} ${XSL_MIRRORS}
- ${XSLTPROC} ${XSLTPROCOPTS} \
- -o $@.tmp \
- --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
- --param 'type' "'www'" \
- --param 'proto' "'http'" \
- --param 'target' "'handbook/eresources/chapter.sgml'" \
- ${XSL_MIRRORS} ${XML_MIRRORS}
+eresources.sgml.www.inc: eresources.sgml.www.inc.tmp
${SED} -e 's,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,,'\
< $@.tmp > $@ || (${RM} -f $@ && false)
- ${RM} -f $@.tmp
diff --git a/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml b/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml
index 613e0de300..d4639c21b8 100644
--- a/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
- Original revision: 1.367
+ Original revision: 1.380
$FreeBSD$
-->
@@ -46,7 +46,7 @@
</listitem>
<listitem>
- <para>如何在 &os;5.X 下配置 ATM。</para>
+ <para>如何配置 ATM。</para>
</listitem>
</itemizedlist>
@@ -768,7 +768,7 @@ wi0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
我们使用 &man.sysctl.8; 来完成:</para>
<screen>&prompt.root; <userinput>sysctl net.link.ether.bridge.enable=1</userinput>
-&prompt.root; <userinput>sysctl net.link.ether.bridge.config="wi0,xl0"</userinput>
+&prompt.root; <userinput>sysctl net.link.ether.bridge.config="wi0 xl0"</userinput>
&prompt.root; <userinput>sysctl net.inet.ip.forwarding=1</userinput></screen>
<para>在 &os; 5.2 之前的版本中,
@@ -940,9 +940,9 @@ wi0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
密匙的无线审核工具,接入点检测等等。</para>
<para><application>bsd-airtools</application>
- 工具集可以从<filename
- role="package">net/bsd-airtools</filename> port
- 里安装。关于安装 ports 的信息可以在手册的
+ 工具集可以用<filename
+ role="package">net-mgmt/bsd-airtools</filename> port
+ 来安装。关于安装 ports 的信息可以在手册的
<xref linkend="ports"> 里找到。</para>
<para><command>dstumbler</command> 是一个用于接入点发现和显示音噪比
@@ -1001,7 +1001,7 @@ wi0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
</sect4>
<sect4>
- <title>802.11a & 802.11g 客户端</title>
+ <title>802.11a &amp; 802.11g 客户端</title>
<para>&man.ath.4; 设备驱动能够支持 802.11a 和 802.11g。
如果您的网卡采用的是 Atheros 芯片组, 就可以使用这个驱动。</para>
@@ -1053,7 +1053,7 @@ linuxemu/chapter.sgml -->
这一操作需要以 <username>root</username> 身份来完成:</para>
<screen>&prompt.root; <userinput>cd /usr/src/sys/modules/ndis</userinput>
-&prompt.root; <userinput>make && make install</userinput></screen>
+&prompt.root; <userinput>make &amp;&amp; make install</userinput></screen>
<para>找到您的卡所需的文件。 一般来说,
您应该能在随卡的 CD 或者制造商的网站上找到。
@@ -1090,7 +1090,7 @@ linuxemu/chapter.sgml -->
<para>最后, 就可以构建并安装内核模块了:</para>
- <screen>&prompt.root; <userinput>make && make install</userinput></screen>
+ <screen>&prompt.root; <userinput>make &amp;&amp; make install</userinput></screen>
<para>要使用驱动程序, 您需要加在适当的内核模块:</para>
@@ -1121,13 +1121,14 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen>
<sect1 id="network-bluetooth">
<sect1info>
<authorgroup>
- <author><firstname>Pav</firstname>
- <surname>Lucistnik</surname>
- <contrib>作者:</contrib>
- <affiliation>
- <address><email>pav@oook.cz</email></address>
- </affiliation>
- </author>
+ <author>
+ <firstname>Pav</firstname>
+ <surname>Lucistnik</surname>
+ <contrib>作者:</contrib>
+ <affiliation>
+ <address><email>pav@FreeBSD.org</email></address>
+ </affiliation>
+ </author>
</authorgroup>
<authorgroup>
<author>
@@ -1187,6 +1188,11 @@ ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3,
wMaxPacketSize=49, nframes=6, buffer size=294</screen>
+ <note>
+ <para>在 &os; 6.0, 以及 &os; 5.X 系列中 5.5 之前的版本上,
+ 蓝牙栈必须手动启动。 在 &os; 5.5、 6.1 以及更新一些的版本上,
+ 这一工作会由 &man.devd.8; 自动完成。</para>
+
<para>复制 <filename>/usr/share/examples/netgraph/bluetooth/rc.bluetooth</filename>
到一个合适的地方,如 <filename>/etc/rc.bluetooth</filename>。
这个脚本用于启动和停止 Bluetooth stack (蓝牙栈)。
@@ -1205,6 +1211,7 @@ Max. ACL packet size: 192 bytes
Number of ACL packets: 8
Max. SCO packet size: 64 bytes
Number of SCO packets: 8</screen>
+ </note>
</sect2>
@@ -1406,7 +1413,15 @@ c2e8bc80 0 250 00:02:72:00:d4:1a 00:07:e0:00:0b:ca 3 6 OPEN</scree
远端设备应该回应接收了结对并请求PIN码。输入与
<filename>hcsecd.conf</filename> 中一样的 PIN 码。
现在您的个人计算机已经与远程设备结对了。
- 另外您也可以在远程设备上初始结点。以下是简单的
+ 另外您也可以在远程设备上初始结点。</para>
+
+ <para>在 &os; 5.5、 6.1 以及更新版本上, 可以通过在
+ <filename>/etc/rc.conf</filename> 文件中增加下面的行, 以便让
+ <application>hcsecd</application> 在系统启动时自动运行:</para>
+
+ <programlisting>hcsecd_enable="YES"</programlisting>
+
+ <para>以下是简单的
<application>hcsecd</application> 服务输出样本:</para>
<programlisting>hcsecd[16484]: Got Link_Key_Request event from 'ubt0hci', remote bdaddr 0:80:37:29:19:a4
@@ -1475,7 +1490,20 @@ Bluetooth Profile Descriptor List:
<screen>&prompt.user; <userinput>sdpcontrol -a 00:01:03:fc:6e:ec search OPUSH</userinput></screen>
- <para>要在 &os; 里为蓝牙客户端提供服务,可以使用 &man.sdpd.8; 服务:</para>
+ <para>要在 &os; 里为蓝牙客户端提供服务,可以使用 &man.sdpd.8; 服务。
+ 在 &os; 5.5、 6.1 和更新版本之上, 可以通过在
+ <filename>/etc/rc.conf</filename> 中加入下面的行:</para>
+
+ <programlisting>sdpd_enable="YES"</programlisting>
+
+ <para>接下来使用下面的命令来启动 <application>sdpd</application> 服务:</para>
+
+ <screen>&prompt.root; <userinput>/etc/rc.d/sdpd start</userinput></screen>
+
+ <para>在 &os; 6.0, 以及 5.5 之前的 &os; 5.X 版本上,
+ <application>sdpd</application> 没有集成进系统启动脚本。
+ 它可以用下面的命令来手动启动:</para>
+
<screen>&prompt.root; <userinput>sdpd</userinput></screen>
<para>需要为远端提供蓝牙服务的本地的服务程序会使用本地 SDP
@@ -2390,7 +2418,7 @@ options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info
<programlisting>#!/bin/sh
export DESTDIR=/data/misc/diskless
mkdir -p ${DESTDIR}
-cd /usr/src; make world && make kernel
+cd /usr/src; make world &amp;&amp; make kernel
cd /usr/src/etc; make distribution</programlisting>
<para>一旦完成,您可能需要定制 <filename>/etc/rc.conf</filename>
@@ -2468,10 +2496,10 @@ host margaux {
<sect4>
<title><acronym>NFS</acronym> 与 &os; &amp;os 5.X 之间的 Swap(交换)</title>
- <para>这个内核在启动时并不支持启用 <acronym>NFS</acronym>。
- Swap 必须在启动脚本里启用,方法是装入一个可写的文件系统,
- 然后建立和启用交换文件。要建立一个适当大小的交换文件,
- 您可以这样做:</para>
+ <para>内核并不支持在引导时启用 <acronym>NFS</acronym>
+ 交换区。 交换区必须通过启动脚本启用, 其过程是挂接一个可写的文件系统,
+ 并在其上创建并启用交换文件。 要建立尺寸合适的交换文件,
+ 可以这样做:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=<replaceable>/path/to/swapfile</replaceable> bs=1k count=1 oseek=<replaceable>100000</replaceable></userinput></screen>
@@ -2854,6 +2882,11 @@ ISDN BRI line</literallayout>
Internet 路由器, 另一块用来连接 LAN。 所有 LAN
上的机器通过 Hub 或交换机进行连接。</para>
+ <note>
+ <para>有多种方法能够通过 &os; 网关将 LAN 接入 Internet。
+ 这个例子只介绍了有至少两块网卡的网关。</para>
+ </note>
+
<mediaobject>
<imageobject>
<imagedata fileref="advanced-networking/natd">
@@ -3072,7 +3105,7 @@ redirect_port tcp 192.168.0.3:80 80</programlisting>
</sect1>
<sect1 id="network-plip">
- <title>平行线 IP(PLIP)</title>
+ <title>并口电缆 IP (PLIP)</title>
<indexterm><primary>PLIP</primary></indexterm>
<indexterm>
@@ -3080,27 +3113,27 @@ redirect_port tcp 192.168.0.3:80 80</programlisting>
<see>PLIP</see>
</indexterm>
- <para>PLIP 允许我们在两个平行的端口间运行 TCP/IP。
- 这会在没有网卡的机子里有用,或安装在膝上电脑上。
- 这部分,我们将讨论:</para>
+ <para>PLIP 允许我们在两个并口间运行 TCP/IP。
+ 在使用笔记本电脑, 或没有网卡的计算机时, 这会非常有用。
+ 这一节中, 我们将讨论:</para>
<itemizedlist><listitem>
- <para>制作并口的 (laplink) 线缆。</para>
+ <para>制作用于并口的 (laplink) 线缆。</para>
</listitem>
<listitem>
- <para>使用 PLIP 连接两台机子。</para>
+ <para>使用 PLIP 连接两台计算机。</para>
</listitem></itemizedlist>
<sect2 id="network-create-parallel-cable">
<title>制作并口电缆。</title>
<para>您可以在许多计算机供应店里买到并口电缆。
- 如果不行或您想知道怎么做线,
- 下面的表格就显示了如何利用普通的打印机并口线做一根:</para>
+ 如果买不到, 或者希望自行制作, 则可以参阅下面的表格,
+ 它介绍了如何利用普通的打印机并口电缆来改制:</para>
<table frame="none">
- <title>为网络配平行线</title>
+ <title>用于网络连接的并口电缆接线方式</title>
<tgroup cols="5"><thead><row><entry>A-name</entry>
@@ -3184,46 +3217,38 @@ redirect_port tcp 192.168.0.3:80 80</programlisting>
lpt0: &lt;Printer&gt; on ppbus0
lpt0: Interrupt-driven port</screen>
- <para>平行端口必须是一个中断驱动的端口,在 &os; 4.X
+ <para>并口必须是一个中断驱动的端口,在 &os; 4.X
里,您的内核配置文件应该有一行和下面的差不多:</para>
<programlisting>device ppc0 at isa? irq 7</programlisting>
- <para>在 &os; 5.X 里,文件 <filename>/boot/device.hints</filename>
- 应该包括下面几行:</para>
+ <para>在 &os;&nbsp;5.X 中,
+ <filename>/boot/device.hints</filename> 文件中应包含下面的行:</para>
- <programlisting>hint.ppc.0.at="isa" hint.ppc.0.irq="7"</programlisting>
+ <programlisting>hint.ppc.0.at="isa"
+hint.ppc.0.irq="7"</programlisting>
- <para>然后,检查看内核配置文件里是否有 <literal>device plip</literal>
- 行或是否装载了 <filename>plip.ko</filename> 内核模块。两种情况下,
- 在您直接使用 &man.ifconfig.8; 命令时,应该有平行的网络接口显示。在
- &os; 4.X 里,就象这样:</para>
-
- <screen>&prompt.root; <userinput>ifconfig lp0</userinput>
-lp0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; mtu 1500</screen>
-
- <para>而对于 &os; 5.X: 应该是:</para>
+ <para>然后检查内核配置文件中是否有一行
+ <literal>device plip</literal> 或加载了
+ <filename>plip.ko</filename> 内核模块。
+ 这两种情况下, 在使用 &man.ifconfig.8; 命令时都会显示并口对应的网络接口,
+ 类似这样:</para>
<screen>&prompt.root; <userinput>ifconfig plip0</userinput>
plip0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; mtu 1500</screen>
- <note><para>用于平行接口的设备名在 &os; 4.X
- (<devicename>lp<replaceable>X</replaceable></devicename>)
- 和 &os; 5.X (<devicename>plip<replaceable>X</replaceable></devicename>)
- 是不相同的。</para></note>
-
- <para>插入 laplink 线到两台计算机的平行接口里。</para>
+ <para>用 laplink 线接通两台计算机的并口。</para>
- <para>在两边以 <username>root</username> 身份配置网络接口参数。
- 例如,如果您想让运行着 &os; 4.X 的主机 <hostid>host1</hostid>
- 连接到运行着 &os; 5.X 的主机 <hostid>host2</hostid>:</para>
+ <para>在两边以 <username>root</username> 身份配置通讯参数。
+ 例如, 如果你希望将 <hostid>host1</hostid> 通过另一台机器 <hostid>host2</hostid>
+ 连接:</para>
<programlisting> host1 &lt;-----&gt; host2
IP Address 10.0.0.1 10.0.0.2</programlisting>
<para>配置 <hostid>host1</hostid> 上的网络接口,照此做:</para>
- <screen>&prompt.root; <userinput>ifconfig lp0 10.0.0.1 10.0.0.2</userinput></screen>
+ <screen>&prompt.root; <userinput>ifconfig plip0 10.0.0.1 10.0.0.2</userinput></screen>
<para>配置 <hostid>host2</hostid> 上的网络接口,照此做:</para>
@@ -3242,15 +3267,15 @@ IP Address 10.0.0.1 10.0.0.2</programlisting>
<para>要确认连接是否工作,可以到每一台机子上,然后
ping 另外一台。例如,在 <hostid>host1</hostid> 上:</para>
- <screen>&prompt.root; <userinput>ifconfig lp0</userinput>
-lp0: flags=8851&lt;UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
+ <screen>&prompt.root; <userinput>ifconfig plip0</userinput>
+plip0: flags=8851&lt;UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 10.0.0.1 --&gt; 10.0.0.2 netmask 0xff000000
&prompt.root; <userinput>netstat -r</userinput>
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
-host2 host1 UH 0 0 lp0
+host2 host1 UH 0 0 plip0
&prompt.root; <userinput>ping -c 4 host2</userinput>
PING host2 (10.0.0.2): 56 data bytes
64 bytes from 10.0.0.2: icmp_seq=0 ttl=255 time=2.774 ms
@@ -3312,11 +3337,14 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
<para>在 1990 年代早期, 人们开始担心可用的 IPv4 地址空间在不断地缩小。 随着
Internet 的爆炸式发展, 主要的两个担心是:</para>
- <itemizedlist><listitem>
- <para>所有的 IP 地址用光。今天不再那么当心了,
- 因为有私有地址空间 (<hostid role="ipaddr">10.0.0.0/8</hostid>、
- <hostid role="ipaddr">192.168.0.0/24</hostid> 等等)
- 和网络地址转换 (<acronym>NAT</acronym>) 可以利用。</para>
+ <itemizedlist>
+ <listitem>
+ <para>用尽所有的地址。 当然现在这个问题已经不再那样尖锐,
+ 因为 RFC1918 私有地址空间
+ (<hostid role="ipaddr">10.0.0.0/8</hostid>、
+ <hostid role="ipaddr">172.16.0.0/12</hostid>, 以及
+ <hostid role="ipaddr">192.168.0.0/16</hostid>)
+ 和网络地址转换 (<acronym>NAT</acronym>) 技术已经被广泛采用。</para>
</listitem>
<listitem>
@@ -3561,8 +3589,8 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
<screen>&prompt.root; <userinput>ifconfig gif0 create</userinput>
&prompt.root; <userinput>ifconfig gif0</userinput>
gif0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1280
-&prompt.root; <userinput>ifconfig gif0 tunnel <replaceable>MY_IPv4_ADDR</replaceable> <replaceable>HIS_IPv4_ADDR</replaceable></userinput>
-&prompt.root; <userinput>ifconfig gif0 inet6 alias <replaceable>MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR</replaceable></userinput></screen>
+&prompt.root; <userinput>ifconfig gif0 tunnel <replaceable>MY_IPv4_ADDR MY_IPv4_REMOTE_TUNNEL_ENDPOINT_ADDR</replaceable></userinput>
+&prompt.root; <userinput>ifconfig gif0 inet6 alias <replaceable>MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR MY_IPv6_REMOTE_TUNNEL_ENDPOINT_ADDR</replaceable></userinput></screen>
<para>把大写字母换成您从上一级 6bone 节点收到的信息。</para>
@@ -3738,7 +3766,7 @@ gif0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1280
</authorgroup>
</sect1info>
- <title>&os; 5.X 上的 ATM</title>
+ <title>异步传输模式 (ATM)</title>
<sect2>
<title>配置 classical IP over ATM (PVCs)</title>
diff --git a/zh_CN.GB2312/books/handbook/audit/chapter.sgml b/zh_CN.GB2312/books/handbook/audit/chapter.sgml
index af283e8a07..1ae18d490e 100644
--- a/zh_CN.GB2312/books/handbook/audit/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/audit/chapter.sgml
@@ -2,19 +2,11 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.5
+ Original Revision: 1.13
$FreeBSD$
-->
-<!--
-This version of the document assumes that the Audit system needs to be
-installed as part of the trustedbsd/audit project. When/if audit becomes
-part of FreeBSD proper, then these sections should be removed, or at least
-reworded. The sections in question are marked with 'PROTOTYPE' labels in
-commentary.
--->
-
-<!-- Need more documenation on praudit, audtreduce, etc. Plus more info
+<!-- Need more documentation on praudit, auditreduce, etc. Plus more info
on the triggers from the kernel (log rotation, out of space, etc).
And the /dev/audit special file if we choose to support that. Could use
some coverage of integrating MAC with Event auditing and perhaps discussion
@@ -32,21 +24,28 @@ requirements. -->
</authorgroup>
</chapterinfo>
- <title>内核事件审计</title>
+ <title>安全事件审计</title>
<sect1 id="audit-synopsis">
<title>概述</title>
<indexterm><primary>AUDIT</primary></indexterm>
<indexterm>
- <primary>内核事件审计</primary>
+ <primary>安全事件审计</primary>
<see>MAC</see>
</indexterm>
- <para>在 &os;&nbsp;6.0 操作系统的发行版本中, 包含了基于 &posix;.1e 草案,
- 以及 &sun; <acronym>BSM</acronym> 实现的事件审计机制。
- 事件审计功能使得选择性地记录与安全有关的系统事件成为可能,
- 而这些日志可以帮助人们完成系统分析、 监视, 以及安全评估等工作。</para>
+ <para>在 &os;&nbsp;7-CURRENT 开发分支上包含了对于基于 &posix;.1e 草案,
+ Sun 所发布的 <acronym>BSM</acronym> API 及文件格式的时间审计支持。
+ 事件审计功能, 使得选择性地对涉及安全的系统事件进行记录成为可能,
+ 这可进一步为出现问题之后的验尸式分析、 系统监控, 以及入侵检测所用。
+ 经过在 &os;&nbsp;7-CURRENT 中一段时间的沉淀之后,
+ 这一支持将被合并到 &os;&nbsp;6-STABLE 并出现在之后的发行版中。</para>
+
+ <warning>
+ <para>FreeBSD 中的审计机制目前还是试验性的, 只有在仔细考量部署风险之后,
+ 才应在生产系统上部署这一试验性的软件。</para>
+ </warning>
<para>这一章将主要关注与安装和配置事件审计机制。
同时, 为了方便读者, 也介绍了审计策略,
@@ -90,7 +89,7 @@ requirements. -->
<para>在 &os; 中的事件审计机制, 与 &sun; 的基本安全模块,
即 <acronym>BSM</acronym> 库类似。 因此, 这些配置与 &solaris;
- 和 Darwin 操作系统之间可以完全互换。</para>
+ 和 Mac OS X/Darwin 操作系统之间可以完全互换。</para>
</sect1>
<sect1 id="audit-inline-glossary">
@@ -101,21 +100,40 @@ requirements. -->
<itemizedlist>
<listitem>
- <para><emphasis>类</emphasis>(class): 类用于区分系统中不同的动作类型。
- 例如, 使用 &man.login.1; 这一行为就可以放在一个类里。</para>
+ <para><emphasis>事件 (event)</emphasis>:
+ 可审计事件是指能够被审计子系统记录的事件。
+ 管理员可以配置审计哪些事件。 举例说来, 与安全有关的事件包括创建文件、
+ 建立网络连接, 以及以某一用户身份登录, 等等。
+ 任何事件必属于 <quote>有主 (attributable)</quote>,
+ 即可以最终归于某一用户身份, 或 <quote>无主(non-attributable)</quote>
+ 二者之一。 举例而言, 无主事件可以是任何发生在登录过程成功之前的事件,
+ 例如失败的登录尝试, 等等。</para>
</listitem>
<listitem>
- <para><emphasis>事件</emphasis>(event): 可以把事件理解为发生在系统中的动作。
- 例如, 创建文件就是一个事件。</para>
+ <para><emphasis>类 (class)</emphasis>: 事件可以指定为一个或多个类,
+ 通常这是基于事件的一般类别来进行的, 例如 <quote>创建文件</quote>、
+ <quote>访问文件</quote>, 或 <quote>网络</quote>。 登录和注销事件,
+ 则指定为 <literal>lo</literal> 类。 通过使用类,
+ 管理员能够指定更高层次的审计规则,
+ 而无需一一指定每个需要进行记录的可审计操作。</para>
</listitem>
<listitem>
- <para><emphasis>记录</emphasis>(record): 记录是关于某一特定动作的日志内容。</para>
+ <para><emphasis>记录 (record)</emphasis>: 记录是描述安全事件的一个日志项。
+ 典型的记录包括记录事件类型、 与事件有关的主体 (用户) 信息、
+ 时间信息、 相关的任何对象信息, 以及事件所关联的操作是否成功的信息。</para>
</listitem>
<listitem>
- <para><emphasis>前缀</emphasis>(prefix): 前缀指用于切换成功和失败审计事件的配置单元。</para>
+ <para><emphasis>账目 (trail)</emphasis>: 审计账目, 或日志文件,
+ 包含了一系列描述安全事件的审计记录。 典型情况下,
+ 审计账目基本上是以事件发生的时间顺序记录的。 只有获得授权的进程,
+ 才能够向审计账目中提交记录。</para>
+
+ <listitem>
+ <para><emphasis>前缀 (prefix)</emphasis>:
+ 前缀是指被用来开关对成功和失败事件审计的配置元素。</para>
</listitem>
</itemizedlist>
</sect1>
@@ -147,8 +165,8 @@ requirements. -->
<sect1 id="audit-config">
<title>对审计进行配置</title>
- <para>默认情况下, 所有配置都可以通过
- <filename role="directory">/etc/security</filename> 下的文件来完成。
+ <para>所有用于安全审计的配置文件, 都可以在
+ <filename role="directory">/etc/security</filename> 找到。
要启动审计服务, 下面这些文件必须存在:</para>
<itemizedlist>
@@ -168,20 +186,16 @@ requirements. -->
<listitem>
<para><filename>audit_user</filename> - 针对特定用户进行的事件审计。
- 用户名在这里并不必须出现。</para>
+ 没有在此处指定的用户, 则按控制配置文件中的默认配置处理。</para>
</listitem>
<listitem>
- <para><filename>audit_warn</filename> - 用于 auditd 生成警告信息的
- shell 脚本。</para>
+ <para><filename>audit_warn</filename> - 由 auditd 调用,
+ 用于在意外情况, 如用于记录审计事件的空间过低时发出警告的 shell
+ 脚本。</para>
</listitem>
</itemizedlist>
- <para>如果由于某些原因这些文件并不存在,
- 则可以很容易地用下列命令来安装:</para>
-
- <screen>&prompt.root; <userinput>cd /usr/src/contrib/bsm/etc &amp;&amp; make install</userinput></screen>
-
<sect2>
<title>审计文件的语法</title>
@@ -259,8 +273,8 @@ requirements. -->
</listitem>
<listitem>
- <para><option>ip</option> - <literal>ipc</literal> - 审计
- System V <acronym>IPC</acronym> 操作。</para>
+ <para><option>ip</option> - <literal>ipc</literal> - 审计各种形式的进程间通信 (IPC),
+ 包括 POSIX 管道和 System V <acronym>IPC</acronym> 操作。</para>
</listitem>
<listitem>
@@ -294,11 +308,6 @@ requirements. -->
审计进程操作, 例如 &man.exec.3; 和
&man.exit.3;。</para>
</listitem>
-
- <listitem>
- <para><option>tf</option> - <literal>tfm</literal> -
- I HAVE NO CLUE!</para>
- </listitem>
</itemizedlist>
<para>下面是全部支持的审计前缀:</para>
@@ -343,10 +352,10 @@ requirements. -->
<sect2>
<title>配置文件</title>
- <para>配置是在两个文件中进行设置的。 第一个文件是
- <filename>audit_control</filename> 而第二个是
- <filename>audit_user</filename>。 第一个文件是系统级的,
- 用于控制系统中的所有事件统计。 而后一个则可以实现细粒度的用户级审计。</para>
+ <para>多数情况下, 在配置审计系统时,
+ 管理员只需修改两个文件: <filename>audit_control</filename>
+ 和 <filename>audit_user</filename>。 第一个文件控制系统级的审计参数,
+ 以及所有有主或无主事件的默认参数。 第二个文件用于调整针对具体用户的审计级别和性质。</para>
<sect3 id="audit-auditcontrol">
<title>传说中的 <filename>audit_control</filename> 文件</title>
@@ -356,14 +365,19 @@ requirements. -->
察看这个文件的内容, 我们会发现:</para>
<programlisting>dir:/var/audit
-flags:lo,ad,-all,^-fa,^-fc,^-cl
+flags:lo
minfree:20
naflags:lo</programlisting>
- <para>这里的 <option>dir</option> 表示默认存放审计日志的目录。</para>
+ <para>这里的 <option>dir</option> 用于设置审计日志的默认存放目录。
+ 审计通常都会配置为保存在一个专用的文件系统之下,
+ 以避免审计系统与其它子系统在文件系统满的时候所产生的冲突。
+ </para>
- <para><option>flags</option> 则用来设置系统级的默认。
- 目前的设置, 即
+ <para><option>flags</option> 选项则用来设置系统级的默认。
+ 目前的设置, 即 <option>lo</option>
+ 配置审计所有的 &man.login.1; 和 &man.logout.1;
+ 动作。 而更为复杂的例子,
<option>lo,ad,-all,^-fa,^-fc,^-cl</option> 表示审计所有的系统
&man.login.1; 和 &man.logout.1; 动作、 所有管理动作,
以及所有系统中失败的动作, 但最后禁用对 <option>fa</option>、
@@ -382,16 +396,15 @@ naflags:lo</programlisting>
<filename role="directory">/var</filename> 文件系统有八成
(80) 空间被填满时将会给出警告消息。</para>
- <para><option>naflags</option> 参数用于指定不可归类的审计标志;
- 比如说, 无法归类于系统上某一特定用户的事件类。 这可以通过在
- <filename>audit_user</filename> 配置文件中的设置来改变。</para>
+ <para><option>naflags</option> 参数用于指定无主事件 &mdash;
+ 也就是那些并不与特定用户关联的事件的审计。
+ </para>
</sect3>
<sect3 id="audit-audituser">
<title><filename>audit_user</filename> 文件</title>
- <para><filename>audit_user</filename> 允许管理员将某些事件直接映射到特定用户。
- 这提供了针对所有系统用户的精细控制机制。</para>
+ <para><filename>audit_user</filename> 文件允许管理员决定哪些系统用户所产生的哪些类的事件应被记录在案。</para>
<para>下面是 <filename>audit_user</filename> 文件中的一些默认值:</para>
@@ -414,15 +427,16 @@ audit:fc:no</programlisting>
<sect1 id="audit-administration">
<title>管理事件审计</title>
- <para>来自 <command>auditd</command> 服务的数据,
- 并不能以普通的文本形式进行修改或阅读。 数据以类似 &man.ktrace.1;
- 和 &man.kdump.1 的形式存储, 也就是说, 只能通过
- <command>praudit</command> 或 <command>auditreduce</command>
- 工具来查看它们。</para>
+ <para>由内核审计子系统写出的事件, 并不能以普通文本的形式加以修改或阅读。
+ 这些数据以类似 &man.ktrace.1; 和 &man.kdump.1; 那样的方式来存储和访问,
+ 也就是说, 只能通过使用
+ <command>praudit</command> 命令执行转存操作才能察看它们;
+ 审计账目可以通过 <command>auditreduce</command> 命令来减少,
+ 它能够根据您感兴趣的属性, 例如用户、 事件发生的时间,
+ 以及操作类型来选择查询记录。</para>
- <para>所提供的两个工具是为了不同的用途而准备的。
- 例如, <command>praudit</command> 将转存整个事件日志的内容,
- 并保存成普通的文本文件。 要将整个审计日志转存, 可使用:</para>
+ <para>例如, <command>praudit</command> 能够将选定审计日志的完整内容,
+ 转存为普通的文本文件。 要将整个审计日志转存, 可使用:</para>
<screen>&prompt.root; <userinput>praudit /var/audit/AUDITFILE</userinput></screen>
@@ -432,7 +446,7 @@ audit:fc:no</programlisting>
要达到这个目的, 可以使用下面的命令,
这里我们选择的用户是 <username>trhodes</username>:</para>
- <screen>&prompt.root; <userinput>auditreduce -e trhodes /var/audit/AUDITFILE</userinput></screen>
+ <screen>&prompt.root; <userinput>auditreduce -e trhodes /var/audit/AUDITFILE | praudit</userinput></screen>
<para>这将选择保存在 <replaceable>AUDITFILE</replaceable> 中的所有由
<username>trhodes</username> 产生的审计日志。</para>
@@ -443,11 +457,13 @@ audit:fc:no</programlisting>
<sect2>
<title>审计日志文件的轮转</title>
- <para>手工轮转日志文件将给系统造成混乱。 因此, 在
- &man.newsyslog.conf.5; 中加入一行配置是不起作用的。
- 那么如何让日志轮转呢? 这可以通过给
- <command>audit</command> 适当的参数来关闭事件审计,
- 并安全地完成轮转操作。 下面的命令将为管理员完成全部所需的操作:</para>
+ <para>由于日志可靠性的要求, 审计计账只由内核写入, 且只能由
+ <command>auditd</command> 管理。 管理员不应尝试使用 &man.newsyslog.conf.5;
+ 或其它工具来完成审计日志的轮转工作。 您应使用 <command>audit</command>
+ 管理工具来关闭审计、 重新配置审计系统, 并完成日志轮转。
+ 下面的命令将让审计服务创建新的审计日志,
+ 并发信号给内核要求其使用新的日志。 旧日志将终止并被改名,
+ 此时, 管理员就可以操作它了。</para>
<screen>&prompt.root; <userinput>audit -n</userinput></screen>
@@ -463,5 +479,16 @@ audit:fc:no</programlisting>
<para>这些修改会在您保存 <filename>/etc/crontab</filename> 后生效。</para>
</sect2>
+
+ <sect2>
+ <title>为其它用户指派审计复审权限</title>
+
+ <para>默认情况下, 只有 root 用户拥有读取系统审计日志的权限。
+ 但您也可以将这种权限通过
+ <literal>audit</literal> 组的成员身份来指定给其它用户,
+ 因为审计目录和记账文件都是属于这个组的, 而且是同组可读的。
+ 由于阅读审计日志的内容会提供关于用户和进程的大量行为信息,
+ 强烈建议在指派这一权限时谨慎行事。</para>
+ </sect2>
</sect1>
</chapter>
diff --git a/zh_CN.GB2312/books/handbook/basics/chapter.sgml b/zh_CN.GB2312/books/handbook/basics/chapter.sgml
index 89af406ef8..fa4dd9e668 100644
--- a/zh_CN.GB2312/books/handbook/basics/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/basics/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.137
+ Original Revision: 1.143
$FreeBSD$
-->
@@ -24,7 +24,7 @@
<title>概述</title>
<para>下列章节的命令和功能适用于FreeBSD操作系统。
- 同时这里许多内容和一些 &unix; 类似操作系统相关。
+ 同时这里许多内容和一些 类-&unix; 操作系统相关。
假如您已经熟悉这些内容可跳过不阅读。
假如您是FreeBSD新手, 那您应该认真详细地从头到尾读一遍这些章节。</para>
@@ -131,7 +131,7 @@ login:</screen>
谁都可以同时在单一结构下运行大量的程序。</para>
<para>每一个多用户系统都必须在某方面去区别<quote>user</quote>,
- 在FreeBSD里 (和这&unix; 类似的操作系统),完成这方面工作是有必要的,
+ 在FreeBSD里 (以及 类-&unix; 操作系统),完成这方面工作是有必要的,
每位使用者在运行程之前都必须<quote>登录</quote>,
每位用户都有他的用户名 (<quote>username</quote>) 和密码
(<quote>password</quote>)。
@@ -548,7 +548,7 @@ total 530
<para>文件标志可以通过使用 &man.chflags.1; 工具来修改,
其用户界面很简单。 例如, 要在文件 <filename>file1</filename>
- 上应用系统禁删标志, 应适用下述命令:</para>
+ 上应用系统禁删标志, 应使用下述命令:</para>
<screen>&prompt.root; <userinput>chflags sunlink <filename>file1</filename></userinput></screen>
@@ -586,6 +586,7 @@ total 530
这个根目录同样包含了想要挂接的每一个文件系统。</para>
<para>挂接点 (mount point) 是新增的文件系统在接入现有系统时的起点位置。
+ 在 <xref linkend="disk-organization"> 对此进行了详细的阐述。
标准的挂接点包括
<filename>/usr</filename>、 <filename>/var</filename>、 <filename>/tmp</filename>、
<filename>/mnt</filename>, 以及 <filename>/cdrom</filename>。
@@ -609,7 +610,7 @@ total 530
<entry>介绍</entry>
</row>
</thead>
- <tbody>
+ <tbody valign="top">
<row>
<entry><filename class="directory">/</filename></entry>
<entry>文件系统的根目录。</entry>
@@ -699,13 +700,19 @@ total 530
<row>
<entry><filename class="directory">/stand/</filename></entry>
- <entry>持久独一无二的程序环境。</entry>
+ <entry>独立的程序环境。</entry>
</row>
<row>
<entry><filename class="directory">/tmp/</filename></entry>
- <entry>存放临时文件,通常存放一些系统重启后不需要保护的 &man.mfs.8;
- 基于内存的文件系统。</entry>
+ <entry>临时文件。
+ <filename class="directory">/tmp</filename> 目录中的内容,
+ 一般不会在系统重新启动之后保留。 通常会将基于内存的文件系统挂在
+ <filename class="directory">/tmp</filename> 上。
+ 这一工作可以用一系列 tmpmfs 相关的 &man.rc.conf.5; 变量来自动完成。
+ (或者, 也可以在
+ <filename>/etc/fstab</filename> 增加对应项; 参见 &man.mdmfs.8;,
+ 或者, 如果是 FreeBSD&nbsp;4.X, &man.mfs.8;)。</entry>
</row>
@@ -789,8 +796,13 @@ total 530
<row>
<entry><filename class="directory">/var/</filename></entry>
- <entry>存放多用途记录、临时性、短期的和打印假脱机系统文件.
- </entry>
+ <entry>多用途日志、 临时或短期存放的, 以及打印假脱机系统文件。
+ 有时会将基于内存的文件系统挂在
+ <filename class="directory">/var</filename> 上。
+ 这一工作可以通过在 &man.rc.conf.5; 中设置一系列 varmfs 变量
+ (或在
+ <filename>/etc/fstab</filename> 中加入一行配置; 参见 &man.mdmfs.8;,
+ 或者, 如果您用 FreeBSD&nbsp;4.X 则是 &man.mfs.8;) 来完成。</entry>
</row>
@@ -812,7 +824,9 @@ total 530
<row>
<entry><filename class="directory">/var/tmp/</filename></entry>
- <entry>存放系统重启前受控制的临时文件。</entry>
+ <entry>临时文件。 这些文件在系统重新启动时通常会保留,
+ 除非 <filename class="directory">/var</filename>
+ 是一个内存中的文件系统。</entry>
</row>
<row>
@@ -1014,7 +1028,7 @@ total 530
<itemizedlist>
<title>多样性文件系统的益处</title>
-
+
<listitem>
<para>不同的文件系统可用不同的 <firstterm>挂接参数</firstterm>。
举些例子, 仔细想一下, 根文件系统能用只读的方式挂接上,
@@ -1089,7 +1103,7 @@ total 530
</row>
</thead>
- <tbody>
+ <tbody valign="top">
<row>
<entry><literal>a</literal></entry>
@@ -1145,8 +1159,8 @@ total 530
<para>Slices, <quote>专项指定</quote> 物理驱动器,
和其他驱动器都包含<firstterm>partitions</firstterm>,
- 那几个的partitions都是用字母
- 从 <literal>a</literal> 到 <literal>h</literal>来标定的,
+ 那几个的partitions都是用字母从 <literal>a</literal>
+ 到 <literal>h</literal>来标定的,
而这些字母都在驱动器名字之后,所以
<quote>da0<emphasis>a</emphasis></quote> 是指首个da设备的 a partition,
而那个就是 <quote>专项指定</quote>。
@@ -1154,27 +1168,24 @@ total 530
</para>
<para>最终,每个磁盘都被系统识别。
- 一个磁盘名字是用磁盘类型代码和编号来标识的,
- 它不像slices,磁盘的编号是由0开始的。
- 对应代码请看这里所列出的<xref linkend="basics-dev-codes">。
- </para>
+ 一个磁盘名字是用磁盘类型代码和编号来标识的,
+ 它不像slices,磁盘的编号是由0开始的。
+ 对应代码请看这里所列出的<xref linkend="basics-dev-codes">。</para>
<para>当提供一个partition名字给FreeBSD时,
- slice 和 磁盘所必须有这个partition,还应当提供所partition所涉及
- 到的slice和磁盘的名字。可这样列出:
+ slice 和 磁盘所必须有这个partition,还应当提供所partition所涉及
+ 到的slice和磁盘的名字。可这样列出:
磁盘名称,<literal>s</literal>,slice 编号,和partition标定字母。
- 例子请看这里
+ 例子请看
<xref linkend="basics-disk-slice-part">。</para>
<para><xref linkend="basics-concept-disk-model">
- 这里显示了一个磁盘的布局,有更清楚的帮助。
- </para>
+ 这里显示了一个磁盘的布局,有更清楚的帮助。</para>
<para>在安装FreeBSD时,您首先要配置好磁盘slices,
- 然后在FreeBSD使用的slice上建立partitions。
- 并在每个partition上建立一个文件系统(或交换分区),
- 和指定文件系统的挂接位置。
- </para>
+ 然后在FreeBSD使用的slice上建立partitions。
+ 并在每个partition上建立一个文件系统(或交换分区),
+ 和指定文件系统的挂接位置。</para>
<table frame="none" pgwide="1" id="basics-dev-codes">
<title>磁盘设备的代码</title>
@@ -1267,20 +1278,16 @@ total 530
<example id="basics-concept-disk-model">
<title>一个磁盘的布局</title>
- <para>
- 从在系统里的首个IDE磁盘图表可以显示出FreeBSD的见解。
- 假设磁盘大小为4&nbsp;GB,它里面包含了两个2&nbsp;GB 大小的slices (但在&ms-dos;叫partitions)。
- 首个slice是一个&ms-dos;磁盘叫<devicename>C:</devicename>,
- 而第二个slice是FreeBSD配置好的slice。
- FreeBSD配置好的slice有三个partitions和另一个交换分区。
- </para>
+ <para>从在系统里的首个IDE磁盘图表可以显示出FreeBSD的见解。
+ 假设磁盘大小为4&nbsp;GB,它里面包含了两个2&nbsp;GB 大小的slices (但在&ms-dos;叫partitions)。
+ 首个slice是一个&ms-dos;磁盘叫<devicename>C:</devicename>,
+ 而第二个slice是FreeBSD配置好的slice。
+ FreeBSD配置好的slice有三个partitions和另一个交换分区。</para>
- <para>
- 这三个partitions各自控制一个文件系。
- partition<literal>a</literal>用于根文件系统,
- partition<literal>e</literal>用于<filename>/var</filename>目录层,
- partition<literal>f</literal>用于<filename>/usr</filename>目录层。
- </para>
+ <para>这三个partitions各自控制一个文件系。
+ partition<literal>a</literal>用于根文件系统,
+ partition<literal>e</literal>用于<filename>/var</filename>目录层,
+ partition<literal>f</literal>用于<filename>/usr</filename>目录层。</para>
<mediaobject>
<imageobject>
@@ -1291,25 +1298,25 @@ total 530
<literallayout class="monospaced">.-----------------. --.
| | |
| DOS / Windows | |
-: : > First slice, ad0s1
+: : &gt; First slice, ad0s1
: : |
| | |
:=================: ==: --.
| | | Partition a, mounted as / |
-| | > referred to as ad0s2a |
+| | &gt; referred to as ad0s2a |
| | | |
:-----------------: ==: |
| | | Partition b, used as swap |
-| | > referred to as ad0s2b |
+| | &gt; referred to as ad0s2b |
| | | |
:-----------------: ==: | Partition c, no
-| | | Partition e, used as /var > filesystem, all
-| | > referred to as ad0s2e | of FreeBSD slice,
+| | | Partition e, used as /var &gt; file system, all
+| | &gt; referred to as ad0s2e | of FreeBSD slice,
| | | | ad0s2c
:-----------------: ==: |
| | | |
: : | Partition f, used as /usr |
-: : > referred to as ad0s2f |
+: : &gt; referred to as ad0s2f |
: : | |
| | | |
| | --' |
@@ -2012,9 +2019,6 @@ Swap: 256M Total, 38M Used, 217M Free, 15% Inuse
<screen>&prompt.user; <userinput>chsh -s /usr/local/bin/bash</userinput></screen>
- <para>运行<command>chsh</command> 不加参数只编辑shell也会达到相同的效果。
- </para>
-
<note>
<para>您使用的shells<emphasis>必须</emphasis>
在<filename>/etc/shells</filename> 文件里列出。 假如您从
@@ -2117,7 +2121,7 @@ Swap: 256M Total, 38M Used, 217M Free, 15% Inuse
&prompt.root; <userinput>sh MAKEDEV ad1</userinput>
</screen>
- <para>这个是一个例子,在安装等二个IDE设备时去建立设备节点。</para>
+ <para>这个是一个例子,在安装第二个IDE设备时去建立设备节点。</para>
</sect3>
<sect3>
diff --git a/zh_CN.GB2312/books/handbook/book.sgml b/zh_CN.GB2312/books/handbook/book.sgml
index c4d9bbce91..57d826c8a9 100644
--- a/zh_CN.GB2312/books/handbook/book.sgml
+++ b/zh_CN.GB2312/books/handbook/book.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Documentation Project
- Original Revision: 1.162
+ Original Revision: 1.164
$FreeBSD$
-->
@@ -48,6 +48,7 @@
<!ENTITY % chap.index "IGNORE">
<!ENTITY % chap.freebsd-glossary "IGNORE">
<!ENTITY % chap.mac "IGNORE">
+<!ENTITY % chap.audit "IGNORE">
<!ENTITY % pgpkeys SYSTEM "../../../share/pgpkeys/pgpkeys.ent"> %pgpkeys;
]>
@@ -57,8 +58,8 @@
<title>FreeBSD 使用手册</title>
<corpauthor>The FreeBSD Documentation Project</corpauthor>
- <corpauthor>FreeBSD 中文化项目</corpauthor>
- <pubdate>1999年,二月</pubdate>
+
+ <pubdate>1999 年 2 月</pubdate>
<copyright>
<year>1995</year>
@@ -72,9 +73,21 @@
<year>2003</year>
<year>2004</year>
<year>2005</year>
+ <year>2006</year>
<holder>The FreeBSD Documentation Project</holder>
</copyright>
+ <corpauthor>&cnproj.freebsd.org;</corpauthor>
+ <pubdate>2005 年 12 月</pubdate>
+
+ <copyright>
+ <year>2003</year>
+ <year>2004</year>
+ <year>2005</year>
+ <year>2006</year>
+ <holder>&cnproj.freebsd.org;</holder>
+ </copyright>
+
&bookinfo.legalnotice;
<legalnotice id="trademarks" role="trademarks">
@@ -120,15 +133,19 @@
</legalnotice>
<abstract>
- <para>欢迎使用 FreeBSD! 本手册适用于安装 <emphasis>FreeBSD &rel2.current;-RELEASE</emphasis>
+ <para>欢迎使用 FreeBSD! 本手册适用于安装 <emphasis>FreeBSD &rel2.current;-RELEASE</emphasis>
和 <emphasis>FreeBSD &rel.current;-RELEASE</emphasis> 以及它们的日常使用。
这个手册目前由很多人 <emphasis>持续地</emphasis> 维护。其中的内容需要不断的添加和更新。
- 如果您有兴趣参加这个项目,请发邮件到 &a.doc;。此文档最新的版本可以从 <ulink
- url="http://www.FreeBSD.org/">FreeBSD Web站点</ulink> 上获得。
+ 如果您有兴趣参加这个项目,请发邮件到 &a.doc;。此文档最新的英文原始版本可以从 <ulink
+ url="http://www.FreeBSD.org/">FreeBSD Web站点</ulink> 上获得
+ (这本手册的较早期版本可以在 <ulink
+ url="http://docs.FreeBSD.org/doc/"></ulink> 找到),
+ 最新中文译本可从<ulink url='&cnproj.url.base;/'>&cnproj.freebsd.org; Web站点</ulink>获得。
其他的各种格式和压缩的文档可以从 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">FreeBSD 的 FTP
服务器</ulink>或下列其中的一个<link
- linkend="mirrors-ftp">镜像站点</link>下载获得。如果您更希望得到一份印刷版本的手册,可以从
+ linkend="mirrors-ftp">镜像站点</link>下载获得。
+ 如果您更希望得到一份印刷版本的手册,可以从
<ulink url="http://www.FreeBSDmall.com/">FreeBSD Mall</ulink> 购买. 您还可以<ulink
url="&url.base;/search/index.html">搜索手册</ulink>。</para>
</abstract>
@@ -230,6 +247,7 @@
<![ %chap.users; [ &chap.users; ]]>
<![ %chap.security; [ &chap.security; ]]>
<![ %chap.mac; [ &chap.mac; ]]>
+ <![ %chap.audit; [ &chap.audit; ]]>
<![ %chap.disks; [ &chap.disks; ]]>
<![ %chap.geom; [ &chap.geom; ]]>
<![ %chap.vinum; [ &chap.vinum; ]]>
diff --git a/zh_CN.GB2312/books/handbook/boot/chapter.sgml b/zh_CN.GB2312/books/handbook/boot/chapter.sgml
index ffa1a433d2..8357017f57 100644
--- a/zh_CN.GB2312/books/handbook/boot/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/boot/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese (Simplified) Project
- Original Revision: 1.59
+ Original Revision: 1.64
$FreeBSD$
-->
@@ -58,28 +58,42 @@
<firstterm>bootstrap</firstterm> 来指代操作系统的加载机制,
如今它逐渐被简写为 <quote>booting</quote>。</para>
+ <indexterm><primary>BIOS</primary></indexterm>
+
+ <indexterm><primary>基本输入/输出系统</primary><see>BIOS</see></indexterm>
+
<para>在 x86 硬件体系中,基本输入/输出系统 (BIOS) 负责加载操作系统,
为了做到这一点,BIOS 在磁盘上寻找主引导记录 (MBR),而 MBR
必须在放置的磁盘的特定位置。BIOS 有足够的能力来读入和运行 MBR,
- 且假使地认为 MBR 能完成加载操作系统的剩余任务。</para>
+ 且假使地认为 MBR 能完成加载操作系统的剩余任务,
+ MBR可能需要BIOS的帮助。</para>
- <indexterm>
- <primary>BIOS</primary>
- </indexterm>
+ <indexterm><primary>Master Boot Record (MBR)</primary></indexterm>
- <indexterm>
- <primary>基本输入/输出系统</primary>
- <see>BIOS</see>
- </indexterm>
+ <indexterm><primary>Boot Manager</primary></indexterm>
+
+ <indexterm><primary>Boot Loader</primary></indexterm>
+
+ <para>在MBR中的代码通常被提为<emphasis>引导管理器</emphasis>,
+ 尤其是与用户交互的那类。这一类引导器通常有更多代码位于磁盘第一
+ <emphasis>轨道</emphasis>或在操作系统的文件系统中。
+ (引导管理器有时也被称为<emphasis>boot loader</emphasis>,
+ 但是FreeBSD对后面的引导阶段才使用这个术语。)
+ 流行的引导管理器包括<application>boot0</application>(亦称<application>Boot
+ Easy</application>,标准的 &os; 引导管理器)、
+ <application>Grub</application>、<application>GAG</application>,以及
+ <application>LILO</application>。
+ (只有<application>boot0</application>能装得进MBR。)</para>
<para>如果您只安装了一个操作系统,那么一个标准的 MBR 就足够了。
- 这个 MBR 先在磁盘上搜索可引导的分区,
- 然后运行分区上的代码以加载操作系统的其它部分。</para>
+ 这个 MBR 先在磁盘上搜索可引导的(亦称“活动的”)分区,
+ 然后运行分区上的代码以加载操作系统的其它部分。
+ MBR由&man.fdisk.8;安装,是一个缺省的MBR。相关文件为
+ <filename>/boot/mbr</filename>。</para>
<para>如果您在磁盘上安装了多个操作系统那么您可以安装一个不同的
- MBR,它能显示一张操作系统的列表,您能从中选择启动哪个。
- FreeBSD 自带了一个这样的 MBR,其它的操作系统厂商亦提供可选的
- MBR。</para>
+ 引导管理器,它能显示一张操作系统的列表,您能从中选择启动哪个。
+ 这样的两种引导器将在下一小节中讨论。</para>
<para>启动系统的剩余部分被分为三个阶段。第一阶段由
MBR 执行,它只是使计算机进入特定的状态然后执行第二阶段。
@@ -98,20 +112,28 @@
</sect1>
<sect1 id="boot-blocks">
- <title>MBR 和引导阶段一、二、三</title>
+ <title>引导管理器和各引导阶段</title>
+
+ <indexterm><primary>Boot Manager</primary></indexterm>
<sect2 id="boot-boot0">
- <title>MBR,<filename>/boot/boot0</filename></title>
+ <title>The Boot Manager</title>
<indexterm><primary>主引导记录 (MBR)</primary></indexterm>
- <para> FreeBSD MBR 放置在 <filename>/boot/boot0</filename>。
- 这是真实 MBR 的一份 <emphasis>复制品</emphasis>,真正的 MBR
- 必须放在磁盘上 FreeBSD 分区以外的特定部分。</para>
-
- <para><filename>boot0</filename> 是非常简单的,因为在
- <abbrev>MBR</abbrev> 里的代码只有 512 字节。
- 如果您安装了 FreeBSD MBR 且装了多个操作系统,
- 在引导时您会看到如下的内容:</para>
+ <para>在MBR或引导管理器中的代码有时被提为引导过程的
+ <emphasis>阶段0</emphasis>。这一小节半夜前面提到引导器中的两种:
+ <application>boot0</application>和<application>LILO</application>。</para>
+
+ <formalpara><title><application>boot0</application>引导管理器:</title>
+ <para>由 FreeBSD 的安装程序以及 boot0cfg(8) 所安装的 MBR,
+ 默认基于 <filename>/boot/boot0</filename>。
+ (程序<application>boot0</application>非常简单,
+ 由于在<abbrev>MBR</abbrev>中的程序只能有446字节长,
+ 分区表和MBR末端的<literal>0x55AA</literal>标识也要挤占一些空间。)
+ 如果你已经安装<application>boot0</application>
+ 并且有多个操作系统在你的硬盘上,
+ 那么你如果您安装了 FreeBSD MBR 而且安装了多个操作系统,
+ 则会在系统启动时看到类似下面的提示:</para></formalpara>
<example id="boot-boot0-example">
<title><filename>boot0</filename> 截屏</title>
@@ -135,31 +157,29 @@ Default: F2</screen>
的设备名,比如 <devicename>ad0</devicename>
代表第一个 IDE 磁盘,<devicename>ad2</devicename>
代表第二个 IDE 控制器上的第一个 IDE 磁盘,
- <devicename>da0</devicename> 代表第一个 SCSI 磁盘,等等。</para>
+ <devicename>da0</devicename> 代表第一个 SCSI 磁盘,等等。
+ 抑或,如果你需要一个自行配置的MBR,请使用&man.boot0cfg.8;。</para>
+
+ <formalpara><title>The LILO Boot Manager:</title>
- <para>如果您是 linux 用户,您可能更喜欢使用
- <application>LILO</application> 来控制引导过程,您可以编辑
- <filename>/etc/lilo.conf</filename> 文件,或者在安装 FreeBSD 过程中选择
- <option>Leave The Master Boot Record Untouched</option> 选项。
- 如果您安装了 FreeBSD 引导管理器,您可以启动 linux 然后更改
- <application>LILO</application> 的配置文件
- <filename>/etc/lilo.conf</filename>,加入以下的选项:</para>
+ <para>要想安装这个引导管理器并也用来引导FreeBSD,
+ 首先启动Linux,并将以下选项加入到已有的配置文件
+ <filename>/etc/lilo.conf</filename>:</para></formalpara>
<programlisting>other=/dev/hdXY
-table=/dev/hdb
+table=/dev/hdX
loader=/boot/chain.b
label=FreeBSD</programlisting>
- <para>这样就可以通过
- <application>LILO</application> 来引导 FreeBSD 和 linux 了。
- 在我们的例子中,我们使用
- <replaceable>XY</replaceable> 确定驱动器号和分区。
+ <para>在上面的内容里,使用Linux的标示符指定了FreeBSD的主分区和驱动器,
+ 将<replaceable>X</replaceable>替换为Linux驱动器字母,
+ 将<replaceable>Y</replaceable>替换为Linux主分区号。
如果您使用的是 <acronym>SCSI</acronym> 驱动器,您需要将
- <replaceable>/dev/hdXY</replaceable> 改成 <replaceable>/dev/sdXY</replaceable>,
+ <replaceable>/dev/hd</replaceable> 改成 <replaceable>/dev/sd</replaceable>,
这里再次使用了 <replaceable>XY</replaceable> 的语法。
如果您安装的两个系统在同一驱动器上,<option>loader=/boot/chain.b</option>
- 选项可以去掉。现在您可以执行 <command>/sbin/lilo -v</command>
- 使修改生效。</para>
+ 选项可以去掉。现在您可以执行 <command>/sbin/lilo&nbsp;-v</command>
+ 使修改生效;应检查屏幕上的消息确认修改。</para>
</sect2>
<sect2 id="boot-boot1">
@@ -167,13 +187,14 @@ label=FreeBSD</programlisting>
<filename>/boot/boot2</filename></title>
<para>概念上,第一,第二阶段同属于一个程序,处于磁盘的相同区域。但由于空间限制,
- 它们被分为两部分。可是您总是会一起安装它们。</para>
+ 它们被分为两部分。可是您总是会一起安装它们。它们由安装器或
+ <application>disklabel</application>(见下文)复制自被组合而成的
+ <filename>/boot/boot</filename>。</para>
- <para>它们放置在引导分区的引导扇区里。在引导扇区里能找到 <link
- linkend="boot-boot0">boot0</link>、<abbrev>MBR</abbrev>
- 以及其它用于引导系统的程序。<filename>/boot</filename>
- 目录下的文件是真实文件的拷贝,真实文件放置在 FreeBSD
- 文件系统之外。</para>
+ <para>它们位于文件系统外,引导分区的第一轨道,从第一扇区开始。在这里<link
+ linkend="boot-boot0">boot0</link>,或者任何其它引导管理器,
+ 期望找到一个程序运行,继续引导进程。
+ 所使用的扇区数可由<filename>/boot/boot</filename>的大小确定。</para>
<para><filename>boot1</filename> 非常简单,因为它再多也只能有 512 字节,
只能识别储存着分区信息的 <firstterm>disklabel</firstterm>,
@@ -191,7 +212,7 @@ label=FreeBSD</programlisting>
<title><filename>boot2</filename> 的屏幕输出</title>
<screen>&gt;&gt; FreeBSD/i386 BOOT
-Default: 0:ad(0,a)/kernel
+Default: 0:ad(0,a)/boot/loader
boot:</screen>
</example>
diff --git a/zh_CN.GB2312/books/handbook/chapters.ent b/zh_CN.GB2312/books/handbook/chapters.ent
index 05969d6777..bba3030efd 100644
--- a/zh_CN.GB2312/books/handbook/chapters.ent
+++ b/zh_CN.GB2312/books/handbook/chapters.ent
@@ -6,7 +6,7 @@
Chapters should be listed in the order in which they are referenced.
- Original revision: 1.32
+ Original revision: 1.33
$FreeBSD$
-->
@@ -32,6 +32,7 @@
<!ENTITY chap.users SYSTEM "users/chapter.sgml">
<!ENTITY chap.security SYSTEM "security/chapter.sgml">
<!ENTITY chap.mac SYSTEM "mac/chapter.sgml">
+<!ENTITY chap.audit SYSTEM "audit/chapter.sgml">
<!ENTITY chap.disks SYSTEM "disks/chapter.sgml">
<!ENTITY chap.geom SYSTEM "geom/chapter.sgml">
<!ENTITY chap.vinum SYSTEM "vinum/chapter.sgml">
diff --git a/zh_CN.GB2312/books/handbook/config/chapter.sgml b/zh_CN.GB2312/books/handbook/config/chapter.sgml
index bf79bc2e55..2f2f275c3d 100644
--- a/zh_CN.GB2312/books/handbook/config/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/config/chapter.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Chinese Documentation Project
- Original Revision: 1.212
+ Original Revision: 1.216
$FreeBSD$
-->
@@ -11,21 +11,21 @@
<author>
<firstname>Chern</firstname>
<surname>Lee</surname>
- <contrib>Written by </contrib>
+ <contrib>原作: </contrib>
</author>
</authorgroup>
<authorgroup>
<author>
<firstname>Mike</firstname>
<surname>Smith</surname>
- <contrib>Based on a tutorial written by </contrib>
+ <contrib>这份文档基于一份教程, 其作者是 </contrib>
</author>
</authorgroup>
<authorgroup>
<author>
<firstname>Matt</firstname>
<surname>Dillon</surname>
- <contrib>Also based on tuning(7) written by </contrib>
+ <contrib>此外, 也参考了 tuning(7), 其作者是 </contrib>
</author>
</authorgroup>
</chapterinfo>
@@ -38,32 +38,32 @@
<indexterm><primary>系统配置</primary></indexterm>
<indexterm><primary>系统优化</primary></indexterm>
- <para>&os; 的一个重要问题是系统配置。
+ <para>使用 &os; 的一个重要问题是系统配置。
正确地配置系统能充分地减少以后维护和升级系统所需的工作量。
这章将解释一些 &os; 的配置过程,包括一些可以调整的 &os;
系统的一些参数。</para>
- <para>阅读完本章之后您将会知道:</para>
+ <para>读完本章, 您将了解:</para>
<itemizedlist>
<listitem>
- <para>怎样有效的利用文件系统和交换分区。</para>
+ <para>如何有效地利用文件系统和交换分区。</para>
</listitem>
<listitem>
- <para><filename>rc.conf</filename> 的基本设置和
+ <para><filename>rc.conf</filename> 的基本设置以及
<filename>/usr/local/etc/rc.d</filename> 启动体系。</para>
</listitem>
<listitem>
- <para>怎样设置和测试一块网卡。</para>
+ <para>如何设置和测试网卡。</para>
</listitem>
<listitem>
- <para>怎样在您的网络设备上设置虚拟主机。</para>
+ <para>如何在您的网络设备上配置虚拟主机。</para>
</listitem>
<listitem>
- <para>怎样使用 <filename>/etc</filename> 下的各配置文件。</para>
+ <para>如何使用 <filename>/etc</filename> 下的各配置文件。</para>
</listitem>
<listitem>
- <para>怎样使用 <command>sysctl</command> 来调整 &os; 系统变量。</para>
+ <para>如何通过 <command>sysctl</command> 变量来对 &os; 系统进行调优。</para>
</listitem>
<listitem>
<para>怎样调整磁盘性能和修改内核限制。</para>
@@ -296,13 +296,13 @@
这取决于 &os; 版本。 但是不管怎样,
需要考虑的一个重要方面是他们的启动配置文件要能被基本启动脚本识别捕获。</para>
- <para>在 rcNG 出现之前, 应用程序会把一个简单的启动脚本扔到
+ <para>在 <filename>rc.d</filename> 出现之前, 应用程序会把一个简单的启动脚本放到
<filename class="directory">/usr/local/etc/rc.d</filename>
目录中, 这个目录中的脚本会被系统初始化脚本读取。</para>
<para>尽管很多人已经花费了相当多的时间来把旧的配置方式融入到新系统中,
仍然有许多第三方软件需要把脚本放到上面提到的目录中。
- 是否使用 rcNG 会对这些脚本的执行带来一些变化。
+ 是否使用 <filename>rc.d</filename> 会对这些脚本的执行带来一些变化。
在 &os;&nbsp;5.1 之前采用的是旧式的配置,
当然, 绝大多数情况下, 新式的脚本也会工作的很好。</para>
@@ -328,7 +328,7 @@ stop)
kill -9 `cat /var/run/utility.pid`
;;
*)
- echo "Usage: `basename $0` {start|stop}" >&2
+ echo "Usage: `basename $0` {start|stop}" &gt;&2
exit 64
;;
esac
@@ -344,31 +344,31 @@ exit 0</programlisting>
<screen>&prompt.root; <userinput><filename>/usr/local/etc/rc.d/utility.sh</filename> start</userinput></screen>
<para>现在不是所有第三方软件都需要在
- <filename>rc.conf</filename>有这么一行,
- 不过几乎每天都有port被修改来接受这个配置。
- 对于一个特定的应用程序来说,
- 你可以查看安装的最终输出来获得更多信息。
- 一些第三方软件仍然提供一个脚本来供 rcNG 来使用,
- 这将在下一节介绍。</para>
+ <filename>rc.conf</filename> 中进行如此的配置,
+ 不过几乎每天都有新的 port 被修改来采用这种配置方法。
+ 您应在安装的最后阶段查看所显示的信息,
+ 以了解某个具体的应用是否需要这样的配置。
+ 某些第三方软件会提供启动脚本, 以便与
+ <filename>rc.d</filename> 配合使用;
+ 这些内容将在下一节介绍。</para>
<sect2>
<title>扩展应用程序配置</title>
- <para>现在 &os; 包含rcNG,软件启动配置更加理想了,
- 当然也变得更深奥。
- 用 <link linkend="configtuning-rcNG">rcNG</link>
- 这章介绍的关键字,应用程序现在被配置为可以在某一个服务之后启动,
- 例如<acronym>DNS</acronym>;
- 可能还要在 <filename>rc.conf</filename>
- 传递更多的参数给启动脚本。
- 一个基本的脚本看起来有点象下面这个样子:</para>
+ <para>现在 &os; 提供了 <filename>rc.d</filename>,
+ 这使得对应用软件的启动进行配置变得更加方便,
+ 并提供了更多的其他功能。 例如, 使用在
+ <link linkend="configtuning-rcd">rc.d</link> 一节中所介绍的关键字,
+ 应用程序就可以设置在某些其他服务,
+ 例如 <acronym>DNS</acronym> 之后启动; 除此之外,
+ 还可以通过 <filename>rc.conf</filename> 来指定一些额外的启动参数,
+ 而不再需要将它们硬编码到启动脚本中。 基本的启动脚本如下所示:</para>
<programlisting>#!/bin/sh
#
# PROVIDE: utility
# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: FreeBSD shutdown
+# KEYWORD: shutdown
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
@@ -394,10 +394,9 @@ run_rc_command "$1"</programlisting>
<para>这个脚本将保证
<application>utility</application> 能够在
- <literal>login</literal> 服务之前, 并在
<literal>daemon</literal> 服务之后启动。 它同时也提供了设置和跟踪
- <acronym>PID</acronym> 的方法, 称作进程
- <acronym>ID</acronym> 文件。</para>
+ <acronym>PID</acronym>, 也就是进程
+ <acronym>ID</acronym> 文件的方法。</para>
<para>可以在 <filename>/etc/rc.conf</filename> 中加入:</para>
@@ -405,9 +404,7 @@ run_rc_command "$1"</programlisting>
<para>这个新方法也使得命令行参数、包含 <filename>/etc/rc.subr</filename>
中所提供的功能, 兼容 &man.rcorder.8; 工具并提供更简单的通过
- <filename>rc.conf</filename> 文件来配置的方法。 实际上它甚至可以放到
- <filename class="directory">/etc/rc.d</filename> 目录中。
- 当然, 在使用 &man.mergemaster.8; 来完成软件升级时这会带来一些麻烦。</para>
+ <filename>rc.conf</filename> 文件来配置的方法。</para>
</sect2>
<sect2>
@@ -588,7 +585,7 @@ HOME=/var/log
</sect2>
</sect1>
- <sect1 id="configtuning-rcNG">
+ <sect1 id="configtuning-rcd">
<sect1info>
<authorgroup>
<author>
@@ -602,18 +599,20 @@ HOME=/var/log
<title>在 &os; 5.X 和更新版本中使用 rc</title>
- <para>&os; 最近整合了 NetBSD 的 <filename>rc.d</filename>
- 系统以完成系统初始化。用户要注意 <filename>/etc/rc.d</filename>
- 目录下的文件。这些文件中的很多都是可以接受 <option>start</option>、
- <option>stop</option> 和 <option>restart</option> 选项的基本服务。
- 例如,&man.sshd.8; 可以用下面的命令重启:</para>
+ <para>在 2002 年, &os; 整合了来自 NetBSD 的
+ <filename>rc.d</filename> 系统, 并通过它来完成系统的初始化工作。
+ 用户要注意在
+ <filename>/etc/rc.d</filename> 目录下的文件。
+ 这里面的许多文件是用来管理基础服务的, 它们可以通过
+ <option>start</option>、 <option>stop</option>,
+ 以及 <option>restart</option> 选项来控制。
+ 举例来说, &man.sshd.8; 可以通过下面的命令来重启:</para>
<screen>&prompt.root; <userinput>/etc/rc.d/sshd restart</userinput></screen>
- <para>其它的服务跟这个过程相似。当然,在 &man.rc.conf.5;
- 指定的服务通常可以自动启动。例如,让网络地址转换(NAT)
- 守护进程在系统启动的时候启动可以简单的在
- <filename>/etc/rc.conf</filename> 中添加下面一行:</para>
+ <para>对其它服务的操作与此类似。 当然, 这些服务通常是在启动时根据
+ &man.rc.conf.5; 自动启动的。 例如, 要配置使系统启动时启动网络地址转换服务,
+ 可以简单地通过在 <filename>/etc/rc.conf</filename> 中加入如下设置来完成:</para>
<programlisting>natd_enable="YES"</programlisting>
@@ -661,16 +660,15 @@ $sshd_enable=YES</screen>
<screen>&prompt.root; <userinput>/etc/rc.d/sshd status</userinput>
sshd is running as pid 433.</screen>
- <para><option>reload</option> 一个服务也是可以的。
- 这将要尝试发送一个信号给一个单独的服务,
- 强制这个服务重新装载它的配置文件。大多数情况这意味着给服务发送一个
- <literal>SIGHUP</literal> 信号。
- </para>
+ <para>有些时候也可以 <option>reload</option> 服务。
+ 这一操作实际上是向服务发送一个信号, 来强制其重新加载配置。
+ 多数情况下, 发给服务的会是 <literal>SIGHUP</literal>
+ 信号。 并非所有服务都支持这一功能。</para>
- <para><filename>rc.d</filename> 系统不仅仅是供网络服务使用的,
- 它也给很多系统初始化提供服务。例如,处理 <filename>bgfsck</filename>
- 文件。当这个脚本执行的时候,它会输出下列信息:
- </para>
+ <para><filename>rc.d</filename> 系统不仅用于网络服务,
+ 它也为系统初始化中的多数过程提供支持。
+ 比如 <filename>bgfsck</filename> 文件, 当它被执行时,
+ 将会给出下述信息:</para>
<screen>Starting background file system checks in 60 seconds.</screen>
@@ -698,10 +696,6 @@ sshd is running as pid 433.</screen>
This file will run <emphasis>before</emphasis>
the specified services.</para>
</listitem>
-
- <listitem>
- <para>KEYWORD: &os; or NetBSD. This is used for *BSD dependent features.</para>
- </listitem>
</itemizedlist>
<para>通过这种方法,系统管理员可以容易的控制系统而不用像其他一些
@@ -1441,7 +1435,7 @@ kern.maxproc: 1044</screen>
这样的语法:</para>
<screen>&prompt.root; <userinput>sysctl kern.maxfiles=5000</userinput>
-kern.maxfiles: 2088 -> 5000</screen>
+kern.maxfiles: 2088 -&gt; 5000</screen>
<para>sysctl 变量的设置通常是字符串、数字或者布尔型。
(布尔型用 <literal>1</literal> 来表示'yes',用
@@ -1579,15 +1573,20 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
<primary><varname>hw.ata.wc</varname></primary>
</indexterm>
- <para>&os;&nbsp;4.3 IDE 写缓存关掉了。这降低了到 IDE
- 磁盘的带宽但是保证了传进磁盘数据的严格完整性。这个问题是因为
- IDE 驱动器当写完成的时候无所事事。IDE 写缓存打开的时候,IDE
- 驱动器不按顺序把数据写进磁盘。当有很重的磁盘负载的时候它有时迟延写入一些块。
- 当机或者掉电会引起严重的文件系统讹误。&os; 的默认值改变成安全的模式。
- 不幸的是结果是带来了很大的性能损失,所以我们在发行版之后把写缓存的默认值改成了
- on。您应该注意 <varname>hw.ata.wc</varname> sysctl 变量来检查一下系统中的默认值。
- 如果 IDE 写缓存被关闭了,您可以通过设置内核变量为 1 来打开它。这必须在启动时通过
- boot loader 来完成。在内核启动之后尝试这么做将会没有效果。</para>
+ <para>&os;&nbsp;4.3 中默认将 IDE 的写缓存关掉了。 这会降低到 IDE
+ 磁盘用于写入操作的带宽, 但我们认为这有助于避免硬盘厂商所引入的,
+ 可能引致严重的数据不一致问题。 这类问题实际上是由于 IDE
+ 硬盘就写操作完成这件事的不诚实导致的。 当启用了 IDE 写入缓存时,
+ IDE 硬盘驱动器不但不会按顺序将数据写到盘上, 而且当磁盘承受重载时,
+ 它甚至会自作主张地对推迟某些块的实际写操作。 这样一来,
+ 在系统发生崩溃或掉电时, 就会导致严重的文件系统损坏。
+ 基于这些考虑, 我们将 &os; 的默认配置改成了更为安全的禁用 IDE
+ 写入缓存。 然而不幸的是, 这样做导致了性能的大幅降低,
+ 因此在后来的发行版中这个配置又改为默认启用了。
+ 您可以通过观察 <varname>hw.ata.wc</varname> sysctl 变量,
+ 来确认您的系统中所采用的默认值。 如果 IDE 写缓存被禁用,
+ 您可以通过将内核变量设置为 1 来启用它。 这一操作必须在启动时通过
+ boot loader 来完成。 在内核启动之后尝试这么做是没有任何作用的。</para>
<para>要了解更多的信息,请查阅 &man.ata.4;。</para>
</sect3>
@@ -1894,10 +1893,10 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
<varname>net.inet.ip.portrange.last</varname>。
<literal>10000</literal>、<literal>20000</literal> 或者
<literal>30000</literal> 可能是适当的值。
- 更改端口范围的时候也要考虑到防火墙。一些防火墙会阻止端口的大部分范围
+ 更改端口范围的时候也要考虑到防火墙。 一些防火墙会阻止端口的大部分范围
(通常是低范围的端口)并且用高端口进行对外连接(&mdash;)。
- 基于这个问题建议把 <varname>net.inet.ip.portrange.first</varname>
- 设置的小一点。</para>
+ 基于这个问题建议不要把 <varname>net.inet.ip.portrange.first</varname>
+ 设的太小。</para>
</sect3>
<sect3>
@@ -1908,7 +1907,7 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
<secondary><varname>net.inet.tcp.inflight.enable</varname></secondary>
</indexterm>
- <para>限制 TCP 带宽延迟和 NetBSD 的 TCP/Vegas 类似。
+ <para>限制 TCP 带宽延迟积和 NetBSD 的 TCP/Vegas 类似。
它可以通过将 sysctl 变量
<varname>net.inet.tcp.inflight.enable</varname>
设置成 <literal>1</literal> 来启用。
@@ -2002,6 +2001,9 @@ kern.maxvnodes: 100000</programlisting>
有三种方法增加交换空间:添加一块新的硬盘驱动器、通过
NFS 使用交换空间和在一个现有的分区上创建一个交换文件。</para>
+ <para>要了解关于如何加密交换区, 相关配置, 以及为什么要这样做, 请参阅手册的
+ <xref linkend="swap-encrypting">。</para>
+
<sect2 id="new-drive-swap">
<title>在新的硬盘驱动器上使用交换空间</title>
@@ -2107,7 +2109,7 @@ kern.maxvnodes: 100000</programlisting>
<para>通过重新启动机器或下面的命令使交换文件立刻生效:</para>
- <screen>&prompt.root; <userinput>mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0</userinput></screen>
+ <screen>&prompt.root; <userinput>mdconfig -a -t vnode -f /usr/swap0 -u 0 &amp;&amp; swapon /dev/md0</userinput></screen>
</listitem>
</orderedlist>
diff --git a/zh_CN.GB2312/books/handbook/cutting-edge/chapter.sgml b/zh_CN.GB2312/books/handbook/cutting-edge/chapter.sgml
index e367dd337e..b9a1e6f6b9 100644
--- a/zh_CN.GB2312/books/handbook/cutting-edge/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/cutting-edge/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.217
+ Original Revision: 1.222
$FreeBSD$
-->
@@ -342,15 +342,16 @@
</listitem>
<listitem>
- <para>如果安装一个新的系统又想它尽可能稳定的话,您可以仅仅从 <ulink
- url="ftp://snapshots.jp.FreeBSD.org/pub/FreeBSD/snapshots/"></ulink>
- 获取最新的分支快照并象其它发行版一样安装它。或者您可以从<link
- linkend="mirrors">镜像站点</link>安装最新的 &os.stable; 发行版,
- 并按照下边的说明升级您的系统到最新的 &os.stable; 源码。</para>
+ <para>如果您正安装一个新系统, 并希望它运行每月从 &os.stable; 编译的快照,
+ 请察看 <ulink url="&url.base;/snapshots/">
+ Snapshots</ulink> 网页以了解更多信息。
+ 另外, 也可以从
+ <link linkend="mirrors">镜像站点</link> 安装最新的 &os.stable; 发行版,
+ 并按照其中的说明将系统更新到最新的 &os.stable; 源代码。</para>
- <para>如果您已经在运行以前的 &os; 发行版,并希望通过源码方式升级,
- 那么您可能轻易的从 &os; <link linkend="mirrors">镜像站点</link>完成。
- 有两种方式:</para>
+ <para>如果您已经在运行较早的 &os; 版本, 并希望通过源代码方式升级,
+ 则可以通过 &os; <link linkend="mirrors">镜像站点</link> 来完成。
+ 这可以通过两种方式来进行:</para>
<orderedlist>
<indexterm>
@@ -364,7 +365,7 @@
<secondary>使用<application>CVSup</application>同步</secondary>
</indexterm>
<listitem>
- <para>与称作 <filename>standard-supfile</filename> 的
+ <para>与称作 <filename>stable-supfile</filename> 的
<filename>supfile</filename> 一起使用 <link
linkend="cvsup">cvsup</link>,这个可以从
<filename>/usr/share/examples/cvsup</filename> 得到。
@@ -522,8 +523,9 @@
讲清问题的本质以及受影响的系统。在问题解决后,再贴封<quote>解除(all
clear)</quote>声明。</para>
- <para>如可您想跟踪 &os.stable; 或 &os.current;
- 而又不阅读 &a.stable; 和 &a.current; 各自的邮件列表,那么您是自找麻烦。</para>
+ <para>如果使用 &os.stable; 或 &os.current;
+ 而又不阅读 &a.stable; 和 &a.current; 各自的邮件列表,
+ 那么您是自找麻烦。</para>
</warning>
<warning>
@@ -611,7 +613,8 @@
<para>一般的用户通常会从 <filename>/usr/share/examples/etc/make.conf</filename>
(或者 &os;&nbsp;4.X 中的 <filename>/etc/defaults/make.conf</filename>) 复制
<makevar>CFLAGS</makevar> 和
- <makevar>NOPROFILE</makevar> 这样的设置到
+ <makevar>NO_PROFILE</makevar> (或者, 在
+ &os;&nbsp;5.X 和更早版本上, 是 <makevar>NOPROFILE</makevar>) 这样的设置到
<filename>/etc/make.conf</filename> 中并令它们生效。</para>
<para>请考虑其他的一些选项 (例如 <makevar>COPTFLAGS</makevar>、
@@ -788,13 +791,13 @@ Script done, &hellip;</screen>
<filename>/etc/make.conf</filename> 设置的变量一样,
只是提供了另一种设置它们的方法。</para>
- <screen>&prompt.root; <userinput>make -DNOPROFILE <replaceable>target</replaceable></userinput></screen>
+ <screen>&prompt.root; <userinput>make -DNO_PROFILE <replaceable>target</replaceable></userinput></screen>
<para>是另一种指定不被建立 (built) 的先定库
(profiled libraries) 的方式,协同
<filename>/etc/make.conf</filename> 里的</para>
- <programlisting>NOPROFILE= true # 避免编译先定库</programlisting>
+ <programlisting>NO_PROFILE= true # 避免编译性能分析库</programlisting>
<para>一起使用。</para>
@@ -854,25 +857,29 @@ Script done, &hellip;</screen>
<screen>&prompt.root; <userinput>make buildworld</userinput></screen>
- <para>现在可能给 <command>make</command> 指定
- <option>-j</option> 选项了,这样会使用产生出几个并发的进程来。
- 这在多处理器 (multi-CPU) 机器里最有用。但是,
- 由于大部分的编译过程是 IO 限制远胜 CPU 限制,它在单处理器
- (single-CPU) 的机器里也是有用的。</para>
+ <para>目前, 我们提供了一个试验性的功能, 可以在构建过程中为
+ <command>make</command> 指定 <option>-j</option> 参数,
+ 令其在构建过程中同时启动多个并发的进程。 对于多 CPU 的机器而言,
+ 这样做有助于发挥其性能。 不过, 由于编译过程中的瓶颈主要是在 IO
+ 而不是 CPU 上, 因此它也会对单 CPU 的机器带来好处。</para>
- <para>在一般的单 CPU 机器里,您要运行:</para>
+ <para>对典型的单 CPU 机器, 可以使用:</para>
<screen>&prompt.root; <userinput>make -j4 buildworld</userinput></screen>
- <para>&man.make.1; 然后会有至多 4 个进程在同一时刻执行。
- 贴到邮件列表里的实验证据显示这样会收到最好的效果。</para>
+ <para>这样, &man.make.1; 会最多同时启动 4 个进程。
+ 从发到邮件列表中的经验看, 这样做能带来最佳的性能。</para>
+
+ <para>如果您使用的机器有多颗 CPU, 并且配置了 SMP 的内核,
+ 也可以试试看 6 到 10 的数值, 并观察是否能带来构建性能上的改善。</para>
- <para>如果您有一台多 CPU 机器,那您就使用 SMP
- 配置内核,试试 6 到 10 之间的值,看这些值提速如何。</para>
+ <warning>
+ <para>目前为止这仍然是试验性的功能, 提交到源代码树上的变更,
+ 也随时可能导致这一功能不可用。 如果您使用这个参数时发现无法构建
+ world, 在报告问题之前, 应首先试试看去掉这个参数是否能修正问题。</para>
- <para>注意,这仍处在实验性阶段,如果提交到源码树上的话,
- 可能会断送其前程 (break this feature)。
- 如果用这个参数编译的话,您报告错误前试试不用它。</para>
+ <para>当您通过源代码升级系统时, 使用这一选项可能引致无法预测的后果。</para>
+ </warning>
</sect3>
<sect3>
@@ -920,11 +927,6 @@ Script done, &hellip;</screen>
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make buildkernel KERNCONF=<replaceable>MYKERNEL</replaceable></userinput>
&prompt.root; <userinput>make installkernel KERNCONF=<replaceable>MYKERNEL</replaceable></userinput></screen>
-
- <para>在 FreeBSD&nbsp;4.2 或更早的版本里,您必须使用
- <literal>KERNEL=</literal> 替换 <literal>KERNCONF=</literal>。在
- 2001 年 2 月 2 号以前发行的 4.2-STABLE 并不识别
- <literal>KERNCONF=</literal>。</para>
</note>
<para>注意,如果您已把 <literal>内核安全级别(kern.securelevel)</literal>
@@ -934,11 +936,6 @@ Script done, &hellip;</screen>
如果您没有设置它, 则应该也能毫无问题地在多用户模式执行这两个命令。 请参考
&man.init.8; 以了解更多关于 <literal>内核安全级(kern.securelevel)</literal>
的信息;查看 &man.chflags.1; 了解更多关于不同文件标识的信息。</para>
- <para>如果您升级到 &os; 4.0 以前版本,您应旧的内核 build
- 程序。但还是推荐您使用新版的 &man.config.8;,
- 可以使用下边的命令行:</para>
-
- <screen>&prompt.root; <userinput>/usr/obj/usr/src/usr.sbin/config/config <replaceable>KERNELNAME</replaceable></userinput></screen>
</sect2>
<sect2>
@@ -970,11 +967,11 @@ Script done, &hellip;</screen>
<para>举例,您执行了:</para>
- <screen>&prompt.root; <userinput>make -DNOPROFILE buildworld</userinput></screen>
+ <screen>&prompt.root; <userinput>make -DNO_PROFILE buildworld</userinput></screen>
<para>您就必须使用:</para>
- <screen>&prompt.root; <userinput>make -DNOPROFILE installworld</userinput></screen>
+ <screen>&prompt.root; <userinput>make -DNO_PROFILE installworld</userinput></screen>
<para>来安装结果,否则就要试着安装先定 (profiled) 的在
<command>make buildworld</command> 阶段没有建立 (built)
@@ -1012,10 +1009,6 @@ Script done, &hellip;</screen>
源码树里边的配置文件的不同点。
这是保持系统配置文件同源码树里的一起更新的推荐方式。</para>
- <para><command>mergemaster</command> 被集成到了 3.3-RELEASE 和
- 3.4-RELEASE 之间的 FreeBSD 基本系统里,这意味着自 3.3
- 版本起所有的 -STABLE 和 -CURRENT 系统都有。</para>
-
<para>在提示符里简单地输入 <command>mergemaster</command>
就可以开始,并观看它的开始过程。<command>mergemaster</command>
会建立一个临时的根(root)环境,在 <filename>/</filename> 下,
@@ -1231,7 +1224,7 @@ Script done, &hellip;</screen>
不必包括日戳 (time stamps)。最简单的方式是使用 &man.awk.1; 提取信息:</para>
<screen>&prompt.root; <userinput>cd /dev</userinput>
-&prompt.root; <userinput>ls -l | awk '{print $1, $2, $3, $4, $5, $6, $NF}' > /var/tmp/dev.out</userinput></screen>
+&prompt.root; <userinput>ls -l | awk '{print $1, $2, $3, $4, $5, $6, $NF}' &gt; /var/tmp/dev.out</userinput></screen>
</step>
<step>
@@ -1401,7 +1394,10 @@ Script done, &hellip;</screen>
<screen><emphasis>&hellip; 问题修复 &hellip;</emphasis>
&prompt.root; <userinput>cd /usr/src</userinput>
-&prompt.root; <userinput>make -DNOCLEAN all</userinput></screen>
+&prompt.root; <userinput>make -DNO_CLEAN all</userinput></screen>
+
+ <note><para>在 &os;&nbsp;5.X 和更早版本中, 应使用
+ <makevar>-DNOCLEAN</makevar> 代替。</para></note>
<para>这样就不会取消先前的
<command>make buildworld</command> 所做的工作。</para>
@@ -1443,7 +1439,7 @@ Building everything..
<listitem>
<para>关掉 profiling (在 <filename>/etc/make.conf</filename>
- 里设置 <quote>NOPROFILE=true</quote>)。您差不多用不了它。</para>
+ 里设置 <quote>NO_PROFILE=true</quote>)。您差不多用不了它。</para>
</listitem>
<listitem>
@@ -1557,7 +1553,7 @@ Building everything..
<para>首先,确定一批机器,运行的二进制代码是同一套---我们称作
<emphasis>建造套件(build set)</emphasis>。每台机器可以有定制内核,
但他们运行的是相同的用户区二进制文件(userland binaries)。
- 从这个集起,选择一台机器做为 <emphasis>建造机器(build machine)</emphasis>。
+ 从这批机器中选择一台机器做为 <emphasis>建造机器(build machine)</emphasis>。
这将是用于建造(build)系统和内核的机器。想像一下,它应该是一台快速的机器,
有足够的空余的 CPU 来执行<command>make buildworld</command>。
您也想要选一台机器做为 <emphasis>测试机器(test machine)</emphasis>,
diff --git a/zh_CN.GB2312/books/handbook/desktop/chapter.sgml b/zh_CN.GB2312/books/handbook/desktop/chapter.sgml
index d156130ba3..b47eef0abf 100644
--- a/zh_CN.GB2312/books/handbook/desktop/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/desktop/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Project
- Original Revision: 1.56
+ Original Revision: 1.64
$FreeBSD$
-->
@@ -165,9 +165,9 @@
<primary><application>Mozilla</application></primary>
</indexterm>
- <para><application>Mozilla</application> 也许是 FreeBSD
- 桌面上最合适的浏览器了。它新颖稳定,且完整的移植到了
- FreeBSD。拥有非常合乎标准的 HTML 支持,它也能处理邮件和阅读新闻组。
+ <para><application>Mozilla</application> 是一个完全移植到 FreeBSD
+ 上的现代化的、 稳定的浏览器。 它拥有非常合乎标准的 HTML 支持,
+ 它也能处理邮件和阅读新闻组。
假如您打算做一个自己的主页的话,它甚至提供一个 HTML 编辑器。
<application>&netscape;</application> 的使用者可能觉得它和
<application>Communicator</application> 非常相似,
@@ -286,7 +286,7 @@
<note>
<para><application>linuxpluginwrapper</application> 只能在
- i386 架构上运行。</para>
+ &i386; 架构上运行。</para>
</note>
</sect2>
@@ -297,11 +297,13 @@
<primary><application>Opera</application></primary>
</indexterm>
- <para><application>Opera</application> 是一个快速、拥有许多特性,
- 和标准兼容的浏览器。它有两个版本:<quote>native</quote>FreeBSD
- 版本和一个可运行在 Linux 模拟器下的版本。对于每个操作系统,
- 它都有一个免费的但是有广告和一个没有广告但是必须向 <ulink
- url="http://www.opera.com/">Opera web site</ulink> 付费的版本。</para>
+ <para><application>Opera</application> 是一个功能齐全,
+ 并符合标准的浏览器。 它还提供了内建的邮件和新闻阅读器、 IRC 客户端,
+ RSS/Atom feed 阅读器以及更多功能。 除此之外,
+ <application>Opera</application> 是一个比较轻量的浏览器,
+ 其速度很快。 它提供了两种不同的版本: <quote>native</quote>
+ FreeBSD 版本, 以及通过 Linux
+ 模拟运行的版本。</para>
<para>要使用 <application>Opera</application> 的 FreeBSD
版本来浏览网页,安装以下的 package:</para>
@@ -413,7 +415,7 @@
<entry><application>OpenOffice.org</application></entry>
<entry>多</entry>
<entry>长</entry>
- <entry><application>GCC 3.1</application>、<application>&jdk; 1.3</application>、<application>Mozilla</application></entry>
+ <entry><application>&jdk; 1.4</application>、 <application>Mozilla</application></entry>
</row>
</tbody>
</tgroup>
@@ -538,7 +540,7 @@
&windows;、&solaris;、Linux、FreeBSD
和 &macos;&nbsp;X 等各种操作系统下。更多的有关
<application>OpenOffice.org</application> 的信息您可以在
- <ulink url="http://www.openoffice.org/">OpenOffice网页</ulink>找到。
+ <ulink url="http://www.openoffice.org/">OpenOffice.org 网页</ulink>找到。
对于特定的 FreeBSD 版本的信息,您可以在直接在 <ulink
url="http://porting.openoffice.org/freebsd/">FreeBSD OpenOffice
移植团队</ulink>的页面下载。</para>
@@ -549,174 +551,46 @@
<note>
<para>如果您正在使用 &os; 的 -RELEASE 版本, 一般来说这样做是没问题的。
- 如果不是这样, 您就可能需要看一看 &os; OpenOffice 移植小组的网站,
+ 如果不是这样, 您就可能需要看一看 &os; <application>OpenOffice.org</application>
+ 移植小组的网站,
并使用 &man.pkg.add.1; 从那里下载并安装合适的软件包。
最新的发布版本和开发版本都可以在那里找到。</para>
</note>
- <para>装好 package 之后, 您必须运行安装程序,
- 并选择 <option>标准的工作站安装 (standard workstation installation)</option>。
- 以将要使用
- <application>OpenOffice.org</application>
- 的用户的身份来运行:</para>
+ <para>装好 package 之后, 您只需输入下面的命令就能运行
+ <application>OpenOffice.org</application> 了:</para>
- <screen>&prompt.user; <userinput>openoffice-setup</userinput></screen>
+ <screen>&prompt.user; <userinput>openoffice.org</userinput></screen>
+
+ <note>
+ <para>在第一次运行时, 将询问您一些问题,
+ 并在您的主目录中建立一个 <filename>.openoffice.org2</filename> 目录。</para>
+ </note>
<para>如果没有可用的 <application>OpenOffice.org</application>
package,您仍旧可以选择编译 port。然而,
您必须记住它的要求以及大量的磁盘空间和相当长的时间编译。</para>
- <screen>&prompt.root; <userinput>cd /usr/ports/editors/openoffice-1.1</userinput>
+ <screen>&prompt.root; <userinput>cd /usr/ports/editors/openoffice.org-2.0</userinput>
&prompt.root; <userinput>make install clean</userinput></screen>
- <para>一旦这个完成,运行
- <application>OpenOffice.org</application> setup 设置程序并且选择一个
- <option>标准的工作站设置</option> 如下:</para>
-
- <screen>&prompt.user; <userinput>cd /usr/ports/editors/openoffice-1.1</userinput>
-&prompt.user; <userinput>make install-user</userinput></screen>
-
- <para>如果您想要使用一个本地化的版本,有如下一些 ports 可用:</para>
-
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <colspec colwidth="1*">
- <colspec colwidth="2*">
- <thead>
- <row>
- <entry>语言</entry>
- <entry>Port</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>加泰罗尼亚语</entry>
- <entry><filename role="package">editors/openoffice-1.1-ca</filename></entry>
- </row>
-
- <row>
- <entry>捷克语</entry>
- <entry><filename role="package">editors/openoffice-1.1-cs</filename></entry>
- </row>
-
- <row>
- <entry>丹麦语</entry>
- <entry><filename role="package">editors/openoffice-1.1-dk</filename></entry>
- </row>
-
- <row>
- <entry>希腊语</entry>
- <entry><filename role="package">editors/openoffice-1.1-el</filename></entry>
- </row>
-
- <row>
- <entry>西班牙语</entry>
- <entry><filename role="package">editors/openoffice-1.1-es</filename></entry>
- </row>
-
- <row>
- <entry>爱沙尼亚语</entry>
- <entry><filename role="package">editors/openoffice-1.1-et</filename></entry>
- </row>
-
- <row>
- <entry>芬兰语</entry>
- <entry><filename role="package">editors/openoffice-1.1-fi</filename></entry>
- </row>
-
- <row>
- <entry>意大利语</entry>
- <entry><filename role="package">editors/openoffice-1.1-it</filename></entry>
- </row>
-
- <row>
- <entry>荷兰语</entry>
- <entry><filename role="package">editors/openoffice-1.1-nl</filename></entry>
- </row>
-
- <row>
- <entry>瑞典语</entry>
- <entry><filename role="package">editors/openoffice-1.1-se</filename></entry>
- </row>
-
- <row>
- <entry>斯洛伐克语</entry>
- <entry><filename role="package">editors/openoffice-1.1-sk</filename></entry>
- </row>
-
- <row>
- <entry>斯洛文尼亚语</entry>
- <entry><filename role="package">editors/openoffice-1.1-sl_SI</filename></entry>
- </row>
-
- <row>
- <entry>土耳其语</entry>
- <entry><filename role="package">editors/openoffice-1.1-tr</filename></entry>
- </row>
-
- <row>
- <entry>阿拉伯语</entry>
- <entry><filename role="package">arabic/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>中文 (简体)</entry>
- <entry><filename role="package">chinese/openoffice-1.1-zh_CN</filename></entry>
- </row>
-
- <row>
- <entry>中文 (繁体)</entry>
- <entry><filename role="package">chinese/openoffice-1.1-zh_TW</filename></entry>
- </row>
-
- <row>
- <entry>法语</entry>
- <entry><filename role="package">french/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>德语</entry>
- <entry><filename role="package">german/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>匈牙利语</entry>
- <entry><filename role="package">hungarian/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>日语</entry>
- <entry><filename role="package">japanese/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>韩国语</entry>
- <entry><filename role="package">korean/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>波兰语</entry>
- <entry><filename role="package">polish/openoffice-1.1</filename></entry>
- </row>
-
- <row>
- <entry>葡萄牙语 (巴西)</entry>
- <entry><filename role="package">portuguese/openoffice-1.1-pt_BR</filename></entry>
- </row>
-
- <row>
- <entry>葡萄牙语</entry>
- <entry><filename role="package">portuguese/openoffice-1.1-pt_PT</filename></entry>
- </row>
-
- <row>
- <entry>俄语</entry>
- <entry><filename role="package">russian/openoffice-1.1</filename></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ <note>
+ <para>如果希望联编一套进行过本地化的版本,
+ 将前述命令行改为:</para>
+
+ <screen>&prompt.root; <userinput>make LOCALIZED_LANG=<replaceable>your_language</replaceable> install clean</userinput></screen>
+
+ <para>您需要将
+ <replaceable>your_language</replaceable> 改为正确的 ISO-代码。
+ 所支持的语言代码可以在
+ <filename>files/Makefile.localized</filename> 文件中找到,
+ 这个文件位于 port 的目录。</para>
+ </note>
+
+ <para>一旦完成上述操作, 就可以通过下面的命令来运行
+ <application>OpenOffice.org</application> 了:</para>
+
+ <screen>&prompt.user; <userinput>openoffice.org</userinput></screen>
</sect2>
</sect1>
diff --git a/zh_CN.GB2312/books/handbook/disks/chapter.sgml b/zh_CN.GB2312/books/handbook/disks/chapter.sgml
index df77722789..9602d96e03 100644
--- a/zh_CN.GB2312/books/handbook/disks/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/disks/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.241
+ Original Revision: 1.251
$FreeBSD$
-->
@@ -613,10 +613,10 @@ ar0: ATA RAID1 subdisks: ad4 ad6 status: DEGRADED</screen>
<procedure>
<step>
- <para>您首先需要将磁盘从阵列中移除以便您可以
- 安全的拆除它:</para>
+ <para>首先您应将包含故障盘的 ata 通道卸下,
+ 以便安全地将其拆除:</para>
- <screen>&prompt.root; <userinput>atacontrol detach 3</userinput></screen>
+ <screen>&prompt.root; <userinput>atacontrol detach ata3</userinput></screen>
</step>
<step>
@@ -624,23 +624,27 @@ ar0: ATA RAID1 subdisks: ad4 ad6 status: DEGRADED</screen>
</step>
<step>
- <para>把磁盘作为备用磁盘安装:</para>
+ <para>重新挂接 ata 通道:</para>
- <screen>&prompt.root; <userinput>atacontrol attach 3</userinput>
+ <screen>&prompt.root; <userinput>atacontrol attach ata3</userinput>
Master: ad6 &lt;MAXTOR 6L080J4/A93.0500&gt; ATA/ATAPI rev 5
Slave: no device present</screen>
</step>
<step>
+ <para>将新盘作为热备盘加入阵列:</para>
+
+ <screen>&prompt.root; <userinput>atacontrol addspare ar0 ad6</userinput></screen>
+ </step>
+
+ <step>
<para>重建阵列:</para>
<screen>&prompt.root; <userinput>atacontrol rebuild ar0</userinput></screen>
</step>
<step>
- <para>rebuild 命令挂起直到完成。然而,可以打开另一个终端
- (使用 <keycombo action="simul"><keycap>Alt</keycap> <keycap>F<replaceable>n</replaceable></keycap></keycombo>)
- 通过下面的命令来检查进程:</para>
+ <para>可以通过下面的命令来查看进度:</para>
<screen>&prompt.root; <userinput>dmesg | tail -10</userinput>
[output removed]
@@ -1057,16 +1061,20 @@ scsibus1:
<filename>/dev/acd0t02</filename>,第三个就是
<filename>/dev/acd0t03</filename>,等等。</para>
- <para>确保在 <filename>/dev</filename> 中存在合适的文件。
- </para>
+ <para>请务必确认在
+ <filename>/dev</filename> 中出现了对应的文件。
+ 如果您发现有某些项目缺失, 则应强制系统重新识别介质:</para>
+
+ <screen>&prompt.root; <userinput>dd if=/dev/acd0 of=/dev/null count=1</userinput></screen>
+
+ <note><para>在 &os; 4.X 中, 这些项的前缀并不包括零。
+ 如果发现 <filename>/dev</filename> 缺少所需的项,
+ 可以用 <command>MAKEDEV</command> 来生成:</para>
<screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV acd0t99</userinput></screen>
+ </note>
- <note><para>在 FreeBSD 5.0 中,&man.devfs.5; 会为您自动创建
- 并管理 <filename>/dev</filename> 中的节点,
- 所以不再需要使用
- <command>MAKEDEV</command>。</para></note>
</step>
<step>
@@ -1610,7 +1618,7 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<author>
<firstname>Julio</firstname>
<surname>Merino</surname>
- <contrib>Original work by </contrib>
+ <contrib>原作 </contrib>
</author>
</authorgroup>
<!-- 24 Dec 2001 -->
@@ -1618,7 +1626,7 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<author>
<firstname>Martin</firstname>
<surname>Karlsson</surname>
- <contrib>Rewritten by </contrib>
+ <contrib>重写 </contrib>
</author>
</authorgroup>
<!-- 27 Apr 2003 -->
@@ -1661,7 +1669,7 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<para>有时这些条目必须在 <filename>/dev</filename> 目录中进行重建。
可以这样做:</para>
- <screen>&prompt.root; <userinput>cd /dev && ./MAKEDEV "fd*"</userinput></screen>
+ <screen>&prompt.root; <userinput>cd /dev &amp;&amp; ./MAKEDEV "fd*"</userinput></screen>
</sect4>
<sect4>
@@ -2018,6 +2026,86 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
</sect2>
</sect1>
+ <sect1 id="backup-strategies">
+ <sect1info>
+ <authorgroup>
+ <author>
+ <firstname>Lowell</firstname>
+ <surname>Gilbert</surname>
+ <contrib>原作 </contrib>
+ </author>
+ </authorgroup>
+ <!-- 3 Dec 2005 -->
+ </sect1info>
+
+ <title>备份策略</title>
+
+ <para>设计备份计划的第一要务是确认以下问题皆已考虑到:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>磁盘故障</para>
+ </listitem>
+ <listitem>
+ <para>文件的意外删除</para>
+ </listitem>
+ <listitem>
+ <para>随机的文件损毁</para>
+ </listitem>
+ <listitem>
+ <para>机器完全损毁 (例如火灾), 包括破坏全部在线备份。</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>针对上述的每个问题采用完全不同的技术来解决是完全可行的。
+ 除了只包含少量几乎没有价值数据的个人系统之外,
+ 一般来说很少有一种技术能够同时兼顾前面所有的需要。</para>
+
+ <para>可以采用的技术包括:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>对整个系统的数据进行存档, 备份到永久性的离线介质上。
+ 这种方法实际上能够提供针对前面所有问题的保护, 但这样做通常很慢,
+ 而且恢复时会比较麻烦。 您可以将备份置于近线或在线的状态,
+ 然而恢复文件仍然是一个难题, 特别是对没有特权的那些用户而言。</para>
+ </listitem>
+
+ <listitem>
+ <para>文件系统快照。 这种技术实际上只对无意中删除文件这一种情况有用,
+ 但在这种情况下它会提供
+ <emphasis>非常大</emphasis> 的帮助,
+ 而且访问迅速, 操作容易。</para>
+ </listitem>
+
+ <listitem>
+ <para>直接复制整个文件系统和/或磁盘 (例如周期性地对整个机器做 rsync)。
+ 通常这对于在网络上的单一需求最为适用。 要为磁盘故障提供更为通用的保护,
+ 通常这种方法要逊于 <acronym>RAID</acronym>。
+ 对于恢复无意中删除的文件来说, 这种方法基本上与
+ <acronym>UFS</acronym> 快照属于同一层次, 使用哪一个取决于您的喜好。</para>
+ </listitem>
+
+ <listitem>
+ <para><acronym>RAID</acronym>。 它能够最大限度地减少磁盘故障导致的停机时间。
+ 其代价是需要处理更为频繁的磁盘故障 (因为磁盘的数量增加了),
+ 尽管这类故障不再需要作为非常紧急的事项来处理。</para>
+ </listitem>
+
+ <listitem>
+ <para>检查文件的指纹。 &man.mtree.8; 工具对于这种操作非常有用。
+ 尽管这并不是一种备份的技术, 但它能够确保您有机会注意到那些您需要求助于离线备份的事情。
+ 这对于离线备份非常重要, 而且应有计划地加以检查。</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>很容易列举更多的技术, 它们中有许多实际上是前面所列出的方法的变种。
+ 特别的需求通常会需要采用特别的技术 (例如, 备份在线运行的数据库,
+ 往往需要数据库软件提供某种方法来完成中间步骤) 来满足。
+ 最重要的事情是, 一定要了解需要将数据保护起来免受何种风险,
+ 以及发生问题时应该如何处理。</para>
+ </sect1>
+
<sect1 id="backup-basics">
<title>备份程序</title>
@@ -2135,9 +2223,9 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<command>rsh</command> 来传送数据给远程的磁带机。</para>
<screen>&prompt.root; <userinput>for f in <replaceable>directory_list; do</replaceable></userinput>
-<userinput>find $f >> backup.list</userinput>
+<userinput>find $f &gt;&gt; backup.list</userinput>
<userinput>done</userinput>
-&prompt.root; <userinput>cpio -v -o --format=newc < backup.list | ssh <replaceable>user</replaceable>@<replaceable>host</replaceable> "cat > <replaceable>backup_device</replaceable>"</userinput></screen>
+&prompt.root; <userinput>cpio -v -o --format=newc &lt; backup.list | ssh <replaceable>user</replaceable>@<replaceable>host</replaceable> "cat &gt; <replaceable>backup_device</replaceable>"</userinput></screen>
<para>这里的 <replaceable>directory_list</replaceable> 是要备份的目录列表,
<replaceable>user</replaceable>@<replaceable>host</replaceable> 结合了将
@@ -2313,7 +2401,7 @@ mkdir /mnt/var
#
if [ ! -x /sys/compile/MINI/kernel ]
then
- cat << EOM
+ cat &lt;&lt; EOM
The MINI kernel does not exist, please create one.
Here is an example config file:
#
@@ -2361,14 +2449,14 @@ fi
cp -f /sys/compile/MINI/kernel /mnt
-gzip -c -best /sbin/init > /mnt/sbin/init
-gzip -c -best /sbin/fsck > /mnt/sbin/fsck
-gzip -c -best /sbin/mount > /mnt/sbin/mount
-gzip -c -best /sbin/halt > /mnt/sbin/halt
-gzip -c -best /sbin/restore > /mnt/sbin/restore
+gzip -c -best /sbin/init &gt; /mnt/sbin/init
+gzip -c -best /sbin/fsck &gt; /mnt/sbin/fsck
+gzip -c -best /sbin/mount &gt; /mnt/sbin/mount
+gzip -c -best /sbin/halt &gt; /mnt/sbin/halt
+gzip -c -best /sbin/restore &gt; /mnt/sbin/restore
-gzip -c -best /bin/sh > /mnt/bin/sh
-gzip -c -best /bin/sync > /mnt/bin/sync
+gzip -c -best /bin/sh &gt; /mnt/bin/sh
+gzip -c -best /bin/sync &gt; /mnt/bin/sync
cp /root/.profile /mnt/root
@@ -2395,18 +2483,18 @@ cd /
#
# create minimum file system table
#
-cat > /mnt/etc/fstab <<EOM
+cat &gt; /mnt/etc/fstab &lt;&lt;EOM
/dev/fd0a / ufs rw 1 1
EOM
#
# create minimum passwd file
#
-cat > /mnt/etc/passwd <<EOM
+cat &gt; /mnt/etc/passwd &lt;&lt;EOM
root:*:0:0:Charlie &:/root:/bin/sh
EOM
-cat > /mnt/etc/master.passwd <<EOM
+cat &gt; /mnt/etc/master.passwd &lt;&lt;EOM
root::0:0::0:0:Charlie &:/root:/bin/sh
EOM
@@ -2527,7 +2615,7 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
</note>
<sect2 id="disks-vnconfig">
- <title>FreeBSD&nbsp;4.X 下的 File-Backed 文件系统</title>
+ <title>FreeBSD 4.X 下的 File-Backed 文件系统</title>
<indexterm>
<primary>磁盘</primary>
<secondary>file-backed (4.X)</secondary>
@@ -2576,7 +2664,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
</sect2>
<sect2 id="disks-mdconfig">
- <title>FreeBSD&nbsp;5.X 下的 File-Backed 文件系统</title>
+ <title>FreeBSD 5.X 下的 File-Backed 文件系统</title>
<indexterm>
<primary>磁盘</primary>
<secondary>file-backed (5.X)</secondary>
@@ -2665,7 +2753,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
</sect2>
<sect2 id="disks-md-freebsd4">
- <title>FreeBSD&nbsp;4.X 下的内存后备式文件系统</title>
+ <title>FreeBSD 4.X 下的内存后备式文件系统</title>
<indexterm>
<primary>磁盘</primary>
<secondary>内存文件系统(4.X)</secondary>
@@ -2694,7 +2782,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
</sect2>
<sect2 id="disks-md-freebsd5">
- <title>FreeBSD&nbsp;5.X 下的内存后备式文件系统</title>
+ <title>FreeBSD 5.X 下的内存后备式文件系统</title>
<indexterm>
<primary>磁盘</primary>
<secondary>内存文件系统(5.X)</secondary>
@@ -2822,10 +2910,10 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
</listitem>
<listitem>
- <para>检查文件系统的完整性, &man.fsck.8; 可以用来检查快照文件。
- 假设文件系统在挂接后前是一致的,
- 则会得到一致的结果 (不做修改)。
- 这是由 &man.fsck.8; 进程在后台完成的。</para>
+ <para>文件系统一致性检查程序 &man.fsck.8; 可以用来检查快照文件。
+ 如果文件系统在挂接前是一致的, 则检查结果也一定是一致的
+ (也就是不会做任何修改)。 实际上这也正是后台 &man.fsck.8;
+ 的操作过程。</para>
</listitem>
<listitem>
@@ -3078,15 +3166,16 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
但是,和操作系统强制受权不相关的是,如果黑客有物理上访问计算机的可能,
那他就可以简单的把计算机的硬件安装到另一个系统上拷贝出敏感的数据。</para>
- <para>不管怎样,黑客都有可能取得并获取停机时的硬件,
- <application>GEOM 基于磁盘的加密 (gbde)</application>
- 能够保护在计算机文件系统上的数据并防止黑客得到重要的信息。
- 不像 cumbersome 加密方法只加密个别的文件,
- <application>gbde</application> 透明的加密整个文件系统。
- 整个硬盘都是加密过的非明文数据。</para>
+ <para>无论攻击者如何取得停机后的硬件或硬盘驱动器本身, &os; <application>GEOM
+ Based Disk Encryption (基于 GEOM 的磁盘加密, gbde)</application> 和
+ <command>geli</command> 加密子系统都能够保护计算机上的文件系统数据,
+ 使它们免受哪怕是训练有素的攻击者获得有用的资源。
+ 与那些只能加密单个文件的笨重的加密方法不同,
+ <command>gbde</command> 和 <command>geli</command>
+ 能够透明地加密整个文件系统。 明文数据不会出现在硬盘的任何地方。</para>
<sect2>
- <title>在内核中启用 gbde</title>
+ <title>使用 <application>gbde</application> 对磁盘进行加密</title>
<procedure>
<step>
@@ -3111,23 +3200,19 @@ Password:</screen>
<step>
<title>在内核配置文件中添加对 &man.gbde.4; 的支持</title>
- <para>使用您喜欢的文本编辑器,
- 在内核配置文件中添加下面一行:</para>
+ <para>在您的内核配置中加入下面一行:</para>
<para><literal>options GEOM_BDE</literal></para>
- <para>配置,编译,安装 FreeBSD 内核,
- 这个过程在 <xref
- linkend="kernelconfig"> 中有详细描述。</para>
+ <para>按照 <xref
+ linkend="kernelconfig"> 所进行的介绍重新编译并安装内核。</para>
<para>重新引导进入新的内核。</para>
</step>
</procedure>
- </sect2>
-
- <sect2>
- <title>准备加密整个硬盘</title>
+ <sect3>
+ <title>准备加密盘</title>
<para>下面这个例子假设您添加了一个新的硬盘在您的系统并将拥有一个单独的加密分区。
这个分区将挂接在 <filename>/private</filename>目录下。
@@ -3282,10 +3367,10 @@ Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1c.bde 150G 4.1K 138G 0% /private</screen>
</step>
</procedure>
- </sect2>
+ </sect3>
- <sect2>
- <title>挂接已经存在的加密文件系统</title>
+ <sect3>
+ <title>挂接已有的加密文件系统</title>
<para>每次系统启动后,
在使用加密文件系统前必须和内核重新进行关联,
@@ -3298,8 +3383,8 @@ Filesystem Size Used Avail Capacity Mounted on
<screen>&prompt.root; <userinput>gbde attach /dev/ad4s1c -l /etc/gbde/ad4s1c</userinput></screen>
- <para>您将被要求提供您在初始化加密
- gbde 分区的过程中选定的密码短语。</para>
+ <para>接下来系统将提示您输入在初始化加密的
+ <application>gbde</application> 分区时所用的密码短语。</para>
</step>
<step>
@@ -3322,27 +3407,39 @@ Filesystem Size Used Avail Capacity Mounted on
</step>
</procedure>
- <sect3>
- <title>自动挂接加密文件系统</title>
+ <sect4>
+ <title>自动挂接加密分区</title>
- <para>可以创建一个脚本来自动进行关联、检测、和挂接一个加密分区,
- 但是为了安全起见,脚本程序中不应该包含 &man.gbde.8; 密码。
- 取而代之,摧荐这样的脚本要手工来运行,
- 在要求提供密码时可以通过控制台或 &man.ssh.1;。</para>
- </sect3>
- </sect2>
+ <para>可以创建脚本来自动地附加、 检测, 并挂接加密分区,
+ 然而, 处于安全考虑, 这个脚本不应包含 &man.gbde.8; 密码。
+ 于此相反, 我们建议这类脚本在控制台或通过 &man.ssh.1;
+ 执行并要求用户输入口令。</para>
- <sect2>
- <title>用 gbde 进行加密保护</title>
+ <para>从 &os; 5.2-RELEASE 开始, 提供了一个新的 <filename>rc.d</filename> 脚本。
+ 这个脚本的参数可以通过
+ &man.rc.conf.5; 来指定, 例如:</para>
- <para>&man.gbde.8; 在 CBC 模式上使用 128-bit AES 对扇区进行加密,
- 每个扇区在硬盘上的加密都使用不同的 AES 密钥。
- 想了解更多的信息关于 <application>gbde</application>
- 的设计,包括每个扇区的密钥是怎样从用户提供的密钥短语产生的,
- 请看 &man.gbde.4;。</para>
- </sect2>
+ <screen>gbde_autoattach_all="YES"
+gbde_devices="ad4s1c"</screen>
+
+ <para>在启动时将要求输入 <application>gbde</application>
+ 的口令。 在输入正确的口令之后, <application>gbde</application>
+ 加密分区将被自动挂接。 对于将 <application>gbde</application>
+ 用在笔记本电脑上时, 这就很有用了。</para>
+ </sect4>
+ </sect3>
+
+ <sect3>
+ <title>gbde 提供的密码学保护</title>
- <sect2>
+ <para>&man.gbde.8; 采用 CBC 模式的 128-位 AES 来加密扇区数据。
+ 磁盘上的每个扇区都采用不同的 AES 密钥来加密。
+ 要了解关于 <application>gbde</application> 的密码学设计,
+ 包括扇区密钥如何从用户提供的口令字中生成等细节,
+ 请参考 &man.gbde.4;。</para>
+ </sect3>
+
+ <sect3>
<title>兼容性问题</title>
<para>&man.sysinstall.8; 是和
@@ -3353,12 +3450,328 @@ Filesystem Size Used Avail Capacity Mounted on
与加密设备进行分离在我们的例子中使用如下的命令:</para>
<screen>&prompt.root; <userinput>gbde detach /dev/ad4s1c</userinput></screen>
- <para>也应该注意,作为 &man.vinum.4; 不能使用 &man.geom.4; 子系统,
- 您不能同时使用
- <application>gbde</application> 和
+ <para>还需要注意的是, 由于 &man.vinum.4; 没有使用
+ &man.geom.4; 子系统, 因此不能同时使用
+ <application>gbde</application> 与
<application>vinum</application> 卷。</para>
- </sect2>
+ </sect3>
+
+ </sect2>
+
+ <sect2>
+ <sect2info>
+ <authorgroup>
+ <author>
+ <firstname>Daniel</firstname>
+ <surname>Gerzo</surname>
+ <contrib>撰写者 </contrib>
+ </author>
+ </authorgroup>
+ <!-- Date of writing: 28 November 2005 -->
+ </sect2info>
+
+ <title>使用 <command>geli</command> 对磁盘进行加密</title>
+
+ <para>从 &os; 6.0 开始提供了一个新的密码学 GEOM class &mdash;
+ <command>geli</command>。 它目前由
+ &a.pjd; 开发。 <command>Geli</command> 与
+ <command>gbde</command> 不同; 它提供了一些不同的功能,
+ 并采用了不同的方式来进行密码学运算。</para>
+
+ <para>&man.geli.8; 最重要的功能包括:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>使用了 &man.crypto.9; 框架 &mdash;
+ 如果系统中有加解密硬件加速设备, 则 <command>geli</command>
+ 会自动加以利用。</para>
+ </listitem>
+ <listitem>
+ <para>支持多种加密算法 (目前支持
+ AES、 Blowfish, 以及 3DES)。</para>
+ </listitem>
+ <listitem>
+ <para>允许对根分区进行加密。 在系统启动时,
+ 将要求输入用于加密根分区的口令。</para>
+ </listitem>
+ <listitem>
+ <para>允许使用两个不同的密钥 (例如, 一个
+ <quote>个人密钥</quote> 和一个 <quote>公司密钥</quote>)。</para>
+ </listitem>
+ <listitem>
+ <para><command>geli</command> 速度很快 &mdash;
+ 它只进行简单的扇区到扇区的加密。</para>
+ </listitem>
+ <listitem>
+ <para>允许备份和恢复主密钥。 当用户必须销毁其密钥时,
+ 仍然可以通过从备份中恢复密钥来存取数据。</para>
+ </listitem>
+ <listitem>
+ <para>允许使用随机的一次性密钥来挂接磁盘
+ &mdash; 这对于交换区和临时文件系统非常有用。</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>更多 <command>geli</command> 功能介绍可以在
+ &man.geli.8; 联机手册中找到。</para>
+ <para>下面的步骤介绍了如何启用 &os; 内核中的
+ <command>geli</command> 支持,
+ 并解释了如何创建新的 <command>geli</command> 加密 provider。
+ 最后, 还将对如何利用 <command>geli</command>
+ 创建加密的交换分区加以演示。</para>
+
+ <para>要使用 <command>geli</command>, 您必须运行
+ &os; 6.0-RELEASE 或更新版本。 由于需要修改内核,
+ 因此您还需要拥有超级用户权限。</para>
+
+ <procedure>
+ <step>
+ <title>在内核配置文件中加入 <command>geli</command> 支持</title>
+
+ <para>在内核配置文件中加入下面两行:</para>
+
+ <screen>options GEOM_ELI
+device crypto</screen>
+
+ <para>按照 <xref
+ linkend="kernelconfig"> 介绍的步骤重新编译并安装内核。</para>
+
+ <para>另外, <command>geli</command> 也可以在系统引导时加载。 这是通过在
+ <filename>/boot/loader.conf</filename> 中增加下面的配置来实现的:</para>
+
+ <para><literal>geom_eli_load="YES"</literal></para>
+
+ <para>&man.geli.8; 现在应该已经为内核所支持了。</para>
+ </step>
+
+ <step>
+ <title>生成主密钥</title>
+
+ <para>下面的例子讲描述如何生成密钥文件, 它将作为主密钥 (Master Key)
+ 的一部分, 用于挂接到
+ <filename role="directory">/private</filename> 的加密 provider。
+ 这个密钥文件将提供一些随机数据来加密主密钥。 同时,
+ 主密钥也会使用一个口令字来保护。 Provider 的扇区尺寸为 4kB。
+ 此外, 这里的讨论将描述如何挂载
+ <command>geli</command> provider, 在其上创建文件系统,
+ 如何挂接并在其上工作, 最后将其卸下。</para>
+
+ <para>建议您使用较大的扇区尺寸 (例如 4kB),
+ 以获得更好的性能。</para>
+
+ <para>主密钥将由口令字保护, 而密钥文件的数据来源则将是
+ <filename>/dev/random</filename>。 我们称之为 provider 的
+ <filename>/dev/da2.eli</filename> 的扇区尺寸将是 4kB。</para>
+
+ <screen>&prompt.root; <userinput>dd if=/dev/random of=/root/da2.key bs=64 count=1</userinput>
+&prompt.root; <userinput>geli init -s 4096 -K /root/da2.key /dev/da2</userinput>
+Enter new passphrase:
+Reenter new passphrase:</screen>
+
+ <para>同时使用口令字和密钥文件并不是必须的;
+ 您也可以只使用其中的一种来加密主密钥。</para>
+
+ <para>如果密钥文件写作 <quote>-</quote>, 则表示使用标准输入。
+ 下面是关于如何使用多个密钥文件的例子:</para>
+
+ <screen>&prompt.root; <userinput>cat keyfile1 keyfile2 keyfile3 | geli init -K - /dev/da2</userinput></screen>
+ </step>
+
+ <step>
+ <title>将 provider 与所生成的密钥关联</title>
+
+ <screen>&prompt.root; <userinput>geli attach -k /root/da2.key /dev/da2</userinput>
+Enter passphrase:</screen>
+
+ <para>新的明文设备将被命名为
+ <filename>/dev/<replaceable>da2</replaceable>.eli</filename>。</para>
+
+ <screen>&prompt.root; <userinput>ls /dev/da2*</userinput>
+/dev/da2 /dev/da2.eli</screen>
+ </step>
+
+ <step>
+ <title>创建新的文件系统</title>
+
+ <screen>&prompt.root; <userinput>dd if=/dev/random of=/dev/da2.eli bs=1m</userinput>
+&prompt.root; <userinput>newfs /dev/da2.eli</userinput>
+&prompt.root; <userinput>mount /dev/da2.eli /private</userinput></screen>
+
+ <para>现在加密的文件系统应该已经可以被 &man.df.1; 看到,
+ 并处于可用状态了。</para>
+
+ <screen>&prompt.root; <userinput>df -H</userinput>
+Filesystem Size Used Avail Capacity Mounted on
+/dev/ad0s1a 248M 89M 139M 38% /
+/devfs 1.0K 1.0K 0B 100% /dev
+/dev/ad0s1f 7.7G 2.3G 4.9G 32% /usr
+/dev/ad0s1d 989M 1.5M 909M 0% /tmp
+/dev/ad0s1e 3.9G 1.3G 2.3G 35% /var
+/dev/da2.eli 150G 4.1K 138G 0% /private</screen>
+
+ </step>
+
+ <step>
+ <title>卸下卷并断开 provider</title>
+
+ <para>一旦在加密分区上的工作完成,
+ 并且不再需要 <filename role="directory">/private</filename> 分区,
+ 就应考虑将其卸下并将 <command>geli</command> 加密分区从内核上断开。</para>
+
+ <screen>&prompt.root; <userinput>umount /private</userinput>
+&prompt.root; <userinput>geli detach da2.eli</userinput></screen>
+ </step>
+ </procedure>
+
+ <para>关于如何使用 &man.geli.8; 的更多信息,
+ 可以在其联机手册中找到。</para>
+
+ <sect3>
+ <title>使用 <filename>geli</filename> <filename>rc.d</filename> 脚本</title>
+
+ <para><command>geli</command> 提供了一个 <filename>rc.d</filename> 脚本,
+ 它可以用于简化 <command>geli</command> 的使用。 通过
+ &man.rc.conf.5; 配置 <command>geli</command> 的方法如下:</para>
+
+ <screen>geli_devices="da2"
+geli_da2_flags="-p -k /root/da2.key"</screen>
+
+ <para>这将把 <filename>/dev/da2</filename> 配置为一个
+ <command>geli</command> provider, 其主密钥文件位于
+ <filename>/root/da2.key</filename>, 而
+ <command>geli</command> 在连接 provider 时将不使用口令字
+ (注意只有在 <command>geli</command> init 阶段使用了 -P 才可以这样做)。
+ 系统将在关闭之前将 <command>geli</command> provider 断开。</para>
+
+ <para>关于如何配置 <filename>rc.d</filename> 的详细信息可以在使用手册的
+ <link linkend="configtuning-rcd">rc.d</link> 一节中找到。</para>
+ </sect3>
+ </sect2>
+ </sect1>
+
+
+ <sect1 id="swap-encrypting">
+ <sect1info>
+ <authorgroup>
+ <author>
+ <firstname>Christian</firstname>
+ <surname>Br&uuml;ffer</surname>
+ <contrib>原作 </contrib>
+ </author>
+ </authorgroup>
+ </sect1info>
+
+ <title>对交换区进行加密</title>
+ <indexterm>
+ <primary>swap (交换区)</primary>
+ <secondary>encrypting (加密)</secondary>
+ </indexterm>
+
+ <para>从 &os; 5.3-RELEASE 开始, &os; 提供了易于配置的交换区加密机制。
+ 随所用的 &os; 版本, 可用的配置选项会有所不同,
+ 而配置方法也会有一些差异。 从 &os; 6.0-RELEASE 开始,
+ 已经可以使用 &man.gbde.8; 和 &man.geli.8;
+ 两种加密系统来进行交换区的加密操作了。 在更早的版本中,
+ 则只提供了 &man.gbde.8;。 前面所说的这两种加密系统,
+ 都用到了 <filename>encswap</filename> 这个
+ <link linkend="configtuning-rcd">rc.d</link> 脚本。</para>
+
+ <para>在前面的小节 <link linkend="disks-encrypting">如何加密磁盘分区</link>
+ 中, 已经就不同的加密系统之间的区别进行了简单的讨论。</para>
+
+ <sect2>
+ <title>为什么需要对交换区进行加密?</title>
+
+ <para>与加密磁盘分区类似, 加密交换区有助于保护敏感信息。
+ 为此, 我们不妨考虑一个需要处理敏感信息的程序, 例如,
+ 它需要处理口令。 如果这些口令一直保持在物理内存中, 则一切相安无事。
+ 然而, 如果操作系统开始将内存页换出到交换区,
+ 以便为其他应用程序腾出内存时, 这些口令就可能以未加密的形式写到磁盘上,
+ 并为攻击者所轻易获得。 加密交换区能够有效地解决这类问题。</para>
+ </sect2>
+
+ <sect2>
+ <title>准备</title>
+
+ <note>
+ <para>在本节余下的部分中, 我们约定使用 <devicename>ad0s1b</devicename>
+ 作为交换区。</para>
+ </note>
+
+ <para>到目前为止, 交换区仍是未加密的。
+ 很可能其中已经存有明文形式的口令或其他敏感数据。
+ 要纠正这一问题, 首先应使用随机数来覆盖交换分区的数据:</para>
+
+ <screen>&prompt.root; <userinput>dd if=/dev/random of=/dev/ad0s1b bs=1m</userinput></screen>
+ </sect2>
+
+ <sect2>
+ <title>使用 &man.gbde.8; 来加密交换区</title>
+
+ <para>如果使用 &os; 6.0-RELEASE 或更新的版本, 则 <filename>/etc/fstab</filename>
+ 中与交换区对应的行中, 设备名应追加
+ <literal>.bde</literal> 后缀:</para>
+
+ <screen>
+# Device Mountpoint FStype Options Dump Pass#
+/dev/ad0s1b.bde none swap sw 0 0
+ </screen>
+
+ <para>对于 &os; 6.0-RELEASE 之前的版本,
+ 还需要在 <filename>/etc/rc.conf</filename> 中加入:
+
+ <programlisting>gbde_swap_enable="YES"</programlisting>
+ </sect2>
+
+ <sect2>
+ <title>使用 &man.geli.8; 来加密分区</title>
+
+ <para>另一种方法是使用 &man.geli.8; 来达到加密交换区的目的,
+ 其过程与使用 &man.gbde.8; 大体相似。 此时, 在 <filename>/etc/fstab</filename>
+ 中交换区对应的行中, 设备名应追加
+ <literal>.eli</literal> 后缀:</para>
+
+ <screen>
+# Device Mountpoint FStype Options Dump Pass#
+/dev/ad0s1b.eli none swap sw 0 0
+ </screen>
+
+ <para>&man.geli.8; 默认情况下使用密钥长度为 256-位的
+ <acronym>AES</acronym> 加密算法。</para>
+
+ <para>当然, 这些默认值是可以通过 <filename>/etc/rc.conf</filename> 中的
+ <literal>geli_swap_flags</literal> 选项来修改的。 下面的配置表示让 rc.d 脚本
+ <filename>encswap</filename> 创建一个 &man.geli.8; 交换区,
+ 在其上使用密钥长度为 128-位 的 Blowfish 加密算法, 4096 kilobyte
+ 的扇区尺寸, 并采用 <quote>最后一次关闭时卸下</quote> 的策略:</para>
+
+ <programlisting>geli_swap_flags="-a blowfish -l 128 -s 4096 -d"</programlisting>
+
+ <para>请参见 &man.geli.8; 联机手册中关于 <command>onetime</command>
+ 命令的说明, 以了解其他可用的选项。</para>
+ </sect2>
+
+ <sect2>
+ <title>验证所作的配置能够发挥作用</title>
+
+ <para>在重启系统之后, 就可以使用
+ <command>swapinfo</command> 命令来验证加密交换区是否已经在正常运转了。</para>
+
+ <para>如果使用了 &man.gbde.8;, 则:</para>
+
+ <screen>&prompt.user; <userinput>swapinfo</userinput>
+Device 1K-blocks Used Avail Capacity
+/dev/ad0s1b.bde 542720 0 542720 0%
+ </screen>
+
+ <para>如果使用了 &man.geli.8;, 则:</para>
+
+ <screen>&prompt.user; <userinput>swapinfo</userinput>
+Device 1K-blocks Used Avail Capacity
+/dev/ad0s1b.eli 542720 0 542720 0%
+ </screen>
+ </sect2>
</sect1>
</chapter>
diff --git a/zh_CN.GB2312/books/handbook/eresources/chapter.sgml b/zh_CN.GB2312/books/handbook/eresources/chapter.sgml
index 054ee43bf4..b3d01cf035 100644
--- a/zh_CN.GB2312/books/handbook/eresources/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/eresources/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.174
+ Original Revision: 1.175
$FreeBSD$
-->
@@ -231,7 +231,7 @@
<row>
<entry>&a.eclipse.name;</entry>
- <entry>FreeBSD 上的 Eclipse EDI、工具、 富客户应用,
+ <entry>&os; 上的 Eclipse IDE、工具、 富客户应用,
以及 ports 的用户讨论。</entry>
</row>
@@ -829,12 +829,12 @@
<term>&a.eclipse.name;</term>
<listitem>
- <para><emphasis>&os; FreeBSD 上的 Eclipse EDI、工具、
+ <para><emphasis>&os; 上的 Eclipse IDE、工具、
富客户应用, 以及 ports 的用户讨论。</emphasis></para>
<para>这个邮件列表的目的, 是为在 &os; 平台上选择、 安装、
- 使用、 开发和维护 Eclipse EDI、 工具、 富客户应用的用户,
- 提供互助式支持, 以及为将 Eclipse EDI 和插件移植到
+ 使用、 开发和维护 Eclipse IDE、 工具、 富客户应用的用户,
+ 提供互助式支持, 以及为将 Eclipse IDE 和插件移植到
&os; 环境中提供帮助。</para>
<para>另一个目的是建立一个在 Eclipse 社区和 &os;
diff --git a/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml b/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml
index 57e2b0482f..410748db31 100644
--- a/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.62
+ Original Revision: 1.66
$FreeBSD$
-->
@@ -239,15 +239,6 @@
<para>更多的详细信息, 可以在 &os; 版本的 PF 网站上找到: <ulink
url="http://pf4freebsd.love2party.net/"></ulink>。</para>
- <para>OpenBSD PF 用户指南可以在这里找到:<ulink
- url="http://www.openbsd.org/faq/pf/"></ulink>。</para>
-
- <warning>
- <para>在 &os; 5.X 上的 PF 相当于 OpenBSD 3.5 版本。 以
- port 形式出现在 &os; Ports Collection 的版本相当于 OpenBSD
- 的 3.4 版。 在阅读用户指南时, 请注意这样的区别。</para>
- </warning>
-
<sect2>
<title>启用 PF</title>
@@ -258,11 +249,25 @@
<note>
<para>这个模块假定 <literal>options
- INET</literal> 和 <literal>device bpf</literal> 是存在的。 除非编译时指定了
- <literal>NOINET6</literal> (例如在 &man.make.conf.5; 中)
- 则还需要 <literal>options
- INET6</literal>。</para>
+ INET</literal> 和 <literal>device bpf</literal> 是存在的。
+ 除非编译时指定了
+ <literal>NOINET6</literal> (对 &os; 6.0-RELEASE 之前的版本) 或
+ <literal>NO_INET6</literal> (对更新一些的版本) (例如在
+ &man.make.conf.5; 中定义) 它还需要 <literal>options INET6</literal>。</para>
</note>
+
+ <para>一旦加载了这个内河模块, 或者将 PF 支持静态联编进内核,
+ 就可以随时通过 <command>pfctl</command> 来启用或禁用
+ <application>pf</application> 了。</para>
+
+ <para>下面的例子展示了如何启用
+ <application>pf</application>:</para>
+
+ <screen>&prompt.root; <userinput>pfctl -e</userinput></screen>
+
+ <para><command>pfctl</command> 命令提供了一种与
+ <application>pf</application> 防火墙交互的方法。 要了解进一步的信息,
+ 参考 &man.pfctl.8; 联机手册是一个不错的办法。</para>
</sect2>
<sect2>
@@ -383,6 +388,33 @@ options ALTQ_NOPCC # Required for SMP build</programlisting>
如果是 <acronym>SMP</acronym> 系统,
则必须使用它。</para>
</sect2>
+
+ <sect2>
+ <title>建立过滤规则</title>
+
+ <para>Packet Filter 会从
+ &man.pf.conf.5; 文件中读取配置规则, 并根据那里的规则修改、
+ 丢弃或让数据包通过。 默认安装的 &os;
+ 已经提供了一格默认的、 包含一些有用例子和注释的
+ <filename>/etc/pf.conf</filename>。</para>
+
+ <para>尽管 &os; 提供了自己的 <filename>/etc/pf.conf</filename>,
+ 但这个文件和 OpenBSD 中的语法是一样的。 OpenBSD
+ 开发团队提供了一个非常好的配置 <application>pf</application>
+ 资源, 它可以在
+ <ulink url="http://www.openbsd.org/faq/pf/"></ulink> 找到。</para>
+
+ <warning>
+ <para>在浏览 pf 用户手册时, 请时刻注意,
+ 在 &os; 中所包含的 pf 的版本和 OpenBSD 中是不一样的。 在 &os; 5.X 中
+ <application>pf</application> 相当于 OpenBSD 3.5 中的版本,
+ 而 &os; 6.X 中则相当于 OpenBSD 3.7。</para>
+ </warning>
+
+ <para>关于 <application>pf</application> 的配置和使用问题,
+ 可以在 &a.pf; 提出。 当然, 在提出问题之前,
+ 别忘了查阅邮件列表的存档。</para>
+ </sect2>
</sect1>
<sect1 id="firewalls-ipf">
@@ -534,6 +566,7 @@ ipmon_flags="-Ds" # D = 作为服务程序启动
# s = 使用 syslog 记录
# v = 记录 tcp 窗口大小、 ack 和顺序号(seq)
# n = 将 IP 和端口映射为名字</programlisting>
+
<para>如果您的 LAN 在防火墙后面, 并且使用了保留的私有 IP 地址范围,
那就需要增加下面的一些选项来启用 <acronym>NAT</acronym> 功能:</para>
@@ -775,7 +808,7 @@ LOG_ERR - 进一步记录含不完整的包头的数据包</screen>
<listitem>
<para>地址。 这实际上包括三部分:
- 源地址和端口 (以逗号分开), 一个 ->
+ 源地址和端口 (以逗号分开), 一个 -&gt;
符号, 以及目的地址和端口。
209.53.17.22,80 -> 198.73.220.17,1722.</para>
</listitem>
@@ -1316,7 +1349,7 @@ pass out quick on dc0 proto udp from any to xxx port = 53 keep state
# This rule is not needed for 'user ppp' type connection to the
# public Internet, so you can delete this whole group.
# Use the following rule and check log for IP address.
-# Then put IP address in commented out rule & delete first rule
+# Then put IP address in commented out rule &amp; delete first rule
pass out log quick on dc0 proto udp from any to any port = 67 keep state
#pass out quick on dc0 proto udp from any to z.z.z.z port = 67 keep state
@@ -1327,7 +1360,7 @@ pass out quick on dc0 proto tcp from any to any port = 80 flags S keep state
# Allow out secure www function https over TLS SSL
pass out quick on dc0 proto tcp from any to any port = 443 flags S keep state
-# Allow out send & get email function
+# Allow out send &amp; get email function
pass out quick on dc0 proto tcp from any to any port = 110 flags S keep state
pass out quick on dc0 proto tcp from any to any port = 25 flags S keep state
@@ -1337,7 +1370,7 @@ pass out quick on dc0 proto tcp from any to any port = 37 flags S keep state
# Allow out nntp news
pass out quick on dc0 proto tcp from any to any port = 119 flags S keep state
-# Allow out gateway & LAN users non-secure FTP ( both passive & active modes)
+# Allow out gateway &amp; LAN users non-secure FTP ( both passive &amp; active modes)
# This function uses the IP<acronym>NAT</acronym> built in FTP proxy function coded in
# the nat rules file to make this single rule function correctly.
# If you want to use the pkg_add command to install application packages
@@ -1380,7 +1413,7 @@ block in quick on dc0 from 0.0.0.0/8 to any #loopback
block in quick on dc0 from 169.254.0.0/16 to any #DHCP auto-config
block in quick on dc0 from 192.0.2.0/24 to any #reserved for docs
block in quick on dc0 from 204.152.64.0/23 to any #Sun cluster interconnect
-block in quick on dc0 from 224.0.0.0/3 to any #Class D & E multicast
+block in quick on dc0 from 224.0.0.0/3 to any #Class D &amp; E multicast
##### Block a bunch of different nasty things. ############
# That I do not want to see in the log
@@ -1592,7 +1625,7 @@ block in log first quick on dc0 all
<para><acronym>NAT</acronym> 规则的写法与下面的例子类似:</para>
- <programlisting>map <replaceable>IF</replaceable> <replaceable>LAN_IP_RANGE</replaceable> -> <replaceable>PUBLIC_ADDRESS</replaceable></programlisting>
+ <programlisting>map <replaceable>IF</replaceable> <replaceable>LAN_IP_RANGE</replaceable> -&gt; <replaceable>PUBLIC_ADDRESS</replaceable></programlisting>
<para>关键词 <literal>map</literal> 出现在规则的最前面。</para>
@@ -1666,7 +1699,7 @@ block in log first quick on dc0 all
<para>普通的 NAT 规则类似于:</para>
- <programlisting>map dc0 192.168.1.0/24 -> 0/32</programlisting>
+ <programlisting>map dc0 192.168.1.0/24 -&gt; 0/32</programlisting>
<para>上面的规则中, 包的源端口在包通过 IP<acronym>NAT</acronym>
时时不会发生变化的。 通过使用 portmap 关键字, 您可以要求
@@ -1674,13 +1707,13 @@ block in log first quick on dc0 all
比如说, 下面的规则将让
IP<acronym>NAT</acronym> 把源端口改为指定范围内的端口:</para>
- <programlisting>map dc0 192.168.1.0/24 -> 0/32 portmap tcp/udp 20000:60000</programlisting>
+ <programlisting>map dc0 192.168.1.0/24 -&gt; 0/32 portmap tcp/udp 20000:60000</programlisting>
<para>使用
<literal>auto</literal> 关键字可以让配置变得更简单一些, 它会要求
IP<acronym>NAT</acronym> 自动地检测可用的端口并使用:</para>
- <programlisting>map dc0 192.168.1.0/24 -> 0/32 portmap tcp/udp auto</programlisting>
+ <programlisting>map dc0 192.168.1.0/24 -&gt; 0/32 portmap tcp/udp auto</programlisting>
</sect3>
<sect3>
@@ -1690,17 +1723,17 @@ block in log first quick on dc0 all
此时 LAN 的地址会多到没办法使用一个公网地址表达的程度。
这时, 类似下面的规则需要进行修改:</para>
- <programlisting>map dc0 192.168.1.0/24 -> 204.134.75.1</programlisting>
+ <programlisting>map dc0 192.168.1.0/24 -&gt; 204.134.75.1</programlisting>
<para>目前的这个规则, 将所有的链接都通过 <hostid
role="ipaddr">204.134.75.1</hostid> 来映射。
可以把它改为一个范围:</para>
- <programlisting>map dc0 192.168.1.0/24 -> 204.134.75.1-10</programlisting>
+ <programlisting>map dc0 192.168.1.0/24 -&gt; 204.134.75.1-10</programlisting>
<para>或者使用 CIDR 记法指定的一组地址:</para>
- <programlisting>map dc0 192.168.1.0/24 -> 204.134.75.0/24</programlisting>
+ <programlisting>map dc0 192.168.1.0/24 -&gt; 204.134.75.0/24</programlisting>
</sect3>
</sect2>
@@ -1717,17 +1750,17 @@ block in log first quick on dc0 all
role="ipaddr">10.0.10.25</hostid>, 而您的唯一的公网 IP
地址是 <hostid role="ipaddr">20.20.20.5</hostid>, 则可以编写这样的规则:</para>
- <programlisting>rdr dc0 20.20.20.5/32 port 80 -> 10.0.10.25 port 80</programlisting>
+ <programlisting>rdr dc0 20.20.20.5/32 port 80 -&gt; 10.0.10.25 port 80</programlisting>
<para>或者:</para>
- <programlisting>rdr dc0 0/32 port 80 -> 10.0.10.25 port 80</programlisting>
+ <programlisting>rdr dc0 0/32 port 80 -&gt; 10.0.10.25 port 80</programlisting>
<para>另外, 也可以让 LAN 地址 <hostid
role="ipaddr">10.0.10.33</hostid> 上运行的 LAN DNS 服务器来处理公网上的
DNS 请求:</para>
- <programlisting>rdr dc0 20.20.20.5/32 port 53 -> 10.0.10.33 port 53 udp</programlisting>
+ <programlisting>rdr dc0 20.20.20.5/32 port 53 -&gt; 10.0.10.33 port 53 udp</programlisting>
</sect2>
<sect2>
@@ -1759,15 +1792,15 @@ block in log first quick on dc0 all
<para>下面的规则可以处理来自内网的 FTP 访问:</para>
- <programlisting>map dc0 10.0.10.0/29 -> 0/32 proxy port 21 ftp/tcp</programlisting>
+ <programlisting>map dc0 10.0.10.0/29 -&gt; 0/32 proxy port 21 ftp/tcp</programlisting>
<para>这个规则能够处理来自网关的 FTP 访问:</para>
- <programlisting>map dc0 0.0.0.0/0 -> 0/32 proxy port 21 ftp/tcp</programlisting>
+ <programlisting>map dc0 0.0.0.0/0 -&gt; 0/32 proxy port 21 ftp/tcp</programlisting>
<para>这个则处理所有来自内网的非 FTP 网络流量:</para>
- <programlisting>map dc0 10.0.10.0/29 -> 0/32</programlisting>
+ <programlisting>map dc0 10.0.10.0/29 -&gt; 0/32</programlisting>
<para>FTP map 规则应该在普通的 map 规则之前出现。
所有的包会从最上面的第一个规则开始进行检查。
@@ -1793,7 +1826,7 @@ block in log first quick on dc0 all
pass out quick on rl0 proto tcp from any to any port = 21 flags S keep state
# Allow out passive mode data channel high order port numbers
-pass out quick on rl0 proto tcp from any to any port > 1024 flags S keep state
+pass out quick on rl0 proto tcp from any to any port &gt; 1024 flags S keep state
# Active mode let data channel in from FTP server
pass in quick on rl0 proto tcp from any to any port = 20 flags S keep state</programlisting>
@@ -2550,7 +2583,7 @@ pif="dc0" # public interface name of NIC
# This rule is not needed for .user ppp. connection to the public Internet.
# so you can delete this whole group.
# Use the following rule and check log for IP address.
-# Then put IP address in commented out rule & delete first rule
+# Then put IP address in commented out rule &amp; delete first rule
&dollar;cmd 00120 allow log udp from any to any 67 out via &dollar;pif keep-state
#&dollar;cmd 00120 allow udp from any to x.x.x.x 67 out via &dollar;pif keep-state
@@ -2560,11 +2593,11 @@ pif="dc0" # public interface name of NIC
# Allow out secure www function https over TLS SSL
&dollar;cmd 00220 allow tcp from any to any 443 out via &dollar;pif setup keep-state
-# Allow out send & get email function
+# Allow out send &amp; get email function
&dollar;cmd 00230 allow tcp from any to any 25 out via &dollar;pif setup keep-state
&dollar;cmd 00231 allow tcp from any to any 110 out via &dollar;pif setup keep-state
-# Allow out FBSD (make install & CVSUP) functions
+# Allow out FBSD (make install &amp; CVSUP) functions
# Basically give user root "GOD" privileges.
&dollar;cmd 00240 allow tcp from me to any out via &dollar;pif setup keep-state uid root
@@ -2603,7 +2636,7 @@ pif="dc0" # public interface name of NIC
&dollar;cmd 00305 deny all from 169.254.0.0/16 to any in via &dollar;pif #DHCP auto-config
&dollar;cmd 00306 deny all from 192.0.2.0/24 to any in via &dollar;pif #reserved for docs
&dollar;cmd 00307 deny all from 204.152.64.0/23 to any in via &dollar;pif #Sun cluster interconnect
-&dollar;cmd 00308 deny all from 224.0.0.0/3 to any in via &dollar;pif #Class D & E multicast
+&dollar;cmd 00308 deny all from 224.0.0.0/3 to any in via &dollar;pif #Class D &amp; E multicast
# Deny public pings
&dollar;cmd 00310 deny icmp from any to any in via &dollar;pif
@@ -2641,12 +2674,12 @@ pif="dc0" # public interface name of NIC
&dollar;cmd 00410 allow tcp from any to me 22 in via &dollar;pif setup limit src-addr 2
# Allow in non-secure Telnet session from public Internet
-# labeled non-secure because ID & PW are passed over public
+# labeled non-secure because ID &amp; PW are passed over public
# Internet as clear text.
# Delete this sample group if you do not have telnet server enabled.
&dollar;cmd 00420 allow tcp from any to me 23 in via &dollar;pif setup limit src-addr 2
-# Reject & Log all incoming connections from the outside
+# Reject &amp; Log all incoming connections from the outside
&dollar;cmd 00499 deny log all from any to any in via &dollar;pif
# Everything else is denied by default
@@ -2773,7 +2806,7 @@ ipfw -q -f flush
&dollar;cmd 305 deny all from 169.254.0.0/16 to any in via &dollar;pif #DHCP auto-config
&dollar;cmd 306 deny all from 192.0.2.0/24 to any in via &dollar;pif #reserved for docs
&dollar;cmd 307 deny all from 204.152.64.0/23 to any in via &dollar;pif #Sun cluster
-&dollar;cmd 308 deny all from 224.0.0.0/3 to any in via &dollar;pif #Class D & E multicast
+&dollar;cmd 308 deny all from 224.0.0.0/3 to any in via &dollar;pif #Class D &amp; E multicast
# Authorized inbound packets
&dollar;cmd 400 allow udp from xx.70.207.54 to any 68 in &dollar;ks
@@ -2850,11 +2883,11 @@ pif="rl0" # public interface name of NIC
# Allow out secure www function https over TLS SSL
&dollar;cmd 050 &dollar;skip tcp from any to any 443 out via &dollar;pif setup keep-state
-# Allow out send & get email function
+# Allow out send &amp; get email function
&dollar;cmd 060 &dollar;skip tcp from any to any 25 out via &dollar;pif setup keep-state
&dollar;cmd 061 &dollar;skip tcp from any to any 110 out via &dollar;pif setup keep-state
-# Allow out FreeBSD (make install & CVSUP) functions
+# Allow out FreeBSD (make install &amp; CVSUP) functions
# Basically give user root "GOD" privileges.
&dollar;cmd 070 &dollar;skip tcp from me to any out via &dollar;pif setup keep-state uid root
@@ -2892,7 +2925,7 @@ pif="rl0" # public interface name of NIC
&dollar;cmd 305 deny all from 169.254.0.0/16 to any in via &dollar;pif #DHCP auto-config
&dollar;cmd 306 deny all from 192.0.2.0/24 to any in via &dollar;pif #reserved for docs
&dollar;cmd 307 deny all from 204.152.64.0/23 to any in via &dollar;pif #Sun cluster
-&dollar;cmd 308 deny all from 224.0.0.0/3 to any in via &dollar;pif #Class D & E multicast
+&dollar;cmd 308 deny all from 224.0.0.0/3 to any in via &dollar;pif #Class D &amp; E multicast
# Deny ident
&dollar;cmd 315 deny tcp from any to any 113 in via &dollar;pif
@@ -2927,15 +2960,15 @@ pif="rl0" # public interface name of NIC
&dollar;cmd 380 allow tcp from any to me 22 in via &dollar;pif setup limit src-addr 2
# Allow in non-secure Telnet session from public Internet
-# labeled non-secure because ID & PW are passed over public
+# labeled non-secure because ID &amp; PW are passed over public
# Internet as clear text.
# Delete this sample group if you do not have telnet server enabled.
&dollar;cmd 390 allow tcp from any to me 23 in via &dollar;pif setup limit src-addr 2
-# Reject & Log all unauthorized incoming connections from the public Internet
+# Reject &amp; Log all unauthorized incoming connections from the public Internet
&dollar;cmd 400 deny log all from any to any in via &dollar;pif
-# Reject & Log all unauthorized out going connections to the public Internet
+# Reject &amp; Log all unauthorized out going connections to the public Internet
&dollar;cmd 450 deny log all from any to any out via &dollar;pif
# This is skipto location for outbound stateful rules
diff --git a/zh_CN.GB2312/books/handbook/geom/chapter.sgml b/zh_CN.GB2312/books/handbook/geom/chapter.sgml
index 89974b51ef..6aa6745e14 100644
--- a/zh_CN.GB2312/books/handbook/geom/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/geom/chapter.sgml
@@ -2,9 +2,8 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.7
+ Original Revision: 1.22
$FreeBSD$
-
-->
<chapter id="GEOM">
@@ -31,14 +30,14 @@
<see>GEOM</see>
</indexterm>
- <para>本章将介绍以 &os; 新的 GEOM 框架来使用磁盘。
+ <para>本章将介绍以 &os; GEOM 框架来使用磁盘。
这包括了使用这一框架来配置的主要的 <acronym
role="Redundant Array of Inexpensive Disks">RAID</acronym>
控制工具。 这一仗不会深入讨论 GEOM
如何处理或控制 I/O、 其下层的子系统或代码。
您可以从 &man.geom.4; 联机手册及其众多 SEE ALSO 参考文献中得到这些信息。
这一章也不是对 <acronym>RAID</acronym> 配置的权威介绍,
- 它只介绍由 GEOM 支持的 <acronym>RAID</acronym>
+ 它只介绍由 支持GEOM 的 <acronym>RAID</acronym>
级别。</para>
<para>读完这章, 您将了解:</para>
@@ -145,7 +144,7 @@
<step><para>确信存在合适的挂接点 (mount point)。 如果这个卷将成为根分区,
那么暂时把它挂接到其他位置i, 如 <filename
- role="directory">/mnt</filename>。</para>
+ role="directory">/mnt</filename>:</para>
<screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen>
</step>
@@ -165,12 +164,6 @@ XXX: What message? Put it inside the screen output above.
-->
</step>
- <step><para>如果卷将被用于作为根设备来启动系统,
- 还必须在创建文件系统之前执行下面的命令:</para>
-
- <screen>&prompt.root; <userinput>fdisk -vBI /dev/stripe/st0</userinput></screen>
- </step>
-
<step><para>此外还需要用下面的命令在新卷上创建分区表:</para>
<screen>&prompt.root; <userinput>bsdlabel -wB /dev/stripe/st0</userinput></screen>
@@ -179,20 +172,20 @@ XXX: What message? Put it inside the screen output above.
<step><para>上述过程将在
<filename role="directory">/dev/stripe</filename>
- 目录中的 <filename>st0</filename> 设备基础上建立两个新设备。
- 这包括 <filename>st0a</filename> 和
- <filename>st0c</filename>。 现在需要在
- <filename>st0a</filename> 设备上用下述
- <command>newfs</command> 命令建立文件系统:</para>
+ 目录中的 <devicename>st0</devicename> 设备基础上建立两个新设备。
+ 这包括 <devicename>st0a</devicename> 和
+ <devicename>st0c</devicename>。 现在需要在
+ <devicename>st0a</devicename> 设备上用下述
+ <command>newfs</command> 命令来建立文件系统:</para>
<screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen>
<para>在屏幕上将滚过一些数字, 整个操作应该能在数秒内完成。
- 现在可以挂接刚刚做好的卷了:</para>
+ 现在可以挂接刚刚做好的卷了。</para>
</step>
</procedure>
- <para>下列命令可以用来手工挂接新创建的条带盘。</para>
+ <para>下列命令可以用来手工挂接新创建的条带盘:</para>
<screen>&prompt.root; <userinput>mount /dev/stripe/st0a /mnt</userinput></screen>
@@ -203,9 +196,9 @@ XXX: What message? Put it inside the screen output above.
<screen>&prompt.root; <userinput>echo "/dev/stripe/st0a /mnt ufs rw 2 2" \</userinput>
<userinput>&gt;&gt; /etc/fstab</userinput></screen>
- <para>此外, geom 模块也必须在系统初始化过程中自动加载,
- 这可以通过在
- <filename>/boot/loader.conf</filename> 中进行适当的设置来达到。</para>
+ <para>此外, <filename>geom_stripe</filename> 模块也必须通过在
+ <filename>/boot/loader.conf</filename> 中增加下述设置,
+ 以便在系统初始化过程中自动加载。</para>
<screen>&prompt.root; <userinput>echo 'geom_stripe_load="YES"' &gt;&gt; /boot/loader.conf</userinput></screen>
@@ -235,7 +228,7 @@ XXX: What message? Put it inside the screen output above.
<para>首先需要把 &os; 安装到第一块磁盘上, 并建立两个分区。
第一个分区将成为交换区, 其尺寸应该是两倍的
<acronym>RAM</acronym> 尺寸, 而余下的空间,
- 则作为根 (<filename role="directory">/</filename> 文件系统来使用。
+ 则作为根 (<filename role="directory">/</filename>) 文件系统来使用。
当然, 也可以为其他挂接点划分不同的分区;
但是, 这将使难度提高一个量级,
因为您将不得不手工修改 &man.bsdlabel.8; 和 &man.fdisk.8;
@@ -250,21 +243,25 @@ XXX: What message? Put it inside the screen output above.
<screen>&prompt.root; <userinput>gmirror label -vnb round-robin gm0 /dev/da1</userinput></screen>
- <note>
- <para>这个命令将在
- <filename role="directory">/dev/mirror</filename>
- 目录中创建 <filename>gm0</filename>、 <filename>gm0s1</filename>、
- <filename>gm0s1a</filename>, 以及 <filename>gm0s1c</filename>
- 设备节点。</para>
- </note>
+ <para>系统应会给出下列回应:</para>
+ <screen>
+Metadata value stored on /dev/da1.
+Done.</screen>
<para>初始化 GEOM, 这将加载
<filename>/boot/kernel/geom_mirror.ko</filename> 内核模块:</para>
- <screen>&prompt.root; <userinput>geom load</userinput></screen>
+ <screen>&prompt.root; <userinput>gmirror load</userinput></screen>
+
+ <note>
+ <para>这个命令应该会在
+ <filename role="directory">/dev/mirror</filename>
+ 目录中创建
+ <devicename>gm0</devicename> 设备节点。</para>
+ </note>
- <para>安装通用的 <command>fdisk</command> 标签和引导区代码到刚刚创建的
- <filename>gm0</filename> 设备上:</para>
+ <para>安装通用的 <command>fdisk</command> 标签以及引导区代码,
+ 到刚刚创建的 <devicename>gm0</devicename> 设备上:</para>
<screen>&prompt.root; <userinput>fdisk -vBI /dev/mirror/gm0</userinput></screen>
@@ -279,8 +276,8 @@ XXX: What message? Put it inside the screen output above.
它们必须与另一个盘上对应的区段和分区匹配。</para>
</note>
- <para>使用 &man.newfs.8; 工具来创建默认的文件系统到
- <filename>gm0s1a</filename> 设备节点上:</para>
+ <para>使用 &man.newfs.8; 工具来,
+ 在 <devicename>gm0s1a</devicename> 设备节点上创建默认的文件系统:</para>
<screen>&prompt.root; <userinput>newfs -U /dev/mirror/gm0s1a</userinput></screen>
@@ -288,26 +285,30 @@ XXX: What message? Put it inside the screen output above.
只需看看是否有错误提示就可以了, 如果没问题, 接下来把它挂到
<filename role="directory">/mnt</filename> 挂接点上面:</para>
- <screen>&prompt.root <userinput>mount /dev/mirror/gm0s1a /mnt</userinput></screen>
+ <screen>&prompt.root; <userinput>mount /dev/mirror/gm0s1a /mnt</userinput></screen>
- <para>现在需要把酥藕有引导盘上的数据迁移到新的文件系统上了。
+ <para>现在需要把所有引导盘上的数据迁移到新的文件系统上了。
下面的例子使用了 &man.dump.8; 和 &man.restore.8;
- 这两个命令; 不过, 用 &man.dd.1; 在这里也可以达到完全一样的目的。
- 我们并不使用 &man.tar.1; 因为它并不覆盖引导区的代码,
- 而那样一定会造成出错的。</para>
+ 这两个命令; 不过, 用 &man.dd.1; 在这里也可以达到完全一样的目的。</para>
- <screen>&prompt.root; <userinput>dump -L -0 -f- / |(cd /mnt && restore -r -v -f-)</userinput></screen>
+ <screen>&prompt.root; <userinput>dump -L -0 -f- / |(cd /mnt &amp;&amp; restore -r -v -f-)</userinput></screen>
<para>这个操作必须在所有文件系统上都作一遍。 您可以将前述命令中的文件系统,
改为所希望的文件系统的位置。</para>
<para>接下来应该编辑复制出来的 <filename>/mnt/etc/fstab</filename>
- 文件, 并删去或注释掉交换分区。 此外应该修改文件系统信息,
+ 文件, 并删去或注释掉交换文件
+ <footnote>
+ <para>需要注意的是,
+ 在 <filename>fstab</filename> 注释掉交换文件,
+ 通常会需要您以其他方式重建交换空间。
+ 请参见 <xref linkend="adding-swap-space"> 以了解进一步的细节。</para>
+ </footnote>。 修改其他文件系统对应的信息,
以便让它们使用新盘。 参考下面的例子:</para>
<programlisting># Device Mountpoint FStype Options Dump Pass#
#/dev/da0s2b none swap sw 0 0
-/dev/mirror/gm0sa1 / ufs rw 1 1</programlisting>
+/dev/mirror/gm0s1a / ufs rw 1 1</programlisting>
<para>接下来需要建一个 <filename>boot.conf</filename> 文件,
在当前和新盘的根分区上各放一份。 这个文件将
@@ -324,22 +325,22 @@ XXX: What message? Put it inside the screen output above.
则还有一根救命稻草。</para>
</note>
- <para>然后再到
- <filename>/boot/loader.conf:</filename> 中加入一些设置:</para>
+ <para>接下来, 在
+ <filename>/boot/loader.conf</filename> 中加入一些新的设置:</para>
- <screen>&prompt.root; <userinput>echo 'geom_mirror_load="YES"' &gt;&gt; /boot/loader.conf</userinput></screen>
+ <screen>&prompt.root; <userinput>echo 'geom_mirror_load="YES"' &gt;&gt; /mnt/boot/loader.conf</userinput></screen>
- <para>这将让 &man.loader.8; 在系统初始化过程中自动加载
- <filename>geom_mirror.ko</filename>。</para>
+ <para>者将让 &man.loader.8; 在系统初始化过程中自动加载
+ <filename>geom_mirror.ko</filename> 模块。</para>
<para>最后重新启动系统:</para>
<screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
<para>如果一切顺利, 系统将从
- <filename>gm0s1a</filename> 设备启动, 并给出 <command>login</command>
- 提示等待用户登录。 如果发生错误, 请查阅接下来的故障排除环节。 我们继续将
- <filename>da0</filename> 磁盘加入 <filename>gm0</filename>
+ <devicename>gm0s1a</devicename> 设备启动, 并给出 <command>login</command>
+ 提示等待用户登录。 如果发生错误, 请查阅接下来的故障排除环节。 我们接着将
+ <devicename>da0</devicename> 磁盘也加入 <devicename>gm0</devicename>
设备:</para>
<screen>&prompt.root; <userinput>gmirror configure -a gm0</userinput>
@@ -347,8 +348,8 @@ XXX: What message? Put it inside the screen output above.
<para>此处 <option>-a</option> 告诉 &man.gmirror.8; 采用自动同步,
或换言之: 自动地将磁盘的写操作做镜像处理。 联机手册中详细解释了如何重建,
- 以及替换磁盘, 只不过它用 <filename>data</filename>
- 表示这里的 <filename>gm0</filename>。</para>
+ 以及替换磁盘, 只不过它用 <devicename>data</devicename>
+ 表示这里的 <devicename>gm0</devicename>。</para>
<sect2>
<title>故障排除</title>
diff --git a/zh_CN.GB2312/books/handbook/install/chapter.sgml b/zh_CN.GB2312/books/handbook/install/chapter.sgml
index 3bafee747b..e20d55178b 100644
--- a/zh_CN.GB2312/books/handbook/install/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/install/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.329
+ Original Revision: 1.331
$FreeBSD$
-->
@@ -244,9 +244,9 @@
目录包含两个免费的工具也可以完成这个工作:<application>FIPS</application> 以及
<application>PResizer</application>,它们的文档可以在同一目录中找到。<application>FIPS</application>、
<application>PResizer</application>,和 <application>&partitionmagic;</application>
- 能够改变 <acronym>FAT16</acronym> 以及 <acronym>FAT32</acronym> 分区大小&mdash;
- 在 &ms-dos; 方式下使用以及 &windows; ME。这些工具的说明文件可以在同一个目录下面找到
- <application>&partitionmagic;</application> 是知道的唯一能改变 <acronym>NTFS</acronym>
+ 能够改变 <acronym>FAT16</acronym> 以及 <acronym>FAT32</acronym> 分区的大小 &mdash;
+ 它们可以在 &ms-dos; 以及 &windows; ME 系统中使用。 这些工具的说明文件可以在同一个目录下面找到
+ <application>&partitionmagic;</application> 是目前已知的唯一能改变 <acronym>NTFS</acronym>
分区大小的应用软件。</para>
<warning>
@@ -516,9 +516,9 @@ pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
<important>
<para>您的 FTP 程序必须使用 <emphasis>二进制模式</emphasis> 来下载这些映
- 像文件。有些浏览器只会用<emphasis>text</emphasis> (或<emphasis>ASCII
- </emphasis>) 模式来传输数据,用这些浏览器下载的映像文件做成的软盘可
- 能无法正常开机。</para>
+ 像文件。有些浏览器只会用 <emphasis>text</emphasis> (或<emphasis>ASCII
+ </emphasis>) 模式来传输数据,
+ 用这些浏览器下载的映像文件做成的软盘将无法正常开机。</para>
</important>
</step>
@@ -769,9 +769,9 @@ Booting [kernel] in 9 seconds... _</screen>
<sect2 id="start-userconfig">
<title>配置内核</title>
- <note><para>从FreeBSD 5.0 版以后, 用户配置已经不赞成使用新的 &man.device.hints.5;
- 方法,更多的信息 &man.device.hints.5; 请访问 <xref linkend="device-hints">
- </para></note>
+ <note><para>从 FreeBSD 5.0 开始, 改用了新的 &man.device.hints.5;
+ 方式来进行配置, 而淘汰了先前的 userconfig 。 关于这一机制的进一步介绍,
+ 请参考 &man.device.hints.5; 或阅读 <xref linkend="device-hints"></para></note>
<para><firstterm>内核</firstterm>是操作系统最核心的部分。它负责很多工作,
包括存取系统上所有设备,如硬盘、网卡、声卡等等。每一个 FreeBSD
@@ -1067,9 +1067,10 @@ Mounting root from ufs:/dev/md0c
/stand/sysinstall running as init on vty0</screen>
</figure>
- <para>仔细检查探测结果以确定 FreeBSD 找到所有您期望出现的设备。如果设备没有
- 探测到,那么就不会列出。如果此设备需要设定 IRQ 以及 IO 端口地址,请您再确定
- 是否设定的正确。</para>
+ <para>仔细检查探测结果以确定 FreeBSD 找到所有您期望出现的设备。
+ 如果设备没有被探测到, 那么就不会列出。
+ 如果此设备需要配置 IRQ 以及 IO 端口地址,
+ 请检查输入是否正确。</para>
<para>如果您需要改变某些设备的设置,您可以很容易地退出 <application>sysinstall
</application> 程序,然后从头重新来过。这也有助您熟悉这些过程。</para>
@@ -1295,7 +1296,7 @@ Mounting root from ufs:/dev/md0c
复制过来的,结果却没办法像以前那样用。</para>
<para>当使用 FreeBSD 以前,请将 BIOS 中的硬盘开机顺序调回正常的顺序,并且以后
- 不要再改变。如果您仍然需要交换硬盘,那请用硬件的方式,打开机壳,调整调线。</para>
+ 不要再改变。 如果一定要交换硬盘顺序, 那请用硬件的方式, 打开机壳并调整调线。</para>
<sidebar>
<title>范例:Bill 和 Fred 的安装历险</title>
@@ -1540,10 +1541,10 @@ Mounting root from ufs:/dev/md0c
<title>使用<application>Disklabel</application>
创建分区</title>
- <para>您现在必须在刚刚建立好的分区中规划一些分区。请记住,每个分区代号是
- <literal>a</literal> 到 <literal>h</literal>, 并且分区
- partitions <literal>b</literal>, <literal>c</literal>以及
- <literal>d</literal> 为习惯使用的特殊分区,不应该随意变动。</para>
+ <para>您现在必须在刚刚建立好的 slice 中规划一些 label。 请注意, 每个 label 的代号是
+ <literal>a</literal> 到 <literal>h</literal>, 另外, 习惯上
+ <literal>b</literal>、 <literal>c</literal> 和
+ <literal>d</literal> 是有特殊用途的, 不应该随意变动。</para>
<para>某些应用程序可以利用一些特殊的分区而达到较好的效果,尤其是分区分散
在不同的硬盘的时候。但是,现在您是第一次安装FreeBSD,所以不需要去烦恼如
@@ -1928,7 +1929,7 @@ Mounting root from ufs:/dev/md0c
The Ports Collection is a very valuable resource and well worth having
on your /usr partition, so it is advisable to say Yes to this option.
- For more information on the Ports Collection & the latest ports,
+ For more information on the Ports Collection &amp; the latest ports,
visit:
http://www.FreeBSD.org/ports
@@ -2282,8 +2283,8 @@ installation menus to retry whichever operations have failed.
<para>如果这台机器要作为本地网络和其它机器之间传送数据包的网关,请选择
&gui.yes; 然后按 <keycap>Enter</keycap>。
- 如果这台机器只是网络上的一个节点主,请选择 &gui.no;
- 并按<keycap>Enter</keycap> 继续。</para>
+ 如果这台机器只是网络上的普通节点,请选择 &gui.no;
+ 并按 <keycap>Enter</keycap> 继续。</para>
</sect2>
<sect2 id="inetd-services">
@@ -2332,7 +2333,7 @@ use the current settings.
[ Yes ] No</screen>
<para>选择 &gui.yes; 将允许您添加网络服务
- (将相应网络服务每行开头的<literal>#</literal>除掉即呆。</para>
+ (或将相应网络服务每行开头的 <literal>#</literal> 除掉即可。)</para>
<figure id="inetd-edit">
<title>编辑 <filename>inetd.conf</filename>配置文件</title>
@@ -3227,7 +3228,7 @@ Press enter to continue, or ctrl-c to abort.</screen>
<screen>First specify a mouse protocol type. Choose one from the following list:
1. Microsoft compatible (2-button protocol)
- 2. Mouse Systems (3-button protocol) & FreeBSD moused protocol
+ 2. Mouse Systems (3-button protocol) &amp; FreeBSD moused protocol
3. Bus Mouse
4. PS/2 Mouse
5. Logitech Mouse (serial, old type, Logitech protocol)
@@ -3581,7 +3582,7 @@ Enter a number to choose the default depth.
4</screen>
- <para>最后,要保存您的配置,确定输入 <filename>/etc/XF86Config</filename>
+ <para>最后,要保存您的配置,确定输入 <filename>/etc/X11/XF86Config</filename>
作为保存位置。</para>
<screen>I am going to write the XF86Config file now. Make sure you don't accidently
@@ -3762,7 +3763,7 @@ failed. Would you like to try again?
<title>添加用户/组</title>
<para>您至少要在安装过程中添加一个用户,以便于您能不用<username>root</username>
- 来登陆使用系统。根分区通常比较小,用 <username>root</username> 来运行应用程序
+ 来登录使用系统。根分区通常比较小,用 <username>root</username> 来运行应用程序
可能会快一点。但这样会有一些危险:</para>
<screen> User Confirmation Requested
@@ -3806,7 +3807,7 @@ failed. Would you like to try again?
<term>Login ID</term>
<listitem>
- <para>新用户的登陆名(强制性必须写)</para>
+ <para>新用户的登录名(强制性必须写)</para>
</listitem>
</varlistentry>
@@ -3822,7 +3823,7 @@ failed. Would you like to try again?
<term>Group</term>
<listitem>
- <para>这个用户的登陆组名(如果不写,系统自动添加)</para>
+ <para>这个用户的登录组名(如果不写,系统自动添加)</para>
</listitem>
</varlistentry>
@@ -3861,15 +3862,15 @@ failed. Would you like to try again?
<varlistentry>
<term>Login shell</term>
<listitem>
- <para>用户登陆的shell(默认是<filename>/bin/sh</filename>)。</para>
+ <para>用户登录的shell(默认是<filename>/bin/sh</filename>)。</para>
</listitem>
</varlistentry>
</variablelist>
- <para>登陆的shell可以在 <filename>/bin/sh</filename> 到
+ <para>登录的shell可以在 <filename>/bin/sh</filename> 到
<filename>/usr/local/bin/bash</filename> 中修改。
<application>bash</application> shell 是先前默认安装的shell。
- 不要使用一个不存在的或您不能登陆的shell。最通用的shell是使用
+ 不要使用一个不存在的或您不能登录的shell。最通用的shell是使用
BSD-world 的 C shell,可以通过指定<filename>/bin/tcsh</filename>来修改。</para>
<para>用户也可以被添加到 <groupname>wheel</groupname> 组中成了一个超级用户,
@@ -3969,7 +3970,7 @@ Retype new password :</screen>
<sect3 id="freebsdboot-i386">
<title>FreeBSD 在 &i386;上启动</title>
- <para>如果启动正常,您将看到在屏幕上有很多信息滚动,最后您会看到登陆命令行。
+ <para>如果启动正常,您将看到在屏幕上有很多信息滚动,最后您会看到登录命令行。
您可以通过键入 <keycap>Scroll-Lock</keycap>和使用 <keycap>PgUp</keycap>
与 <keycap>PgDn</keycap>来查看信息,再键入 <keycap>Scroll-Lock</keycap>
回到命令行。</para>
@@ -3977,9 +3978,9 @@ Retype new password :</screen>
<para>记录信息可能不会显示(缓冲区的限制)。您可以通过键入
<command>dmesg</command> 来查看。</para>
- <para>使用您在安装过程中设置的用户名/密码来登陆。(例子中使用
+ <para>使用您在安装过程中设置的用户名/密码来登录。(例子中使用
<username>rpratt</username>)。除非必须的时候请不要用
- <username>root</username> 用户登陆。</para>
+ <username>root</username> 用户登录。</para>
<para>典型的启动信息:(忽略版本信息)</para>
@@ -4113,8 +4114,8 @@ Password:</screen>
<para>生成 RSA 和 DSA密钥在比较慢的机器上可能要花很长时间。这只是一个
新安装后的首次启动,以后的启动会变得更快一点。</para>
- <para>如果 X 服务器已经配置好了,默认的桌面也选择好了,就可以在命令行键入
- <command>startx</command> 来启动视察环境。</para>
+ <para>如果已经完成 X 服务器的配置, 且指定了默认的桌面窗口管理器,
+ 就可以在命令行键入 <command>startx</command> 来启动它了。</para>
</sect3>
@@ -4406,7 +4407,7 @@ Please press any key to reboot.</screen>
<literal>/boot/loader -h</literal>这行的叫做<filename>boot.config</filename>
的文件。所有这些是为了给引导程序一个标记以引导进入串行控制台。</para>
- <screen>&prompt.root; <userinput>echo "/boot/loader -h" > boot.config</userinput></screen>
+ <screen>&prompt.root; <userinput>echo "/boot/loader -h" &gt; boot.config</userinput></screen>
<para>现在您已经正确配置好了软盘,您必须使用 &man.umount.8;
命令卸下软盘。</para>
@@ -4843,7 +4844,7 @@ Please press any key to reboot.</screen>
如果您要使用PCMCIA接口的以太网,在启动计算机 <emphasis>之前</emphasis>,
确信已经把它插好了。目前,FreeBSD还不支持PCMCIA的热插拔。</para>
- <para>通过网络安装,您可能需要知道IP地址,地址掩码,还有机器的字。如果您
+ <para>通过网络安装,您可能需要知道IP地址,地址掩码,还有机器的名字。如果您
通过PPP进行安装,就不需要静态的IP地址,IP地址会由ISP给您自动指派。您的系统
管理员会告诉您通过网络安装的细节。如果您通过主机名而不是IP地址来访问其它主
机,需要有一个域名服务器或一个网关地址(如果您使用PPP进行安装,那它就您的
diff --git a/zh_CN.GB2312/books/handbook/introduction/chapter.sgml b/zh_CN.GB2312/books/handbook/introduction/chapter.sgml
index b07fd807fa..2725ad9a3d 100644
--- a/zh_CN.GB2312/books/handbook/introduction/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/introduction/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.110
+ Original Revision: 1.111
$FreeBSD$
-->
@@ -659,7 +659,7 @@
</indexterm>
<listitem>
<para>FreeBSD 的中央源代码树是由
- <ulink url="http://www.cvshome.org/">CVS</ulink>
+ <ulink url="http://ximbiot.com/cvs/wiki/">CVS</ulink>
(并行版本控制系统)来维护的。CVS 是一个与
FreeBSD 捆绑的可自由获得的源代码控制工具。
主 <ulink url="http://www.FreeBSD.org/cgi/cvsweb.cgi">CVS
diff --git a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml
index 1e4c7bec4a..0007366821 100644
--- a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
- Original Revision: 1.158
+ Original Revision: 1.163
$FreeBSD$
-->
@@ -108,7 +108,7 @@
<para>使用更少的内存。 定制的内核通常会比
<filename>GENERIC</filename> 内核使用更少的内存,
由于内核必须时刻处于物理内存中, 因此这就显得更加重要。
- 给予这样的原因, 对于内存较小的系统来说,
+ 基于这样的原因, 对于内存较小的系统来说,
定制内核将发挥更大的作用。</para>
</listitem>
@@ -347,12 +347,18 @@
如果您只安装了内核的源代码, 就只能使用前面所介绍的传统方法了。</para>
</note>
- <note>
- <para>在 &os;&nbsp;4.2 和更早的版本中, 应把前面的
- <literal>KERNCONF=</literal> 替换为 <literal>KERNEL=</literal>。
- 2001 年 2 月 2 日 之前的 4.2-STABLE
- 不能识别 <literal>KERNCONF=</literal>。</para>
- </note>
+ <tip>
+ <para>默认情况下, 在联编您所定制的内核时,
+ <emphasis>全部</emphasis> 内核模块也会同时参与构建。
+ 如果您希望更快地升级内核, 或者只希望联编您所需要的模块,
+ 则应在联编之前编辑 <filename>/etc/make.conf</filename>:</para>
+
+ <programlisting>MODULES_OVERRIDE = linux acpi sound/sound sound/driver/ds1 ntfs</programlisting>
+
+ <para>这个变量的内容是所希望构建的模块列表。
+ 如果希望了解更多与构建内核有关的变量, 请参见 &man.make.conf.5;
+ 联机手册。</para>
+ </tip>
<indexterm>
<primary><filename class="directory">/boot/kernel.old</filename></primary>
@@ -423,10 +429,8 @@
每一行都包括一个关键词, 以及一个或多个参数。
实际上, 绝大多数行都只包括一个参数。
在 <literal>#</literal> 之后的内容会被认为是注释而忽略掉。
- 下面的每个小节,将依次介绍每个列在
- <filename>GENERIC</filename> 中的选项,
- 当然, 一些相关的关键词 (如网络) 将被放在一起,
- 尽管在 <filename>GENERIC</filename> 中可能分散在各处。 <anchor
+ 接下来几节, 将以 <filename>GENERIC</filename> 中的顺序介绍所有关键字。
+ <anchor
id="kernelconfig-options"> 如果需要与平台有关的选项和设备的详细列表,
请参考与 <filename>GENERIC</filename> 在同一个目录中的那个<filename>NOTES</filename>,
而平台无关的选项, 则可以在
@@ -435,7 +439,7 @@
<note>
<para><filename>NOTES</filename> 在 &os;&nbsp;4.X 中并不存在。
- 与此相反, 请参考 <filename>LINT</filename> 文件来获得关于
+ 作为替代, 请参考 <filename>LINT</filename> 文件来获得关于
<filename>GENERIC</filename> 中的选项和设备详细介绍。
<filename>LINT</filename> 在 4.X 中完成了两项使命:
为构建定制内核提供可选的选项, 以及提供尽可能多的调整为非默认值的选项。
@@ -453,7 +457,7 @@
<para>在 &os; 5.X 和以后的版本中您仍然可以通过下面的命令生成
<filename>LINT</filename> 文件:</para>
- <screen>&prompt.root; <userinput>cd /usr/src/sys/<replaceable>i386</replaceable>/conf && make LINT</userinput></screen>
+ <screen>&prompt.root; <userinput>cd /usr/src/sys/<replaceable>i386</replaceable>/conf &amp;&amp; make LINT</userinput></screen>
</note>
<indexterm>
@@ -467,27 +471,6 @@
<filename>/usr/src/sys/<replaceable>i386</replaceable>/conf/GENERIC</filename>
非常接近。</para>
- <programlisting>#
-# GENERIC -- Generic kernel configuration file for &os;/i386
-#
-# For more information on this file, please read the handbook section on
-# Kernel Configuration Files:
-#
-# http://www.&os;.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
-#
-# The handbook is also available locally in /usr/share/doc/handbook
-# if you've installed the doc distribution, otherwise always see the
-# &os; World Wide Web server (http://www.FreeBSD.org/) for the
-# latest information.
-#
-# An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files.
-# If you are in doubt as to the purpose or necessity of a line, check first
-# in NOTES.
-#
-# &dollar;FreeBSD: /repoman/r/ncvs/src/sys/i386/conf/GENERIC,v 1.413 2004/08/11 01:34:18 rwatson Exp &dollar;</programlisting>
-
- <para>下面这个选项在<emphasis>每个</emphasis>中都要有:</para>
<indexterm>
<primary>内核选项</primary>
<secondary>机器</secondary>
@@ -558,26 +541,6 @@ cpu I686_CPU</programlisting>
<literal>ident</literal> 后面的字符串在启动内核时会显示出来,
因此如果希望能够容易区分常用的内核和刚刚定制的内核,
就应该采取不同的名字 (例如, 您想定制一个试验性的内核)。</para>
-
- <programlisting># Floating point support - do not disable.
-device npx</programlisting>
-
- <para><literal>npx</literal> 是 &os; 中浮点运算单元的接口,
- 用于支持硬件的浮点运算协处理器, 以及软件仿真程序。
- 这个设置 <emphasis>不是</emphasis>
- 可有可无的。</para>
-
- <programlisting># Pseudo devices
-device loop # Network loopback</programlisting>
-
- <para>这是 TCP/IP 的通用回环设备。 如果您 telnet
- 或 FTP 到 <hostid>localhost</hostid> (也就是 <hostid
- role="ipaddr">127.0.0.1</hostid>) 则将通过这个设备回到本机。
- 这个设备是 <emphasis>必需的</emphasis>。 在
- &os;&nbsp;4.X 中, 则应使用 <literal>pseudo-device
- loop</literal>。</para>
-
- <para>接下来的那些项有一个或多个选项,关于每个选项的更多的信息参考下面注释。</para>
<programlisting>#To statically compile in device wiring instead of /boot/device.hints
#hints "GENERIC.hints" # Default places to look for devices.</programlisting>
@@ -976,6 +939,14 @@ device sc</programlisting>
<para>如果您的机器使用 AGP 卡, 请把上面一行加入配置。
这将启用 AGP, 以及某些卡上的 AGP GART 支持。</para>
+ <programlisting># Floating point support - do not disable.
+device npx</programlisting>
+
+ <para><literal>npx</literal> 是 &os; 中浮点运算单元的接口,
+ 用于支持硬件的浮点运算协处理器, 以及软件仿真程序。
+ 这个设置 <emphasis>不是</emphasis>
+ 可有可无的。</para>
+
<indexterm>
<primary>APM</primary>
</indexterm>
@@ -1087,7 +1058,7 @@ device re # RealTek 8139C+/8169/8169S/8110S
device rl # RealTek 8129/8139
device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
device sis # Silicon Integrated Systems SiS 900/SiS 7016
-device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet
+device sk # SysKonnect SK-984x &amp; SK-982x gigabit Ethernet
device ste # Sundance ST201 (D-Link DFE-550TX)
device ti # Alteon Networks Tigon I/II gigabit Ethernet
device tl # Texas Instruments ThunderLAN
@@ -1125,7 +1096,17 @@ device awi # BayStack 660 and others
device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
#device wl # Older non 802.11 Wavelan wireless NIC.</programlisting>
- <para>Support for various wireless cards.</para>
+ <para>用以支持多种无线网卡。</para>
+
+ <programlisting># Pseudo devices
+device loop # Network loopback</programlisting>
+
+ <para>这是 TCP/IP 的通用回环设备。 如果您 telnet
+ 或 FTP 到 <hostid>localhost</hostid> (也就是 <hostid
+ role="ipaddr">127.0.0.1</hostid>) 则将通过这个设备回到本机。
+ 这个设备是 <emphasis>必需的</emphasis>。 在
+ &os;&nbsp;4.X 中, 则应使用 <literal>pseudo-device
+ loop</literal>。</para>
<programlisting>device mem # Memory and kernel memory devices</programlisting>
diff --git a/zh_CN.GB2312/books/handbook/l10n/chapter.sgml b/zh_CN.GB2312/books/handbook/l10n/chapter.sgml
index 8ff442c931..d9c79e338c 100644
--- a/zh_CN.GB2312/books/handbook/l10n/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/l10n/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
- Original Revision: 1.111
+ Original Revision: 1.118
$FreeBSD$
-->
@@ -10,7 +10,7 @@
<chapterinfo>
<authorgroup>
<author>
- <firstname>Andrey A.</firstname>
+ <firstname>Andrey</firstname>
<surname>Chernov</surname>
<contrib>Contributed by </contrib>
</author>
@@ -160,7 +160,8 @@
<itemizedlist>
<listitem>
- <para>特定语言的简单C字符集(参考&man.multibyte.3;),以及ISO-8859-1, ISO-8859-15, KOI8-R, CP437.</para>
+ <para>特定语言的简单C字符集 (参见 &man.multibyte.3;),例如
+ ISO8859-1, ISO8859-15, KOI8-R, CP437。</para>
</listitem>
<listitem>
@@ -172,7 +173,7 @@
url="http://www.iana.org/assignments/character-sets">IANA Registry</ulink>检查一下现行的字符集列表。</para>
<note>
- <para>FreeBSD 4.5及以后的版本使用X11兼容的本地编码来代替。</para>
+ <para>与此不同的是, &os; 使用与 X11-兼容的本地编码模式。</para>
</note>
</sect2>
@@ -278,7 +279,14 @@ me:\
:lang=de_DE.ISO8859-1:\
:tc=default:</programlisting>
- <bridgehead renderas=sect4>使用&man.vipw.8;改变登入类型。</bridgehead>
+ <para>在修改用户的登入类型之前, 您应执行下面的命令</para>
+
+ <screen>&prompt.root; <userinput>cap_mkdb /etc/login.conf</userinput></screen>
+
+ <para>以便使在
+ <filename>/etc/login.conf</filename> 中新增的配置生效。</para>
+
+ <bridgehead renderas=sect4>使用 &man.vipw.8; 改变登入类型。</bridgehead>
<indexterm>
<primary><command>vipw</command></primary>
@@ -453,17 +461,17 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<tbody>
<row>
- <entry>ISO-8859-1 or ISO-8859-15</entry>
+ <entry>ISO8859-1 or ISO8859-15</entry>
<entry><literal>cons25l1</literal></entry>
</row>
<row>
- <entry>ISO-8859-2</entry>
+ <entry>ISO8859-2</entry>
<entry><literal>cons25l2</literal></entry>
</row>
<row>
- <entry>ISO-8859-7</entry>
+ <entry>ISO8859-7</entry>
<entry><literal>cons25l7</literal></entry>
</row>
@@ -612,7 +620,7 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<sect2info>
<authorgroup>
<author>
- <firstname>Andrey A.</firstname>
+ <firstname>Andrey</firstname>
<surname>Chernov</surname>
<contrib>Originally contributed by </contrib>
</author>
@@ -715,36 +723,18 @@ font8x8="cp866-8x8"</programlisting>
<orderedlist>
<listitem>
- <para>先描述<link linkend="setting-locale">没有X的本地化设置</link>
- </para>
-
- <note>
- <para><anchor id="russian-note">俄语 KOI8-R
- 地区代码可能无法在旧的 <application>&xfree86;</application> 版本 (低于 3.3)
- 上正常工作。 目前,
- <application>&xorg;</application> 是 FreeBSD
- 上默认的 X Window System 系统版本。
- 因此支持这些地区代码没有任何问题, 除非您使用很旧的
- FreeBSD 版本。</para>
- </note>
+ <para>首先请进行前面介绍的 <link linkend="setting-locale">非-X
+ 的本地化设置</link>。</para>
</listitem>
<listitem>
- <para>进入<filename role="package">russian/X.language</filename>目录,然后执行如下的命令:
- </para>
+ <para>如果您正使用 <application>&xorg;</application>, 请安装
+ <filename role="package">x11-fonts/xorg-fonts-cyrillic</filename>
+ package。</para>
- <screen>&prompt.root; <userinput>make install</userinput></screen>
-
- <para>上述 port 将安装最新版本的 KOI8-R
- 字体。 <application>&xorg;</application> (也包括
- <application>&xfree86;</application> 的 3.3 和更高版本)
- 已经包括了一些 KOI8-R 字体,
- 但上述 port 中的版本能够更好地适应缩放。</para>
-
- <para>请检查您的 <filename>/etc/XF86Config</filename>
- 文件中的 <literal>"Files"</literal> 小节。
- 下面的配置必须加到任何
- <literal>FontPath</literal> 项 <emphasis>之前</emphasis>。</para>
+ <para>检查您 <filename>/etc/X11/xorg.conf</filename> 文件中的
+ <literal>"Files"</literal> 小节。 下面的行, 应加到任何其它
+ <literal>FontPath</literal> 项之前:</para>
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
@@ -754,49 +744,45 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
</listitem>
<listitem>
- <para>为了激活俄语<literal>"键盘"</literal>,加下面几行到<filename>XF86Config</filename>文件里面:
- </para>
-
- <para>对于<application>&xfree86; 3.X</application>:</para>
-
- <programlisting>XkbLayout "ru"
-XkbOptions "grp:caps_toggle"</programlisting>
+ <para>要激活俄语键盘, 需要在
+ <filename>xorg.conf</filename> 文件的
+ <literal>"Keyboard"</literal> 小节中加入下列内容:</para>
- <para>对于 <application>&xorg;</application> (或
- <application>&xfree86; 4.X</application>):</para>
+ <programlisting>Option "XkbLayout" "us,ru"
+Option "XkbOptions" "grp:toggle"</programlisting>
- <programlisting>Option "XkbLayout" "ru"
-Option "XkbOptions" "grp:caps_toggle"</programlisting>
-
- <para>要确信<literal>XkbDisable</literal> 已经关闭(注释掉)了。</para>
+ <para>要确信<literal>XkbDisable</literal> 已经关闭 (注释掉) 了。</para>
<para>RUS/LAT的切换用<keycap>CapsLock</keycap>。老的<keycap>CapsLock</keycap>功能可以通过
<keycombo action="simul"><keycap>Shift</keycap><keycap>CapsLock</keycap></keycombo>
来模拟(只有在LAT模式的时候)。</para>
- <para>如果您的键盘上有<quote>&windows;</quote>键,
- 注意在俄语模式中,一些非字母顺序的键会影射错误,可以在<filename>XF86Config</filename>文件中添加下面这行:
- </para>
-
- <para>对于<application>&xfree86; 3.X</application>:</para>
-
- <programlisting>XkbVariant "winkeys"</programlisting>
+ <para>对于 <literal>grp:caps_toggle</literal>
+ 而言, RUS/LAT 开关将作为 <keycap>CapsLock</keycap> 使用。
+ 旧的 <keycap>CapsLock</keycap> 功能仍可通过 <keycombo action="simul"><keycap>Shift</keycap><keycap>CapsLock</keycap></keycombo> (只对 LAT
+ 模式有效)。 对于 <literal>grp:toggle</literal>
+ 而言 RUS/LAT 开关则是 <keycap>Right Alt</keycap>。 由于不明原因,
+ <literal>grp:caps_toggle</literal> 在
+ <application>&xorg;</application> 中无法使用。</para>
- <para>对于 <application>&xorg;</application> (或
- <application>&xfree86; 4.X</application>):</para>
+ <para>如果您的键盘上有 <quote>&windows;</quote> 键,
+ 但发现 RUS 模式下, 某些非字母键映射不正常, 则应在您的
+ <filename>xorg.conf</filename> 文件中加入下面这行:</para>
- <programlisting>Option "XkbVariant" "winkeys"</programlisting>
+ <programlisting>Option "XkbVariant" ",winkeys"</programlisting>
<note>
- <para>俄语的XKB键盘可能不能在老版本的<application>&xfree86;</application>下工作,
- 更多的信息参考<link linkend="russian-note">上面的注释</link>。俄语XKB键盘也不能很好的工作在
- 非本地化应用程序下面。早期的非本地化应用程序最低限度应该调用<function>XtSetLanguageProc (NULL, NULL,
- NULL);</function>。更多的本地化X11应用程序的信息请参考<ulink
- url="http://koi8.pp.ru/xwin.html">
- KOI8-R for X Window</ulink>。</para>
+ <para>俄语的 XKB 键盘可能并不为某些不具备本地化功能的应用程序所支持。</para>
</note>
</listitem>
</orderedlist>
+ <note>
+ <para>本地化程序最低限度应在程序启动时调用 <function>XtSetLanguageProc (NULL, NULL,
+ NULL);</function> 函数。</para>
+ <para>参见 <ulink
+ url="http://koi8.pp.ru/xwin.html">
+ KOI8-R for X Window</ulink> 以获得关于对 X11 应用进行本地化的指导。</para>
+ </note>
</sect3>
</sect2>
diff --git a/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml b/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml
index e3988ecfb6..848e0c7829 100644
--- a/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
- Original Revision: 1.124
+ Original Revision: 1.129
$FreeBSD$
-->
@@ -100,11 +100,16 @@
<indexterm><primary>KLD (kernel loadable object)</primary></indexterm>
- <para>默认的Linux兼容模式没有被打开。启用这个功能的最容易的方法是调用<literal>linux</literal>
- KLD对象(<quote>Kernel LoaDable object</quote>)。您可以在命令行通过健入<command>linux</command>来加载这个模块。
- </para>
+ <para>默认情况下, 并不开启 Linux 二进制兼容支持。
+ 启用这一功能最简单的方法是载入
+ <literal>linux</literal> KLD 模块 (<quote>Kernel LoaDable
+ object</quote>)。 以 <username>root</username>
+ 的身份, 键入下列命令即可:</para>
- <para>如果您想让Linux二进制兼容性总是被启用,您可以在<filename>/etc/rc.conf</filename>加入下面这一行:</para>
+ <screen>&prompt.root; <userinput>kldload linux</userinput></screen>
+
+ <para>如果希望 Linux 兼容支持在系统初始化过程中自动启用, 则应在
+ <filename>/etc/rc.conf</filename> 中增加:</para>
<programlisting>linux_enable="YES"</programlisting>
@@ -281,16 +286,9 @@ multi on</programlisting>
<sect1info>
<authorgroup>
<author>
- <firstname>Murray</firstname>
- <surname>Stokely</surname>
- <contrib>Updated for Mathematica 4.X by </contrib>
- </author>
- </authorgroup>
- <authorgroup>
- <author>
- <firstname>Bojan</firstname>
- <surname>Bistrovic</surname>
- <contrib>Merged with work by </contrib>
+ <firstname>Boris</firstname>
+ <surname>Hollas</surname>
+ <contrib>Updated for Mathematica 5.X by </contrib>
</author>
</authorgroup>
</sect1info>
@@ -301,61 +299,90 @@ multi on</programlisting>
<secondary><application>Mathematica</application></secondary>
</indexterm>
- <para>这节描述在FreeBSD系统上安装Linux版的<application>&mathematica; 4.X</application>。
- </para>
+ <para>这份文档介绍了如何在 FreeBSD 系统中安装 Linux
+ 版本的 <application>&mathematica; 5.X</application>。</para>
- <para>Linux版<application>&mathematica;</application>在FreeBSD下运行的很好,但是
- 由Wolfram打包的二进制程序需要标记才能让FreeBSD知道需要使用Linux ABI来执行它们。</para>
-
- <para>Linux版的<application>&mathematica;</application>
- 或<application>&mathematica; for Students</application>
- 可以从<ulink url="http://www.wolfram.com/"></ulink>直接定购。</para>
+ <para>Linux 版本的 <application>&mathematica;</application>
+ 或 <application>&mathematica; for Students</application>
+ 可以直接从 Wolfram 的
+ <ulink url="http://www.wolfram.com/"></ulink> 订购。</para>
<sect2>
- <title>标记Linux程序</title>
-<para>
-Linux程序可以在Wolfram发布的CDROM的<application>&mathematica; </application><filename>Unix</filename>目录中找到。
-您必须将这个目录树拷贝到本地硬盘上,以便您能在运行安装程序之前用&man.brandelf.1; 来标记Linux程序:
-</para>
+ <title>运行 &mathematica; 安装程序</title>
+
+ <para>首先您应告诉 &os;
+ <application>&mathematica;</application> 的 Linux
+ 可执行文件需要使用 Linux ABI。 达到这一目的最简单的办法,
+ 是将未加标志的可执行文件的默认 ELF 标记为 Linux,
+ 输入下面的命令:</para>
- <screen>&prompt.root; <userinput>mount /cdrom</userinput>
-&prompt.root; <userinput>cp -rp /cdrom/Unix/ /localdir/</userinput>
-&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/*</userinput>
-&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/*</userinput>
-&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/*</userinput>
-&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/*</userinput>
-&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/*</userinput>
-&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm</userinput>
-&prompt.root; <userinput>cd /localdir/Installers/Linux/</userinput>
-&prompt.root; <userinput>./MathInstaller</userinput></screen>
-
- <para>另外,您也可以简单地用下面的命令将默认的ELF标记成Linux:
- </para>
<screen>&prompt.root; <userinput>sysctl kern.fallback_elf_brand=3</userinput></screen>
- <para>这将让FreeBSD知道没有标记的ELF程序使用Linux ABI,所以您将可以直接从CDROM来运行安装程序。 </para>
+
+ <para>这回让 &os; 假定所有未加标志的 ELF 可执行文件,
+ 都应使用 Linux ABI, 这样就可以直接从 CDROM 执行安装程序了。</para>
+
+ <para>接下来, 需要将 <filename>MathInstaller</filename>
+ 复制到硬盘上:</para>
+
+ <screen>&prompt.root; <userinput>mount /cdrom</userinput>
+&prompt.root; <userinput>cp /cdrom/Unix/Installers/Linux/MathInstaller /localdir/</userinput></screen>
+
+ <para>在这个文件的第一行中, 将 <literal>/bin/sh</literal>
+ 改为 <literal>/compat/linux/bin/sh</literal>。
+ 这样就能确保安装程序是使用 Linux
+ 版本的 &man.sh.1; 来运行的。 接下来, 使用文本编辑器或下面的脚本, 把所有的
+ <literal>Linux)</literal> 替换为 <literal>FreeBSD)</literal>。
+ 由于 <application>&mathematica;</application>
+ 安装程序会调用 <command>uname -s</command> 来检测操作系统,
+ 这样做能够让它视 &os; 为一种 类-Linux 操作系统。
+ 现在执行 <command>MathInstaller</command>
+ 就能安装 <application>&mathematica;</application> 了。</para>
+ </sect2>
+
+ <sect2>
+ <title>修改 &mathematica; 执行文件</title>
+
+ <para>在安装
+ <application>&mathematica;</application> 的过程中所创建的脚本,
+ 必须首先进行适当的修改才能使用。
+ 如果您选择将 <filename role="directory">/usr/local/bin</filename>
+ 作为
+ <application>&mathematica;</application> 可执行文件的安装路径,
+ 则可以在这个目录中找到一些到名为
+ <filename>math</filename>、 <filename>mathematica</filename>、
+ <filename>Mathematica</filename>, 以及
+ <filename>MathKernel</filename> 的文件的符号连接。 您可以使用文本编辑器,
+ 或者下面的 shell 脚本来将这些文件中的
+ <literal>Linux)</literal> 改为 <literal>FreeBSD)</literal>:</para>
+
+ <programlisting>#!/bin/sh
+cd /usr/local/bin
+for i in math mathematica Mathematica MathKernel
+ do sed 's/Linux)/FreeBSD)/g' $i &gt; $i.tmp
+ sed 's/\/bin\/sh/\/compat\/linux\/bin\/sh/g' $i.tmp &gt; $i
+ rm $i.tmp
+ chmod a+x $i
+done</programlisting>
</sect2>
<sect2>
<title>获得您的&mathematica; 密码</title>
- <para>在您运行<application>&mathematica;</application>之前,您必须从Wolfram获得对应您的<quote>机器ID</quote>的密码。
- </para>
<indexterm>
<primary>以太网</primary>
<secondary>MAC地址</secondary>
</indexterm>
- <para>一旦您安装了Linux运行时库,并把<application>&mathematica;</application>解包开了,
- 您可以在安装目录通过运行<command>mathinfo</command>来获得您的<quote>机器ID</quote>。
- 这个机器ID是以您的第一块以太网卡的MAC地址为基础的。</para>
+ <para>在首次启动 <application>&mathematica;</application>
+ 时, 您将被问及一个密码。 如果您还未从 Wolfram 获得密码, 则安装目录中的
+ <command>mathinfo</command> 可以帮助您获得 <quote>machine ID</quote> (计算机 ID)。
+ 这个计算机 ID 取决于您第一块以太网卡的 MAC 地址,
+ 以确保您不在多台机器上运行
+ <application>&mathematica;</application>。</para>
- <screen>&prompt.root; <userinput>cd /localdir/Files/SystemFiles/Installation/Binaries/Linux</userinput>
-&prompt.root; <userinput>mathinfo</userinput>
-disco.example.com 7115-70839-20412</screen>
-
- <para>当您用email,电话或者传真向Wolfram注册时,给他们您的<quote>机器ID</quote>,就会返回一个包含一组数字的密码。
- 当您第一次运行<application>&mathematica;</application>时就需要得到的密码。
- </para>
+ <para>在通过电子邮件、 电话或传真向 Wolfram 注册时,
+ 您需要向他们提供 <quote>machine ID</quote>,
+ 探后它们会给您一个与之对应的由一组数字组成的密码。</para>
</sect2>
<sect2>
@@ -490,14 +517,14 @@ LOG=/var/log/lmgrd.log
case "$1" in
start)
- lmgrd -c ${LICENSE_FILE} 2>> ${LOG} 1>&2
+ lmgrd -c ${LICENSE_FILE} 2&gt;&gt; ${LOG} 1&gt;&2
echo -n " lmgrd"
;;
stop)
- lmgrd -c ${LICENSE_FILE} -x lmdown 2>> ${LOG} 1>&2
+ lmgrd -c ${LICENSE_FILE} -x lmdown 2&gt;&gt; ${LOG} 1&gt;&2
;;
*)
- echo "Usage: `basename $0` {start|stop}" 1>&2
+ echo "Usage: `basename $0` {start|stop}" 1&gt;&2
exit 64
;;
esac
@@ -2792,7 +2819,7 @@ SVRMGR&gt; <userinput>exit</userinput></screen>
total 4
drwxr-xr-x 3 idsadm sapsys 512 May 5 11:20 D00
drwxr-x--x 5 idsadm sapsys 512 May 5 11:35 IDS
-lrwxr-xr-x 1 root sapsys 7 May 5 11:35 SYS -> IDS/SYS
+lrwxr-xr-x 1 root sapsys 7 May 5 11:35 SYS -&gt; IDS/SYS
drwxrwxr-x 2 idsadm sapsys 512 May 5 13:00 tmp
drwxrwxr-x 11 idsadm sapsys 512 May 4 14:20 trans</screen>
diff --git a/zh_CN.GB2312/books/handbook/mac/chapter.sgml b/zh_CN.GB2312/books/handbook/mac/chapter.sgml
index ab8d101f97..251c19c16c 100644
--- a/zh_CN.GB2312/books/handbook/mac/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/mac/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.47
+ Original Revision: 1.49
$FreeBSD$
-->
@@ -1039,7 +1039,7 @@ test: biba/high</screen>
&man.login.conf.5; 上执行 &man.cap.mkdb.1; 之后,
用户才能够切换到新的分级。</para>
- <para><username>root</username> 用户也应出现在某个登录级中;
+ <para><username>root</username> 用户名也应出现在某个登录级中;
否则, <username>root</username> 执行每一个命令的时候,
都需要使用 <command>setpmac</command>。</para>
@@ -1491,7 +1491,7 @@ mac_partition_load="YES"</programlisting>
否则这些用户将被禁止使用类似 &man.vi.1; 这样的命令。
下面的 <command>sh</command> 脚本应能完成这个工作:</para>
- <screen>&prompt.root; <userinput>for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' \</userinput>
+ <screen>&prompt.root; <userinput>for x in `awk -F: '($3 &gt;= 1001) &amp;&amp; ($3 != 65534) { print $1 }' \</userinput>
<userinput>/etc/passwd`; do pw usermod $x -L insecure; done;</userinput></screen>
<para>改完后, 需要在 <filename>/etc/master.passwd</filename> 上运行
@@ -1661,7 +1661,7 @@ round-trip min/avg/max/stddev = 204.455/204.455/204.455/0.000 ms</screen>
test1: biba/equal,mls/equal
&prompt.root; <userinput>setfmac biba/low test1 test2; setfmac biba/high test4 test5; \
setfmac mls/low test1 test3; setfmac mls/high test2 test4</userinput>
-&prompt.root; <userinput>setfmac mls/equal,biba/equal test3 && getfmac test?</userinput>
+&prompt.root; <userinput>setfmac mls/equal,biba/equal test3 &amp;&amp; getfmac test?</userinput>
test1: biba/low,mls/low
test2: biba/low,mls/high
test3: biba/equal,mls/equal
@@ -1688,7 +1688,7 @@ test3 test5</screen>
因此, 很显然读操作应该被拒绝。
现在测试一下写操作:</para>
- <screen>&prompt.user; <userinput>for i in `echo test*`; do echo 1 > $i; done</userinput>
+ <screen>&prompt.user; <userinput>for i in `echo test*`; do echo 1 &gt; $i; done</userinput>
-su: test1: Permission denied
-su: test4: Permission denied
-su: test5: Permission denied</screen>
@@ -1744,7 +1744,7 @@ cat: test4: Permission denied</screen>
<para>现在每个用户都需要放到 default class 中;
类似下面的命令:</para>
- <screen>&prompt.root; <userinput>for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' \</userinput>
+ <screen>&prompt.root; <userinput>for x in `awk -F: '($3 &gt;= 1001) &amp;&amp; ($3 != 65534) { print $1 }' \</userinput>
<userinput>/etc/passwd`; do pw usermod $x -L default; done;</userinput></screen>
<para>可以很快地完成这个工作。</para>
diff --git a/zh_CN.GB2312/books/handbook/mail/chapter.sgml b/zh_CN.GB2312/books/handbook/mail/chapter.sgml
index 1b43d2d767..4af20b1a41 100644
--- a/zh_CN.GB2312/books/handbook/mail/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/mail/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
- Original Revision: 1.129
+ Original Revision: 1.133
$FreeBSD$
-->
@@ -628,12 +628,26 @@ postmaster@example.com postmaster@noc.example.net
<para>具体配置请参考您所选择的 MTA 软件的配置文档或其它相关资料。</para>
</sect2>
- <sect2>
- <title>停用 <application>sendmail</application></title>
+ <sect2 id="mail-disable-sendmail">
+ <title>禁用 <application>sendmail</application></title>
- <para>值得注意的是启动
- <application>sendmail</application> 在 4.5-RELEASE 版本和
- 4.6-RELEASE 版本之间有些不同。因此,停用它的过程也稍有不同。</para>
+ <para>用以启动
+ <application>sendmail</application> 的流程,
+ 在 4.5-RELEASE、 4.6-RELEASE 以及之后的版本中,
+ 存在着十分显著的不同。 因此, 用于禁用它的方法,
+ 也就有许多不同之处。</para>
+
+ <warning>
+ <para>如果您打算禁用 <application>sendmail</application>
+ 的邮件发出服务, 保持系统中有一个替代它的、
+ 可用的邮件递送系统就非常重要。 如果您不这样做的话,
+ 类似 &man.periodic.8; 这样的系统功能就无法如预期的那样,
+ 通过邮件来传送其执行结果。 您系统中的许多部分可能都假定有可用的
+ <application>sendmail</application>-兼容 系统。 如果这些应用程序继续使用
+ <application>sendmail</application> 的执行文件来发送邮件,
+ 而您又禁用了它, 则邮件将进入 <application>sendmail</application>
+ 的非活跃 (inactive) 队列, 而永远不会被送达。</para>
+ </warning>
<sect3>
<title>FreeBSD 4.5-STABLE 版本 2002/4/4 之前和更早前版本
@@ -653,24 +667,39 @@ postmaster@example.com postmaster@noc.example.net
<title>FreeBSD 4.5-STABLE 版本 2002/4/4 之后和以后的版本
(包括 4.6-RELEASE 及后续版本)</title>
- <para>为了完全的停用
- <application>sendmail</application>,您必须在
- <filename>/etc/rc.conf</filename> 文件里使用</para>
+ <para>要完全地禁用
+ <application>sendmail</application>, 包括邮件的发出服务,
+ 您就必须将</para>
<programlisting>sendmail_enable="NONE"</programlisting>
- <warning>
- <para>如果用这个方法停止 <application>sendmail</application>
- 的发送邮件服务,那么就必须有一个能够完全正常地工作的邮件发送系统。
- 如果不这样做的话,类似 &man.periodic.8;
- 这样的系统功能将无法正确地通过电子邮件将它们的执行结果送到通常希望的地方去。
- 系统中的很多部分都要求有和
- <application>sendmail</application> 在功能上兼容的系统。
- 如果应用程序在您禁用之后仍然继续使用
- <application>sendmail</application> 的执行文件来发送文件,
- 则这些邮件可能会进入睡眠的
- <application>sendmail</application> 队列,并永远无法到达目的地。</para>
- </warning>
+ <para>写在 <filename>/etc/rc.conf</filename> 中。</para>
+
+ <para>如果您只是希望禁用
+ <application>sendmail</application> 的接信服务,
+ 则应将</para>
+
+ <programlisting>sendmail_enable="NO"</programlisting>
+
+ <para>写到 <filename>/etc/rc.conf</filename> 中。
+ 不过, 即使禁用了接信服务, 本地的送信仍将正常工作。 关于
+ <application>sendmail</application> 的启动选项的更多信息,
+ 可以在 &man.rc.sendmail.8; 联机手册中找到。</para>
+ </sect3>
+
+ <sect3>
+ <title>FreeBSD 5.0-STABLE 和更高版本</title>
+
+ <para>要彻底禁用包括邮件送出服务在内的所有
+ <application>sendmail</application> 功能,
+ 必须将</para>
+
+ <programlisting>sendmail_enable="NO"
+sendmail_submit_enable="NO"
+sendmail_outbound_enable="NO"
+sendmail_msp_queue_enable="NO"</programlisting>
+
+ <para>写入 <filename>/etc/rc.conf</filename>。</para>
<para>如果只是想要停止
<application>sendmail</application> 的接收邮件服务,
@@ -1349,9 +1378,9 @@ hostname=_HOSTNAME_</programlisting>
可能将其称为 <quote>外发邮件服务器</quote> 或
<quote>SMTP 服务器</quote>)。</para>
- <para>接下来确认禁用了 <application>sendmail</application>,
- 这可以通过将 <literal>sendmail_enable="NONE"</literal>
- 加入 <filename>/etc/rc.conf</filename> 来完成。</para>
+ <para>接下来需要确认禁用了 <application>sendmail</application>,
+ 包括邮件发出服务在内。 请参见
+ <xref linkend="mail-disable-sendmail"> 以了解进一步的细节。</para>
<para><filename role="package">mail/ssmtp</filename> 也提供了一些其他选项。
请参见在
@@ -1363,7 +1392,6 @@ hostname=_HOSTNAME_</programlisting>
能够让您计算机上的任何需要发送邮件的软件都正常运转,
而不必冒违反 ISP 的使用政策,
或使您的电脑被劫持用于发送垃圾邮件的风险。</para>
-
</sect1>
<sect1 id="SMTP-dialup">
@@ -1639,7 +1667,7 @@ define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')dnl</programlisting>
命令, 并给出邮件的编号, 就可以看到邮件了。 在这个例子中,
我们将阅读第一封邮件:</para>
- <screen>& <userinput>t 1</userinput>
+ <screen>&amp; <userinput>t 1</userinput>
Message 1:
From root@localhost Mon Mar 8 14:05:52 2004
X-Original-To: marcs@localhost
@@ -1668,7 +1696,7 @@ This is a test message, please reply if you receive it.</screen>
在邮件的最后应该有一个只有一个 <keycap>.</keycap>
的行, 例如:</para>
- <screen>& <userinput>R 1</userinput>
+ <screen>&amp; <userinput>R 1</userinput>
To: root@localhost
Subject: Re: test
@@ -1682,7 +1710,7 @@ EOT</screen>
然后是正文。 同样的, 在邮件最后需要一个只有 <keycap>.</keycap>
的空行表示结束。</para>
- <screen>& <userinput>mail root@localhost</userinput>
+ <screen>&amp; <userinput>mail root@localhost</userinput>
Subject: <userinput>I mastered mail
Now I can send and receive email using mail ... :)
@@ -1990,13 +2018,13 @@ user "john", with password "XXXXX", is "myth" here;</programlisting>
<option>-d</option> 参数, 并给出 <application>fetchmail</application>
在轮询 <filename>.fetchmailrc</filename> 文件中列出的服务器的时间间隔,
来以服务程序的方式运行。 下面的例子会让 <application>fetchmail</application>
- 每 60 秒轮询一次:</para>
+ 每 600 秒轮询一次:</para>
- <screen>&prompt.user; <userinput>fetchmail -d 60</userinput></screen>
+ <screen>&prompt.user; <userinput>fetchmail -d 600</userinput></screen>
<para>更多关于 <application>fetchmail</application> 的资料,
可以在 <ulink
- url="http://www.catb.org/~esr/fetchmail/"></ulink> 找到。</para>
+ url="http://fetchmail.berlios.de/"></ulink> 找到。</para>
</sect1>
<sect1 id="mail-procmail">
@@ -2049,7 +2077,7 @@ user "john", with password "XXXXX", is "myth" here;</programlisting>
<email role="nolink">goodmail@example2.com</email>:</para>
<programlisting>:0
-* < 1000
+* &lt; 1000
! goodmail@example2.com</programlisting>
<para>把所有发送到 <email>alternate@example.com</email>
diff --git a/zh_CN.GB2312/books/handbook/mirrors/Makefile b/zh_CN.GB2312/books/handbook/mirrors/Makefile
index 1b5b3cf271..37163e0627 100644
--- a/zh_CN.GB2312/books/handbook/mirrors/Makefile
+++ b/zh_CN.GB2312/books/handbook/mirrors/Makefile
@@ -1,7 +1,7 @@
#
# Build the Handbook with just the content from this chapter.
#
-# Original Revision:
+# Original Revision: 1.1
# $FreeBSD$
#
diff --git a/zh_CN.GB2312/books/handbook/mirrors/chapter.sgml b/zh_CN.GB2312/books/handbook/mirrors/chapter.sgml
index 7ab0ef80a5..2454880fa5 100644
--- a/zh_CN.GB2312/books/handbook/mirrors/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/mirrors/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
- Original Revision: 1.386
+ Original Revision: 1.411
$FreeBSD$
-->
@@ -118,14 +118,14 @@
</listitem>
<listitem>
- <address>
- <otheraddr>Linux CD Mall</otheraddr>
- <street>Private Bag MBE N348</street>
- <city>Auckland 1030</city>
- <country>New Zealand</country>
- Phone: <phone>+64 21 866529</phone>
- WWW: <otheraddr><ulink url="http://www.linuxcdmall.co.nz/"></ulink></otheraddr>
- </address>
+ <address>
+ <otheraddr>Linux CD Mall</otheraddr>
+ <street>Private Bag MBE N348</street>
+ <city>Auckland 1030</city>
+ <country>New Zealand</country>
+ Phone: <phone>+64 21 866529</phone>
+ WWW: <otheraddr><ulink url="http://www.linuxcdmall.co.nz/"></ulink></otheraddr>
+ </address>
</listitem>
<listitem>
@@ -375,15 +375,6 @@
<quote>anoncvs</quote> when prompted.)</para>
</listitem>
<listitem>
- <para><emphasis>瑞典</emphasis>:
- freebsdanoncvs@anoncvs.se.FreeBSD.org:/home/ncvs
- (仅 ssh - 无口令)</para>
-
- <programlisting>SSH HostKey: 1024 a7:34:15:ee:0e:c6:65:cf:40:78:2d:f3:cd:87:bd:a6 root@apelsin.fruitsalad.org
-SSH2 HostKey: 1024 21:df:04:03:c7:26:3e:e8:36:1a:50:2d:c7:ae:b8:5f ssh_host_dsa_key.pub</programlisting>
-
- </listitem>
- <listitem>
<para><emphasis>美国</emphasis>:
freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs
(仅 ssh - 无口令)</para>
@@ -396,8 +387,8 @@ SSH2 HostKey: 1024 52:02:38:1a:2f:a8:71:d3:f5:83:93:8d:aa:00:6f:65 ssh_host_dsa_
<para><emphasis>USA</emphasis>:
anoncvs@anoncvs1.FreeBSD.org:/home/ncvs (仅 ssh - 无口令)</para>
- <programlisting>SSH HostKey: 1024 4b:83:b6:c5:70:75:6c:5b:18:8e:3a:7a:88:a0:43:bb root@ender.liquidneon.com
-SSH2 HostKey: 1024 80:a7:87:fa:61:d9:25:5c:33:d5:48:51:aa:8f:b6:12 ssh_host_dsa_key.pub</programlisting>
+ <programlisting>SSH HostKey: 1024 8b:c4:6f:9a:7e:65:8a:eb:50:50:29:7c:a1:47:03:bc root@ender.liquidneon.com
+SSH2 HostKey: 2048 4d:59:19:7b:ea:9b:76:0b:ca:ee:da:26:e2:3a:83:b8 ssh_host_dsa_key.pub</programlisting>
</listitem>
</itemizedlist>
@@ -433,15 +424,12 @@ SSH2 HostKey: 1024 80:a7:87:fa:61:d9:25:5c:33:d5:48:51:aa:8f:b6:12 ssh_host_dsa_
CVS:</para>
<example>
- <title>从 -CURRENT 检出些东西(&man.ls.1;)
- 然后再删除:</title>
+ <title>从 -CURRENT 检出些东西 (&man.ls.1;):</title>
- <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
+ <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput>
<emphasis>在提示符处,输入密码</emphasis> <quote>anoncvs</quote>.
&prompt.user; <userinput>cvs co ls</userinput>
-&prompt.user; <userinput>cvs release -d ls</userinput>
-&prompt.user; <userinput>cvs logout</userinput>
</screen>
</example>
@@ -456,38 +444,33 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
</example>
<example>
- <title>检出 &man.ls.1; 在 3.X-STABLE 分支中的版本:</title>
-
- <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
+ <title>检出 6-STABLE 分支中的 &man.ls.1; 版本:</title>
+
+ <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput>
-<emphasis>在提示符处,输入密码</emphasis> <quote>anoncvs</quote>.
-&prompt.user; <userinput>cvs co -rRELENG_3 ls</userinput>
-&prompt.user; <userinput>cvs release -d ls</userinput>
-&prompt.user; <userinput>cvs logout</userinput>
+<emphasis>在提示符处,输入密码</emphasis> <quote>anoncvs</quote>。
+&prompt.user; <userinput>cvs co -rRELENG_6 ls</userinput>
</screen>
</example>
<example>
<title>创建 &man.ls.1; 的变化列表(用标准的 diff)</title>
- <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
+ <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput>
-<emphasis>在提示符处,输入密码</emphasis> <quote>anoncvs</quote>.
-&prompt.user; <userinput>cvs rdiff -u -rRELENG_3_0_0_RELEASE -rRELENG_3_4_0_RELEASE ls</userinput>
-&prompt.user; <userinput>cvs logout</userinput>
+<emphasis>在提示符处,输入密码</emphasis> <quote>anoncvs</quote>。
+&prompt.user; <userinput>cvs rdiff -u -rRELENG_5_3_0_RELEASE -rRELENG_5_4_0_RELEASE ls</userinput>
</screen>
</example>
<example>
<title>找出可以使用的其它的模块名:</title>
- <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
+ <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput>
<emphasis>在提示符处,输入密码</emphasis> <quote>anoncvs</quote>.
&prompt.user; <userinput>cvs co modules</userinput>
&prompt.user; <userinput>more modules/modules</userinput>
-&prompt.user; <userinput>cvs release -d modules</userinput>
-&prompt.user; <userinput>cvs logout</userinput>
</screen>
</example>
</sect2>
@@ -505,8 +488,8 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
</listitem>
<listitem>
- <para><ulink url="http://www.cvshome.org/">CVS 主页</ulink>,
- CVS 开发和支持论坛。</para>
+ <para><ulink url="http://ximbiot.com/cvs/wiki/">CVS 主页</ulink>,
+ CVS 开发和支持社区。</para>
</listitem>
<listitem>
@@ -563,12 +546,6 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
已经是 FreeBSD 的一部分了,如果您有一份源代码拷贝的话它位于
<filename>/usr/src/usr.sbin/ctm</filename>。</para>
- <para>如果您再运行一个比 2.0 版本早的 FreeBSD 系统,
- 可以直接从下面下载最新的 <application>CTM</application>
- 源代码:</para>
-
- <para><ulink url="http://www.FreeBSD.org/cgi/cvsweb.cgi/src/usr.sbin/ctm/"></ulink></para>
-
<para>您喂给 <application>CTM</application> 的 <quote>deltas</quote>
可以有两种方式,FTP 或者 email。
如果您有普通的访问 Internet 的 FTP 权限,
@@ -1704,6 +1681,15 @@ doc/zh_*</screen>
</varlistentry>
<varlistentry>
+ <term><literal>ports-net-im
+ release=cvs</literal></term>
+
+ <listitem>
+ <para>即时消息软件。</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><literal>ports-net-mgmt
release=cvs</literal></term>
@@ -1713,6 +1699,15 @@ doc/zh_*</screen>
</varlistentry>
<varlistentry>
+ <term><literal>ports-net-p2p
+ release=cvs</literal></term>
+
+ <listitem>
+ <para>对等网 (peer to peer network) 应用。</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><literal>ports-news
release=cvs</literal></term>
@@ -2219,6 +2214,164 @@ doc/zh_*</screen>
</sect2>
</sect1>
+ <sect1 id="portsnap">
+ <title>使用 Portsnap</title>
+
+ <sect2 id="portsnap-intro">
+ <title>介绍</title>
+
+ <para><application>Portsnap</application>
+ 是一套用以安全地分发 &os; 的系统。 每隔大约一个小时,
+ 就会生成一份 ports 的最新 <quote>快照</quote>,
+ 它会被打包并进行数字签名。 这些文件接下来将通过 HTTP
+ 来分发。</para>
+
+ <para>与 <application>CVSup</application> 类似,
+ <application>Portsnap</application> 采用
+ <emphasis>拉 (pull)</emphasis> 的模式来进行更新:
+ 经过打包并签名的 ports tree 被放在 web 服务器上,
+ 被动地等待用户请求它们。 用户需要手工运行
+ &man.portsnap.8; 来下载更新,
+ 或者设置 &man.cron.8; 任务来自动地进行更新。</para>
+
+ <para>由于一些技术原因, <application>Portsnap</application>
+ 并不自动地直接更新位于
+ <filename>/usr/ports/</filename> 目录中的 <quote>实际的</quote> ports
+ tree; 与此相反, 它默认情况下只操作位于
+ <filename>/var/db/portsnap/</filename> 的压缩的 ports tree 副本,
+ 而这个副本则用于更新实际的 ports tree。</para>
+
+ <note>
+ <para>如果 <application>Portsnap</application> 是通过
+ &os; Ports Collection 安装的,
+ 则这份压缩快照的默认位置则是 <filename>/usr/local/portsnap/</filename>
+ 而非 <filename>/var/db/portsnap/</filename>。</para>
+ </note>
+ </sect2>
+
+ <sect2 id="portsnap-install">
+ <title>安装</title>
+
+ <para>在 &os; 6.0 和更新版本上,
+ <application>Portsnap</application> 已经成为 &os;
+ 基本系统的一部分。 在较早版本的 &os; 中,
+ 它可经由 <filename role="package">sysutils/portsnap</filename>
+ port 来安装。</para>
+ </sect2>
+
+ <sect2 id="portsnap-config">
+ <title>Portsnap 的配置</title>
+
+ <para><application>Portsnap</application> 的操作,
+ 是通过 <filename>/etc/portsnap.conf</filename> 配置文件来控制的。
+ 对于多数用户来说, 默认的配置文件已经可用了; 要了解进一步的细节,
+ 则应参考 &man.portsnap.conf.5; 联机手册。</para>
+
+ <note>
+ <para>假如 <application>Portsnap</application> 是通过
+ &os; Ports Collection 安装的, 则它将使用配置文件
+ <filename>/usr/local/etc/portsnap.conf</filename> 而非
+ <filename>/etc/portsnap.conf</filename>。 这个文件并不随 port
+ 的安装自动创建, 但我们提供了一个示例的配置文件;
+ 将其复制到合适的位置, 然后运行下面的命令:</para>
+
+ <screen>&prompt.root; <userinput>cd /usr/local/etc &amp;&amp; cp portsnap.conf.sample portsnap.conf</userinput></screen>
+ </note>
+ </sect2>
+
+ <sect2>
+ <title>首次运行 <application>Portsnap</application></title>
+
+ <para>在首次运行 &man.portsnap.8; 时, 它需要将整个
+ ports tree 的压缩快照下载到 <filename>/var/db/portsnap/</filename> (或者,
+ 如果 <application>Portsnap</application> 是通过
+ Ports Collection 安装的, 则是
+ <filename>/usr/local/portsnap/</filename>)。
+ 在 2006 年初, 其下载尺寸大约是 41&nbsp;MB。</para>
+
+ <screen>&prompt.root; <userinput>portsnap fetch</userinput></screen>
+
+ <para>一旦下载了压缩的快照, 就可以将它释放成为位于
+ <filename>/usr/ports/</filename> 中的
+ <quote>实际的</quote> ports tree 了。 即时之前那个目录中已经有了一份
+ ports tree 也需要这样做 (例如,
+ 通过使用 <application>CVSup</application>), 因为这个操作,
+ 将为后续的 <command>portsnap</command> 决定更新 ports tree
+ 的哪一部份提供基础。</para>
+
+ <screen>&prompt.root; <userinput>portsnap extract</userinput></screen>
+
+ <note>
+ <para>在默认安装中, 并不会自动建立
+ <filename role="directory">/usr/ports</filename>。 在使用
+ <command>portsnap</command> 之前应该先建立它。</para>
+ </note>
+ </sect2>
+
+ <sect2>
+ <title>更新 Ports Tree</title>
+
+ <para>在首次下载压缩的 ports tree 快照,
+ 并将其释放到 <filename>/usr/ports/</filename> 之后,
+ 更新 ports tree 包含下面两步:
+ <emphasis>fetch</emphasis>(下载) 对于压缩快照的更新,
+ 并使用它们来 <emphasis>update</emphasis>(更新)
+ 实际的 ports tree。 这两步可以通过一个
+ <command>portsnap</command> 命令来完成:</para>
+
+ <screen>&prompt.root; <userinput>portsnap fetch update</userinput></screen>
+
+ <note>
+ <para>较早版本的 <command>portsnap</command>
+ 并不支持这种写法。 如果不能用的话, 试试看下面的:</para>
+
+ <screen>&prompt.root; <userinput>portsnap fetch</userinput>
+&prompt.root; <userinput>portsnap update</userinput></screen>
+ </note>
+ </sect2>
+
+ <sect2>
+ <title>通过 cron 来运行 Portsnap</title>
+
+ <para>为了避免对于 <application>Portsnap</application>
+ 服务器的 <quote>快闪</quote> 式访问,
+ <command>portsnap fetch</command> 不支持作为
+ &man.cron.8; 任务来运行。 与此相反, 提供了一个特殊的
+ <command>portsnap cron</command> 命令,
+ 它在开始下载更新之前会随机等待最多 3600 秒。</para>
+
+ <para>此外, 强烈建议不要将
+ <command>portsnap update</command> 作为
+ <command>cron</command> 任务来运行, 因为它可能给正在同时进行的 port
+ 安装带来大问题。 不过, 更新 ports 的 INDEX 文件一般并无大碍, 这可以通过
+ <command>portsnap</command>的
+ <option>-I</option> 参数来实现 (显然, 如果
+ <command>portsnap -I update</command> 是通过
+ <command>cron</command> 来运行的, 就需要在之后执行不带 <option>-I</option> 的
+ <command>portsnap update</command> 来更新 ports tree 余下的部分了。)</para>
+
+ <para>可以在 <filename>/etc/crontab</filename>
+ 中加入下列设置, 以便让 <command>portsnap</command> 更新其压缩快照, 以及位于
+ <filename>/usr/ports/</filename> 中的 INDEX 文件,
+ 并在有 port 过期时发出邮件通知:</para>
+
+ <programlisting>0 3 * * * root portsnap -I cron update &amp;&amp; pkg_version -vIL=</programlisting>
+
+ <note>
+ <para>如果系统时钟没有设置为使用本地时区,
+ 请将 <literal>3</literal> 改为一介于 0 和 23 的随机值, 以便让
+ <application>Portsnap</application> 服务器的负载更为平均。</para>
+ </note>
+ <note>
+ <para>某些较早版本的 <command>portsnap</command>,
+ 并不支持在一次调用 <command>portsnap</command> 时使用多个命令 (例如,
+ <literal>cron update</literal>)。 如果这样不行, 请将
+ <command>portsnap -I cron update</command> 改为
+ <command>portsnap cron &amp;&amp; portsnap -I update</command>。</para>
+ </note>
+ </sect2>
+ </sect1>
+
<sect1 id="cvs-tags">
<title>CVS 标签</title>
@@ -2269,6 +2422,15 @@ doc/zh_*</screen>
</varlistentry>
<varlistentry>
+ <term>RELENG_6_0</term>
+
+ <listitem>
+ <para>FreeBSD-6.0 的发行版分支, 只用于安全公告,
+ 以及其他重要更新。</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>RELENG_5</term>
<listitem>
@@ -2447,6 +2609,14 @@ doc/zh_*</screen>
<variablelist>
<varlistentry>
+ <term>RELENG_6_0_0_RELEASE</term>
+
+ <listitem>
+ <para>FreeBSD 6.0</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>RELENG_5_4_0_RELEASE</term>
<listitem>
diff --git a/zh_CN.GB2312/books/handbook/multimedia/chapter.sgml b/zh_CN.GB2312/books/handbook/multimedia/chapter.sgml
index 81da1fc89c..669d5bc29b 100644
--- a/zh_CN.GB2312/books/handbook/multimedia/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/multimedia/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Documentation Project
- Original Revision: 1.110
+ Original Revision: 1.115
$FreeBSD$
-->
@@ -203,7 +203,7 @@
&man.snd.emu10k1.4; 驱动来支持。 要添加它,
需要在内核编译配置文件中加入下面一行:</para>
- <programlisting>device "snd_emu10k1"</programlisting>
+ <programlisting>device snd_emu10k1</programlisting>
<para>一定要阅读驱动的联机手册了解如何使用它们。
关于内核配置文件中声卡驱动的写法, 也可以在
@@ -217,9 +217,11 @@
系统启动时, &man.loader.8; 将读取这个文件,
并将其中的配置传给内核。 例如, 旧式的
Creative &soundblaster; 16 ISA 非即插即用卡需要使用
- &man.snd.sbc.4; 驱动, 您可以在内核编译配置文件中增加如下配置:</para>
+ &man.snd.sbc.4; 驱动并配合 snd_sb16(4)。
+ 您可以在内核编译配置文件中增加如下配置:</para>
- <programlisting>device snd_sbc</programlisting>
+ <programlisting>device snd_sbc
+device snd_sb16</programlisting>
<para>还有下面这些到
<filename>/boot/device.hints</filename>中:</para>
@@ -426,18 +428,20 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
<title>如何设置混音器通道值</title>
+ <note>
+ <para>只有 &os; 5.3-RELEASE 和更新的版本中才支持这一功能。</para>
+ </note>
+
<para>不同的混音通道的默认音量是硬编码进 &man.pcm.4; 驱动程序的。
同时,也有很多应用或服务程序提供了允许用户直接设置并记住这些值的功能。
不过这并不是一个很好的解决方案, 您可能希望在驱动一级有一个可以设置的默认值。
这可以通过在 <filename>/boot/device.hints</filename> 定义适当的值来实现。
例如:</para>
-<programlisting>hint.pcm.0.vol="100"</programlisting>
- <para>当 &man.pcm.4; 加载时,这一设置将改变音量通道原本是100的默认值。</para>
+<programlisting>hint.pcm.0.vol="100"</programlisting>
- <note>
- <para>只有 &os; 5.3-RELEASE 和更高版本才支持这一功能。</para>
- </note>
+ <para>这将在 &man.pcm.4; 模块加载时, 将通道音量设置为默认的
+ 100。</para>
</sect2>
</sect1>
@@ -702,14 +706,14 @@ link acd0 rdvd</programlisting>
</indexterm>
<para>前面讨论的一些 ports 要正确地联编有赖于下列内核的选项设置。
- 在试图联编之前, 把这些选项增加到内核配置文件中去, 建立新的内核,
- 重启系统:</para>
+ 在试图联编之前, 把这一选项增加到内核配置文件中去, 联编新的内核,
+ 并重启系统:</para>
- <programlisting>option CPU_ENABLE_SSE
-option USER_LDT</programlisting>
+ <programlisting>options CPU_ENABLE_SSE</programlisting>
<note>
- <para><literal>option USER_LDT</literal> 在&os;&nbsp;5.X里并不存在。</para>
+ <para>在 &os;&nbsp;4.X 上, 内核配置文件中还应加入 <literal>options USER_LDT</literal>。
+ 这一选项在 &os;&nbsp;5.X 和更新版本中不再提供。</para>
</note>
<para>为了增强用于共享内存的X11接口,推荐增加一些 &man.sysctl.8; 参数的值:</para>
@@ -1141,32 +1145,39 @@ zoom=yes</programlisting>
<sect3 id="video-ports-transcode">
<title>使用transcode</title>
- <para>软件<application>transcode</application>不是一个播放器,而是一套再编码<filename>.avi</filename> 和 <filename>.mpg</filename> 文件的工具。使用<application>transcode</application>,借助标准输入输出(<filename>stdin/stdout</filename>)流接口,利用命令行工具,可以合并视频文件、修复坏文件。</para>
-
- <para>像<application>MPlayer</application>一样, <application>transcode</application>是个实验性软件,必须通过port<filename
- role="package">multimedia/transcode</filename>来建立。<command>make</command>使用了大量的选项。我们推荐:</para>
-
- <screen>&prompt.root; <userinput>make WITH_LIBMPEG2=yes</userinput></screen>
-
- <para>如果您打算安装<filename
- role="package">multimedia/avifile</filename>,那么就把选项<literal>WITH_AVIFILE</literal>加到您的<command>make</command>命令行里,如下所示:</para>
+ <para><application>transcode</application> 这个软件并不是播放器,
+ 而是一系列用于对视频和音频文件进行重新编码的工具。
+ 通过使用 <application>transcode</application>,
+ 就可以拥有使用带 <filename>stdin/stdout</filename>
+ 接口的命令行工具来合并视频文件, 以及修复坏损文件的能力。</para>
- <screen>&prompt.root; <userinput>make WITH_AVIFILE=yes WITH_LIBMPEG2=yes</userinput></screen>
+ <para>在联编 <filename
+ role="package">multimedia/transcode</filename> port 时可以指定大量选项,
+ 我们建议使用下面的命令行来构建
+ <application>transcode</application>:</para>
- <para>这里有两个使用<command>transcode</command>进行可调整视频输出的转换实例。第一个把输出编码成openDIVX AVI文件,第二个是编码成更为小巧的MPEG格式。</para>
+ <screen>&prompt.root; <userinput>make WITH_OPTIMIZED_CFLAGS=yes WITH_LIBA52=yes WITH_LAME=yes WITH_OGG=yes \
+WITH_MJPEG=yes -DWITH_XVID=yes</userinput></screen>
- <screen>&prompt.user; <userinput>transcode -i input.vob -x vob -V -Z 320x240 \
--y opendivx -N 0x55 -o output.avi</userinput></screen>
+ <para>对于多数用户而言, 前述配置已经足够了。</para>
- <screen>&prompt.user; <userinput>transcode -i input.vob -x vob -V -Z 320x240 \
--y mpeg -N 0x55 -o output.tmp</userinput>
-&prompt.user; <userinput>tcmplex -o output.mpg -i output.tmp.m1v -p output.tmp.mpa -m 1</userinput></screen>
+ <para>为了说明 <command>transcode</command> 的功能,
+ 下面的例子展示了如何将 DivX 转换为 PAL MPEG-1 文件 (PAL VCD):</para>
- <para>有个关于<command>transcode</command>的参考页,仅有很少的关于各种<command>tc*</command>(如
- <command>tcmplex</command>)应用的文档,这也是安装了的。命令行选项 <option>-h</option> 有时也可以给出简单的使用格式的说明。</para>
+ <screen>&prompt.user; <userinput>transcode -i input.avi -V --export_prof vcd-pal -o output_vcd</userinput>
+&prompt.user; <userinput>mplex -f 1 -o output_vcd.mpg output_vcd.m1v output_vcd.mpa</userinput></screen>
- <para>相比之下,<command>transcode</command>比<command>mencoder</command>运行起来要慢许多,但它可以制作出更多可播放的文件。例如,用<command>transcode</command>创建的MPEG文件众所周知可以在<application>&windows.media; Player</application> 和 Apple's <application>&quicktime;</application>里播放。</para>
+ <para>生成的 MPEG 文件,
+ <filename>output_vcd.mpg</filename>, 可以通过
+ <application>MPlayer</application> 来播放。
+ 您甚至可以直接将这个文件烧录到 CD-R 介质上来创建 Video CD,
+ 如果希望这样做的话, 需要安装 <filename
+ role="package">multimedia/vcdimager</filename> 和 <filename
+ role="package">sysutils/cdrdao</filename> 这两个程序。</para>
+ <para><command>transcode</command> 提供了联机手册, 但您仍应参考 <ulink
+ url="http://www.transcoding.org/cgi-bin/transcode">transcode
+ wiki</ulink> 以了解更多信息和例子。</para>
</sect3>
</sect2>
diff --git a/zh_CN.GB2312/books/handbook/network-servers/chapter.sgml b/zh_CN.GB2312/books/handbook/network-servers/chapter.sgml
index f8939a1982..cca056aa41 100644
--- a/zh_CN.GB2312/books/handbook/network-servers/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/network-servers/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.69
+ Original Revision: 1.78
$FreeBSD$
-->
@@ -97,6 +97,12 @@
<contrib>Contributed by </contrib>
</author>
</authorgroup>
+ <authorgroup>
+ <author>
+ <contrib>为 &os; 6.1-RELEASE 进行了更新, 由 </contrib>
+ <othername>The &os; Documentation Project</othername>
+ </author>
+ </authorgroup>
</sect1info>
<title> <application>inetd</application> <quote>超级服务器</quote></title>
@@ -104,83 +110,69 @@
<sect2 id="network-inetd-overview">
<title>总览</title>
- <para>&man.inetd.8; 被叫做 <quote>超级 Internet
- 服务器</quote>, 因为它能够管理许多不同的服务程序的连接。
- 当 <application>inetd</application> 接到连入的连接时,
- 它就会判断连接所需要启动的服务程序, 并运行它们,
- 然后将连接转交给这些服务程序 (在启动程序时,
- 这些程序的标准输入、输出和错误输出描述符被替换为连入的连接)。
- 与一个一个地运行单独的服务程序相比,
- 只启动一个 <application>inetd</application> 能够削减平均的系统负荷。</para>
-
- <para>一般说来, <application>inetd</application>
- 会被用来启动其他服务程序。 但一些非常简单的协议,
+ <para>&man.inetd.8; 有时也被称作 <quote>Internet
+ 超级服务器</quote>, 因为它可以为多种服务管理连接。
+ 当 <application>inetd</application> 接到连接时,
+ 它能够确定连接所需的程序, 启动相应的进程,
+ 并把 socket 交给它 (服务 socket 会作为程序的标准输入、
+ 输出和错误输出描述符)。 使用
+ <application>inetd</application> 来运行那些负载不重的服务有助于降低系统负载,
+ 因为它不需要为每个服务都启动独立的服务程序。</para>
+
+ <para>一般说来, <application>inetd</application> 主要用于启动其它服务程序,
+ 但它也有能力直接处理某些简单的服务,
例如 <application>chargen</application>、
<application>auth</application>, 以及
- <application>daytime</application>,
- 则会由它自行处理。</para>
+ <application>daytime</application>。</para>
- <para>这一节将介绍如何通过命令行选项, 以及配置文件
- <filename>/etc/inetd.conf</filename> 来配置
- <application>inetd</application> 的一些基本知识。</para>
+ <para>这一节将介绍关于如何通过命令行选项, 以及配置文件
+ <filename>/etc/inetd.conf</filename> 来对
+ <application>inetd</application> 进行配置的一些基础知识。</para>
</sect2>
<sect2 id="network-inetd-settings">
<title>设置</title>
- <para><application>inetd</application> 通过 <filename>/etc/rc.conf</filename>
- 系统进行初始化。<literal>inetd_enable</literal> 选项默认被设定为
- <literal>NO</literal>,不过可以通过<application>sysinstall</application>打开,
- 如果选用中等安全的模板。在<filename>/etc/rc.conf</filename>中设定:
+ <para><application>inetd</application> 是通过 &man.rc.8; 系统启动的。
+ <literal>inetd_enable</literal> 选项默认设为
+ <literal>NO</literal>, 但可以在安装系统时,
+ 由用户根据需要通过 <application>sysinstall</application> 来打开。 将
<programlisting>inetd_enable="YES"</programlisting> 或
- <programlisting>inetd_enable="NO"</programlisting>
- 可以激活或者禁止<application>inetd</application>在启动时加载。</para>
-
- <para>此外,可以通过<literal>inetd_flags</literal>把不同的
- 命令行参数传给<application>inetd</application>。</para>
- </sect2>
+ <programlisting>inetd_enable="NO"</programlisting> 写入
+ <filename>/etc/rc.conf</filename> 可以启用或禁用系统启动时
+ <application>inetd</application> 的自动启动。 命令:
+ <programlisting>/etc/rc.d/inetd rcvar</programlisting>
+ 可以显示目前的设置。</para>
+
+ <para>此外, 您还可以通过
+ <literal>inetd_flags</literal> 参数来向 <application>inetd</application>
+ 传递额外的其它参数。</para>
+ </sect2>
<sect2 id="network-inetd-cmdline">
<title>命令行选项</title>
- <para><application>inetd</application> 语法:</para>
-
- <para><option> inetd [-d] [-l] [-w] [-W] [-c maximum] [-C rate] [-a address | hostname]
- [-p filename] [-R rate] [configuration file]</option></para>
-
- <variablelist>
- <varlistentry>
- <term>-d</term>
-
- <listitem>
- <para>打开调试选项。</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-l</term>
-
- <listitem>
- <para>记录成功的连接</para>
- </listitem>
- </varlistentry>
+ <para>与多数服务程序类似, <application>inetd</application>
+ 也提供了为数众多的用以控制其行为的参数。 完整的参数列表如下:</para>
- <varlistentry>
- <term>-w</term>
+ <para><command>inetd</command> <option>[-d] [-l] [-w] [-W] [-c maximum] [-C rate] [-a address | hostname]
+ [-p filename] [-R rate] [-s maximum] [configuration file]</option></para>
- <listitem>
- <para>为外部服务打开TCP Wrapping(默认)。</para>
- </listitem>
- </varlistentry>
+ <para>这些参数都可以通过
+ <filename>/etc/rc.conf</filename> 的
+ <literal>inetd_flags</literal> 选项来传给 <application>inetd</application>。
+ 默认情况下,
+ <literal>inetd_flags</literal> 设为
+ <literal>-wW -C 60</literal>, 者表示希望为
+ <application>inetd</application> 的服务启用 TCP wrapping,
+ 并阻止来自同一 IP 每分钟超过 60 次的请求。</para>
- <varlistentry>
- <term>-W</term>
-
- <listitem>
- <para>为<application>inetd</application>的内置服务打开TCP Wrapping (默认)。</para>
- </listitem>
- </varlistentry>
+ <para>初学的用户可能会很高兴地发现这些选项通常并不需要进行修改,
+ 前面提到的速率限制选项在您的服务器收到过量请求的连接时,
+ 则会有效地发挥作用。 完整的参数列表,
+ 可以在 &man.inetd.8; 联机手册中找到。</para>
+ <variablelist>
<varlistentry>
<term>-c maximum</term>
@@ -210,75 +202,48 @@
</varlistentry>
<varlistentry>
- <term>-a</term>
+ <term>-s maximum</term>
<listitem>
- <para>指定绑定的IP地址。此外,可以使用主机名,这样系统就
- 可以根据主机名对应的IPV4或者IPV6来选择绑定地址。通常当
- <application>inetd</application> 在 &man.jail.8; 中运行
- 的时候指定主机名,这种情况下主机名来自 &man.jail.8; 环
- 境变量</para>
-
- <para>当使用主机名方式时,如果IPV4和IPV6都会被绑定到服务,
- 那么,需要在<filename>/etc/inetd.conf</filename>.中为该服务
- 的每个对应协议添加一条记录。比如,一个TCP服务需要两条记录,
- 一条使用<literal>tcp4</literal>,另一条使用<literal>tcp6</literal>。</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-p</term>
-
- <listitem>
- <para>指定用来存放进程ID的文件。</para>
+ <para>指定同一 IP 同时请求同一服务时允许的最大值; 默认值为不限制。
+ 您可以通过 <option>max-child-per-ip</option>
+ 参数来以服务为单位进行限制。</para>
</listitem>
</varlistentry>
</variablelist>
-
- <para>以上选项在<filename>/etc/rc.conf</filename>中将可以
- 被<literal>inetd_flags</literal>开关传递给<application>inetd</application>。
- 默认情况下,<literal>inetd_flags</literal> 被置为
- <literal>-wW</literal>,也既是对<application>inetd</application>的内置或外部服务打开TCP wrapping.
- 对于新手,通常不用去动这些参数,就算它们出现在<filename>/etc/rc.conf</filename>里头。</para>
-
- <note>
- <para>对<application>inetd</application>而言,所谓外部服务是当
- 连接请求到来时,被调用并接受连接,启动于inetd之外的守护进程。
- 反之,内置服务则是那些<application>inetd</application>自己可
- 以完全处理的了。</para>
- </note>
-
</sect2>
<sect2 id="network-inetd-conf">
+ <!-- XXX This section isn't very clear, and could do with some lovin' -->
<title><filename>inetd.conf</filename></title>
- <para><application>inetd</application>的配置通过
- <filename>/etc/inetd.conf</filename>文件进行控制。</para>
+ <para>对于 <application>inetd</application> 的配置,
+ 是通过 <filename>/etc/inetd.conf</filename> 文件来完成的。</para>
- <para>当
- <filename>/etc/inetd.conf</filename>内容发生改变,可以
- 对<application>inetd</application>进程发送一个HangUP信号,以强制
- <application>inetd</application>重新读取配置文件,如下所示:</para>
+ <para>在修改了
+ <filename>/etc/inetd.conf</filename> 之后, 可以使用下面的命令来强制
+ <application>inetd</application> 重新读取配置文件:</para>
- <example id="network-inetd-hangup">
- <title>对 <application>inetd</application>发送HangUP信号</title>
+ <example id="network-inetd-reread">
+ <title>重新加载 <application>inetd</application>
+ 配置文件</title>
- <screen>&prompt.root; <userinput>kill -HUP `cat /var/run/inetd.pid`</userinput></screen>
+ <screen>&prompt.root; <userinput>/etc/rc.d/inetd reload</userinput></screen>
</example>
- <para>配置文件中的每一行都是一个独立服务。如果要注释掉该服务,可以在行首加上
- <quote>#</quote>。<filename>/etc/inetd.conf</filename>的格式如下:</para>
+ <para>配置文件中的每一行都是一个独立的服务程序。 在这个文件中, 前面有
+ <quote>#</quote> 的内容被认为是注释。
+ <filename>/etc/inetd.conf</filename> 文件的格式如下:</para>
<programlisting>service-name
socket-type
protocol
-{wait|nowait}[/max-child[/max-connections-per-ip-per-minute]]
+{wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]
user[:group][/login-class]
server-program
server-program-arguments</programlisting>
- <para><application>ftpd</application>使用IPv4的例子:</para>
+ <para>下面是针对 IPv4 的 &man.ftpd.8; 服务的例子:</para>
<programlisting>ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l</programlisting>
@@ -349,7 +314,7 @@ server-program-arguments</programlisting>
</varlistentry>
<varlistentry>
- <term>{wait|nowait}[/max-child[/max-connections-per-ip-per-minute]]</term>
+ <term>{wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]</term>
<listitem>
<para><option>wait|nowait</option> 指明从<application>inetd</application>
@@ -363,36 +328,44 @@ server-program-arguments</programlisting>
<para>使用<option>max-child</option>选项可以设定针对服务,
<application>inetd</application>可以派生出来的最大子进程数量。
如果某特定服务需要限定最高10个实例,把<literal>/10</literal>
- 放到<option>nowait</option>后头就可以了。</para>
-
- <para>在<option>max-child</option>之外,还有一个开关可以限制
- 来自同一个地方,针对某个服务的最大连接数。这个开关就是:
- <option>max-connections-per-ip-per-minute</option>。
- 比如,设定该值为10就可以限定单个IP地址去向某服务的连接最大
- 为每分钟十个。这个对于防止有意或者无意的资源耗尽或者拒绝服
- 务(DoS)颇有用处。</para>
-
- <para>在这部分,必须选择<option>wait</option>或
- <option>nowait</option>。
- <option>max-child</option>和
- <option>max-connections-per-ip-per-minute</option> 则为可有可无。</para>
-
- <para>一个stream-type多线程的服务,如果没有
- <option>max-child</option>或者
- <option>max-connections-per-ip-per-minute</option>需要,
- 一般使用: <literal>nowait</literal>。</para>
-
- <para>同样的服务,如果需要限制最大连接数,则如下:
- <literal>nowait/10</literal>。</para>
-
- <para>此外,如果要限制每分钟单个IP来访连接为20个,同时最多
- 派生10个进程,可以如下:
+ 放到<option>nowait</option>后头就可以了。 指定 <literal>/0</literal>
+ 表示不限制子进程的数量。</para>
+
+ <para>除了 <option>max-child</option> 之外,
+ 还有两个选项可以限制来自同一位置到特定服务的最大连接数。
+ <option>max-connections-per-ip-per-minute</option> 可以限制特定 IP
+ 地址每分钟的总连接数, 例如, 限制任何
+ IP 地址每分钟最多连接十次。 <option>max-child-per-ip</option>
+ 则可以限制为某一 IP 地址在任何时候所启动的子进程数量。
+ 这些选项对于防止针对服务器有意或无意的资源耗竭和拒绝服务 (DoS)
+ 攻击十分有用。</para>
+
+ <para>这个字段中, 必须指定 <option>wait</option> 或
+ <option>nowait</option> 两者之一。 而
+ <option>max-child</option>、
+ <option>max-connections-per-ip-per-minute</option> 和
+ <option>max-child-per-ip</option> 则是可选项。</para>
+
+ <para>流式多线程服务, 并且不配置任何
+ <option>max-child</option>、
+ <option>max-connections-per-ip-per-minute</option> 或
+ <option>max-child-per-ip</option> 限制时,
+ 其配置为: <literal>nowait</literal>。</para>
+
+ <para>同一个服务, 但希望将服务启动的数量限制为十个时,
+ 则是: <literal>nowait/10</literal>。</para>
+
+ <para>同样配置, 限制每个 IP 地址每分钟最多连接二十次,
+ 而同时启动的子进程最多十个, 应写作:
<literal>nowait/10/20</literal>。</para>
- <para>以上开关都默认被使用在<application>fingerd</application>服务上面,
- 如下所示:</para>
+ <para>下面是 &man.fingerd.8; 服务的默认配置:</para>
<programlisting>finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -s</programlisting>
+
+ <para>最后这个例子中, 将子进程数限制为
+ 100 个, 而任意 IP 最多同时建立 5 个连接:
+ <literal>nowait/100/0/5</literal>。</para>
</listitem>
</varlistentry>
@@ -435,35 +408,40 @@ server-program-arguments</programlisting>
<sect2 id="network-inetd-security">
<title>Security</title>
- <para>随安装时候选择的安全模式不同,部分<application>inetd</application>的服务
- 会被设为默认打开。如果没有确实的需要,禁止它们!只要在<filename>/etc/inetd.conf</filename>里头
- 需要禁止的服务前头加上<quote>#</quote>,然后<link linkend="network-inetd-hangup">
- 对inetd发送hangup信号</link>。某些服务,比如<application>fingerd</application>,
- 由于对攻击者提供太多信息,可能对任何人都应该禁止。</para>
-
- <para>某些服务在安全上没有考虑,并且有一些连接超时检测设得很长或没有检测机制。
- 这回允许攻击者慢慢地发送连接,这样可以导致可用资源的消耗。在某些服务上面加上
- <option>max-connections-per-ip-per-minute</option>和<option>max-child</option>
- 的限制似乎不错。</para>
+ <para>随安装时所选的模式不同,
+ 许多 <application>inetd</application> 的服务可能已经默认启用。
+ 如果确实不需要某个特定的服务, 则应考虑禁用它。
+ 在 <filename>/etc/inetd.conf</filename> 中,
+ 将对应服务的那行前面加上 <quote>#</quote>,
+ 然后 <link linkend="network-inetd-reread">重新加载
+ inetd 配置</link> 就可以了。 某些服务, 例如
+ <application>fingerd</application>, 可能是完全不需要的,
+ 因为它们提供的信息可能对攻击者有用。</para>
+
+ <para>某些服务在设计时是缺少安全意识的, 或者有过长或压根没有连接请求的超时机制。
+ 这使得攻击者能够通过缓慢地对这些服务发起连接, 并耗尽可用的资源。
+ 对于这种情况, 设置 <option>max-connections-per-ip-per-minute</option>、
+ <option>max-child</option> 或 <option>max-child-per-ip</option> 限制,
+ 来制约服务的行为是个好办法。</para>
<para>默认情况下,TCP wrapping 是打开的。参考
- &man.hosts.access.5; 手册,以获得更多关于在各种<application>inetd</application>
+ &man.hosts.access.5; 手册,以获得更多关于在各种 <application>inetd</application>
调用的服务上设置TCP限制的信息。</para>
</sect2>
<sect2 id="network-inetd-misc">
<title>杂项</title>
- <para><application>daytime</application>,
- <application>time</application>,
- <application>echo</application>,
- <application>discard</application>,
- <application>chargen</application>, 和
- <application>auth</application> 都是<application>inetd</application>内置的服务。</para>
+ <para><application>daytime</application>、
+ <application>time</application>、
+ <application>echo</application>、
+ <application>discard</application>、
+ <application>chargen</application>, 以及
+ <application>auth</application> 都是由 <application>inetd</application>
+ 提供的内建服务。</para>
- <para><application>auth</application>服务提供
- identity (<application>ident</application>,
- <application>identd</application>)网络服务,并且某种程度上可配置。</para>
+ <para><application>auth</application> 服务提供了网络身份服务,
+ 它可以配置为提供不同级别的服务, 而其它服务则通常只能简单的打开或关闭。</para>
<para>参考 &man.inetd.8; 手册获得更多信息。</para>
</sect2>
@@ -489,8 +467,9 @@ server-program-arguments</programlisting>
<title>网络文件系统(NFS)</title>
<indexterm><primary>NFS</primary></indexterm>
- <para>网络文件系统是FreeBSD支持的文件系统中的一种,也被称为<acronym role="Network
- File System">NFS</acronym>. <acronym role="Network File
+ <para>网络文件系统是FreeBSD支持的文件系统中的一种,
+ 也被称为 <acronym role="Network
+ File System">NFS</acronym>。 <acronym role="Network File
System">NFS</acronym>允许一个系统在网络上与它人共享目录和文件。通过使用<acronym
role="Network File System">NFS</acronym>,用户和程序可以象访问本地文件
一样访问远端系统上的文件。</para>
@@ -659,7 +638,7 @@ mountd_flags="-r"</programlisting>
请确认客户端在您的 <filename>/etc/exports</filename> 被列出。 </para>
<para>在 <filename>/etc/exports</filename> 里头,每一行里面,输出信息和文件系统一一对应。
- 一个远程主机每次只能对应一个文件系统。而且只能有一个默认入口。比如,假设
+ 一个远程主机每次只能对应一个文件系统。而且只能有一个默认入口。比如,假设
<filename>/usr</filename> 是独立的文件系统。这个 <filename>/etc/exports</filename> 就是无效的:</para>
<programlisting># Invalid when /usr is one file system
@@ -667,15 +646,15 @@ mountd_flags="-r"</programlisting>
/usr/ports client</programlisting>
<para>一个文件系统,<filename>/usr</filename>, 有两行指定输出到同一主机,
- <hostid>client</hostid>.
- 解决这一问题的正确的格式是:</para>
+ <hostid>client</hostid>.
+ 解决这一问题的正确的格式是:</para>
<programlisting>/usr/src /usr/ports client</programlisting>
- <para>The properties of one filesystem exported to a given host
+ <para>The properties of one file system exported to a given host
must all occur on one line. Lines without a client specified
are treated as a single host. This limits how you can export
- filesystems, but for most people this is not an issue.</para>
+ file systems, but for most people this is not an issue.</para>
<para>下面是一个有效输出列表的例子,
<filename>/usr</filename> and <filename>/exports</filename>
@@ -1747,7 +1726,7 @@ basie&prompt.root;</screen>
<para>假设您在实验室中成功地部署 NIS 引起了上司的兴趣。
您接下来的任务是将 NIS 域扩展, 以覆盖校园中的一些其他的机器。
- 下面两个表哥中包括了新用户和新机器, 及其简要说明。</para>
+ 下面两个表格中包括了新用户和新机器, 及其简要说明。</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="2">
@@ -2743,7 +2722,6 @@ host mailhost {
要比根域更小一样。 主机名的格局和文件系统类似:
<filename>/dev</filename> 目录在根目录中, 等等。</para>
-
</sect2>
<sect2>
@@ -2959,12 +2937,6 @@ zone "0.0.127.IN-ADDR.ARPA" {
file "localhost.rev";
};
-zone
-"0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.INT" {
- type master;
- file "localhost.rev";
-};
-
// NB: Do not use the IP addresses below, they are faked, and only
// serve demonstration/documentation purposes!
//
@@ -3331,11 +3303,11 @@ www IN CNAME @</programlisting>
<listitem>
<para>重新组织基本的域和配置文件:</para>
<screen>&prompt.root; <userinput>cp /etc/localtime etc</userinput><co id="localtime">
-&prompt.root; <userinput>mv named.conf etc && ln -sf etc/named.conf</userinput>
+&prompt.root; <userinput>mv named.conf etc &amp;&amp; ln -sf etc/named.conf</userinput>
&prompt.root; <userinput>mv named.root master</userinput>
<!-- I don't like this next bit -->
&prompt.root; <userinput>sh make-localhost</userinput>
-&prompt.root; <userinput>cat > master/named.localhost
+&prompt.root; <userinput>cat &gt; master/named.localhost
$ORIGIN localhost.
$TTL 6h
@ IN SOA localhost. postmaster.localhost. (
@@ -3366,12 +3338,12 @@ $TTL 6h
<application>named-xfer</application>, 并将其复制到沙盒中:</para>
<screen>&prompt.root; <userinput>cd /usr/src/lib/libisc</userinput>
-&prompt.root; <userinput>make cleandir && make cleandir && make depend && make all</userinput>
+&prompt.root; <userinput>make cleandir &amp;&amp; make cleandir &amp;&amp; make depend &amp;&amp; make all</userinput>
&prompt.root; <userinput>cd /usr/src/lib/libbind</userinput>
-&prompt.root; <userinput>make cleandir && make cleandir && make depend && make all</userinput>
+&prompt.root; <userinput>make cleandir &amp;&amp; make cleandir &amp;&amp; make depend &amp;&amp; make all</userinput>
&prompt.root; <userinput>cd /usr/src/libexec/named-xfer</userinput>
-&prompt.root; <userinput>make cleandir && make cleandir && make depend && make NOSHARED=yes all</userinput>
-&prompt.root; <userinput>cp named-xfer /etc/namedb/bin && chmod 555 /etc/namedb/bin/named-xfer</userinput><co id="clean-cruft"></screen>
+&prompt.root; <userinput>make cleandir &amp;&amp; make cleandir &amp;&amp; make depend &amp;&amp; make NOSHARED=yes all</userinput>
+&prompt.root; <userinput>cp named-xfer /etc/namedb/bin &amp;&amp; chmod 555 /etc/namedb/bin/named-xfer</userinput><co id="clean-cruft"></screen>
<para>在把静态连接的
<command>named-xfer</command> 装好之后需要清理一下,
@@ -3388,11 +3360,11 @@ $TTL 6h
<callout arearefs="clean-cruft">
<para>据说这一步有时会失败。 如果您遇到这样的问题, 执行下面的命令:</para>
- <screen>&prompt.root; <userinput>cd /usr/src && make cleandir && make cleandir</userinput></screen>
+ <screen>&prompt.root; <userinput>cd /usr/src &amp;&amp; make cleandir &amp;&amp; make cleandir</userinput></screen>
<para>并删除 <filename>/usr/obj</filename> 目录:</para>
- <screen>&prompt.root; <userinput>rm -fr /usr/obj && mkdir /usr/obj</userinput></screen>
+ <screen>&prompt.root; <userinput>rm -fr /usr/obj &amp;&amp; mkdir /usr/obj</userinput></screen>
<para>这将把任何 <quote>垃圾</quote> 从您的源代码目录中删除,
而后续工作将得以正常进行。</para>
@@ -3408,7 +3380,7 @@ $TTL 6h
<para>做一个 <application>named</application>
能够看到并写入的 <filename>dev/null</filename>:</para>
- <screen>&prompt.root; <userinput>cd /etc/namedb/dev && mknod null c 2 2</userinput>
+ <screen>&prompt.root; <userinput>cd /etc/namedb/dev &amp;&amp; mknod null c 2 2</userinput>
&prompt.root; <userinput>chmod 666 null</userinput></screen>
</listitem>
@@ -3492,12 +3464,6 @@ zone "0.0.127.in-addr.arpa" IN {
allow-transfer { localhost; };
notify no;
};
-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.int" {
- type master;
- file "master/localhost-v6.rev";
- allow-transfer { localhost; };
- notify no;
-};
zone "." IN {
type hint;
file "master/named.root";
@@ -3809,7 +3775,7 @@ zone "0.168.192.in-addr.arpa" {
安装盘上找到。 如果没有在首次安装时附带安装
<application>Apache</application>, 则可以通过 <filename
role="package">www/apache13</filename> 或 <filename
- role="package">www/apache2</filename> port 来安装。</para>
+ role="package">www/apache20</filename> port 来安装。</para>
<para>一旦成功地安装了 <application>Apache</application>,
就必须对其进行配置。</para>
@@ -4016,7 +3982,7 @@ DocumentRoot /www/someotherdomain.tld
role="package">www/apache13-modssl</filename> port 来进行。 SSL
支持已经作为 <application>Apache</application>&nbsp;2.X 的一部分提供,
您可以通过
- <filename role="package">www/apache2</filename> port 来安装后者。</para>
+ <filename role="package">www/apache20</filename> port 来安装后者。</para>
<!-- XXX add more information about configuring mod_ssl here. -->
<!-- Generating keys, getting the key signed, setting up your secure -->
@@ -4024,9 +3990,23 @@ DocumentRoot /www/someotherdomain.tld
</sect3>
<sect3>
+ <title>使用 Perl &amp; PHP 的动态网站</title>
+ <para>在过去几年中, 越来越多的企业开始通过
+ Internet 以期扩大它们的收入和影响。 这也为交互式
+ web 内容提出了更多的要求。 尽管一些公司, 如 &microsoft;,
+ 提供了基于它们专有产品的解决方案,
+ 但开源社区也给出了自己的答案。 目前, 最为常用的动态 web
+ 内容实现两种方法是
+ <application>mod_perl</application> &amp;
+ <application>mod_php</application>。</para>
+
+ <sect4>
<title>mod_perl</title>
- <indexterm><primary>Perl</primary></indexterm>
+ <indexterm>
+ <primary>mod_perl</primary>
+ <secondary>Perl</secondary>
+ </indexterm>
<para><application>Apache</application>/Perl 集成计划, 将 Perl
程序设计语言的强大功能, 与 <application>Apache
@@ -4036,16 +4016,23 @@ DocumentRoot /www/someotherdomain.tld
此外, 服务器中嵌入的持久性解释器, 消除了由于启动外部的解释器为 Perl
脚本的启动所造成的性能损失。</para>
- <para>如果您还没有安装
- <application>Apache</application>,
- 也可以通过 <filename
- role="package">www/apache13-modperl</filename> port 来安装包含了
- <application>mod_perl</application> 的 <application>Apache</application>
- 版本。</para>
- </sect3>
+ <para><application>mod_perl</application> 通过多种方式提供。
+ 要使用 <application>mod_perl</application>,
+ 应该注意 <application>mod_perl</application> 1.0
+ 只能配合 <application>Apache</application> 1.3 而
+ <application>mod_perl</application> 2.0 只能配合
+ <application>Apache</application> 2 使用。
+ <application>mod_perl</application> 1.0 可以通过
+ <filename role="package">www/mod_perl</filename> 安装,
+ 而以静态方式联编的版本, 则可以通过
+ <filename role="package">www/apache13-modperl</filename>
+ 来安装。
+ <application>mod_perl</application> 2.0 则可以通过
+ <filename role="package">www/mod_perl2</filename> 安装。</para>
+ </sect4>
- <sect3>
- <sect3info>
+ <sect4>
+ <sect4info>
<authorgroup>
<author>
<firstname>Tom</firstname>
@@ -4053,67 +4040,68 @@ DocumentRoot /www/someotherdomain.tld
<contrib>Written by </contrib>
</author>
</authorgroup>
- </sect3info>
- <title>PHP</title>
-
- <indexterm><primary>PHP</primary></indexterm>
-
- <para>在过去的几年中, 更多的企业开始转向
- Internet, 以期扩大它们的收入和影响。 这也使得交互式
- web 内容的需求日益增长。 尽管某些公司, 例如 &microsoft;,
- 在它们的商业产品中引入了一些解决方案,
- 但开放源代码团体也给出了自己的答案。 这其中,
- 使用的最为广泛的就是 <acronym>PHP</acronym>。</para>
-
- <para>PHP, 也成为 <quote>Hypertext Preprocessor</quote>,
- 是一种通用的脚本语言, 并且特别适合于 Web 开发。
- 它能够很容易地嵌入到
- <acronym>HTML</acronym> 之中, 其语法接近于 C、 &java;、
- 以及 Perl, 以期让 web 开发人员能够迅速地写出动态生成的
- web 页面。</para>
-
- <para>要获得 <application>Apache</application> web
- 服务器的 <acronym>PHP</acronym>5 支持, 可以从安装
+ </sect4info>
+ <title>mod_php</title>
+
+ <indexterm>
+ <primary>mod_php</primary>
+ <secondary>PHP</secondary>
+ </indexterm>
+
+ <para><acronym>PHP</acronym>, 也称为 <quote>PHP:
+ Hypertext Preprocessor</quote>,
+ 是一种通用的脚本语言, 并且特别适合于 Web 开发。
+ 它能够很容易地嵌入到 <acronym>HTML</acronym> 之中,
+ 其语法接近于 C、 &java;, 以及 Perl, 以期让 web
+ 开发人员的一迅速撰写动态生成的页面。</para>
+
+ <para>要获得用于
+ <application>Apache</application> web 服务器的
+ <acronym>PHP</acronym>5 支持, 可以从安装
<filename role="package">www/mod_php5</filename>
port 开始。</para>
- <para>这样, 将安装并配置用于支持动态 web 应用所需要的模块。
- 请再次检查, 以确认在
+ <para>上述操作将安装并配置用于支持动态 <acronym>PHP</acronym> 应用程序所需的模块。
+ 请检查并确认在
<filename>/usr/local/etc/apache/httpd.conf</filename>
- 中添加了下面的配置:</para>
+ 中已经加入了下面的小节:</para>
- <programlisting>LoadModule php5_module libexec/apache/libphp5.so
-AddModule mod_php5.c
+ <programlisting>LoadModule php5_module libexec/apache/libphp5.so</programlisting>
+
+ <programlisting>AddModule mod_php5.c
&lt;IfModule mod_php5.c&gt;
DirectoryIndex index.php index.html
&lt;/IfModule&gt;
-
&lt;IfModule mod_php5.c&gt;
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
&lt;/IfModule&gt;</programlisting>
- <para>准备停当, 简单地使用
- <command>apachectl</command> 命令完成一次优雅的 (graceful)
- 服务重启:</para>
+ <para>这些工作完成之后, 还需要使用
+ <command>apachectl</command> 命令来完成一次 graceful
+ restart 以便加载 <acronym>PHP</acronym> 模块:</para>
<screen>&prompt.root; <userinput>apachectl graceful</userinput></screen>
- <para>在 &os; 中的 <acronym>PHP</acronym> 支持是极端模块化的。
- 如果需要安装某个扩展, 管理员只需安装相应的 port,
- 并像上面所建议的那样重新启动 <application>Apache</application>
- 就可以了。</para>
+ <para>在 &os; 中的 <acronym>PHP</acronym> 支持是高度模块化的,
+ 因此基本安装的功能十分有限。 增加其他功能的支持非常简单, 只需通过
+ <filename role="package">lang/php5-extensions</filename> port
+ 即可完成。 这个 port 提供了一个菜单驱动的界面来帮助完成
+ <acronym>PHP</acronym> 扩展的安装。 另外, 也可以通过对应的 port
+ 来单独安装扩展。</para>
<para>例如, 要将对于
<application>MySQL</application> 数据库服务器的支持加入
<acronym>PHP</acronym>5, 只需简单地安装
<filename role="package">databases/php5-mysql</filename>
- 并执行下面的命令:</para>
+ port。</para>
- <screen>&prompt.root; <userinput>apachectl graceful</userinput></screen>
+ <para>安装完扩展之后, 必须重新启动
+ <application>Apache</application> 服务器,
+ 来令其适应新的配置变更:</para>
- <para>这样, 就启用了 <acronym>PHP</acronym>
- 的 <application>MySQL</application> 支持。</para>
+ <screen>&prompt.root; <userinput>apachectl graceful</userinput></screen>
+ </sect4>
</sect3>
</sect2>
</sect1>
@@ -4187,9 +4175,9 @@ AddModule mod_php5.c
<programlisting>ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l</programlisting>
- <para>如 <xref linkend="network-inetd-hangup"> 所介绍的那样,
- 修改这个文件之后, 需要向 <application>inetd</application> 发送
- HangUP 信号。</para>
+ <para>如 <xref linkend="network-inetd-reread"> 所介绍的那样,
+ 修改这个文件之后, 必须让 <application>inetd</application> 重新加载它,
+ 才能使新的设置生效。</para>
<para>现在可以通过输入下面的命令来登录您的 FTP 服务器了:</para>
@@ -4253,7 +4241,7 @@ AddModule mod_php5.c
<sect2>
<title>纵览</title>
- <para><application>Samba</application> 是一个流行的开远软件包,
+ <para><application>Samba</application> 是一个流行的开源软件包,
它提供了针对 &microsoft.windows; 客户机的文件和打印服务。
这类客户机可以连接并使用 FreeBSD 系统上的文件空间,
就如同使用本地的磁盘一样, 或者像使用本地打印机一样使用
@@ -4295,9 +4283,9 @@ AddModule mod_php5.c
来配置 <application>Samba</application>:</para>
<programlisting>swat stream tcp nowait/400 root /usr/local/sbin/swat</programlisting>
- <para>如同 <xref linkend="network-inetd-hangup"> 中介绍的那样,
- 修改配置文件之后, 需要向 <application>inetd</application> 发送
- HangUP 信号。</para>
+ <para>如 <xref linkend="network-inetd-reread"> 中所介绍的那样,
+ 在修改了这个配置文件之后, 必须让 <application>inetd</application>
+ 重新加载配置, 才能使其生效。</para>
<para>一旦在 <filename>inetd.conf</filename> 中启用了
<application>swat</application>, 就可以用浏览器访问
diff --git a/zh_CN.GB2312/books/handbook/pgpkeys/chapter.sgml b/zh_CN.GB2312/books/handbook/pgpkeys/chapter.sgml
index 8cc57c12f3..5f2d595a24 100644
--- a/zh_CN.GB2312/books/handbook/pgpkeys/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/pgpkeys/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.270
+ Original Revision: 1.286
$FreeBSD$
-->
<!--
@@ -24,970 +24,19 @@
<sect1 id="pgpkeys-officers">
<title>官员</title>
- <sect2 id="pgpkey-security-officer">
- <title>&a.security-officer;</title>
- &pgpkey.security-officer;
- </sect2>
-
- <sect2 id="pgpkey-core-secretary">
- <title>&a.core-secretary;</title>
- &pgpkey.core-secretary;
- </sect2>
-
+ &section.pgpkeys-officers;
</sect1>
<sect1 id="pgpkeys-core">
<title>核心团队成员</title>
- <sect2 id="pgpkey-jhb">
- <title>&a.jhb;</title>
- &pgpkey.jhb;
- </sect2>
-
- <sect2 id="pgpkey-kuriyama">
- <title>&a.kuriyama;</title>
- &pgpkey.kuriyama;
- </sect2>
-
- <sect2 id="pgpkey-scottl">
- <title>&a.scottl;</title>
- &pgpkey.scottl;
- </sect2>
-
- <sect2 id="pgpkey-imp">
- <title>&a.imp;</title>
- &pgpkey.imp;
- </sect2>
-
- <sect2 id="pgpkey-wes">
- <title>&a.wes;</title>
- &pgpkey.wes;
- </sect2>
-
- <sect2 id="pgpkey-murray">
- <title>&a.murray;</title>
- &pgpkey.murray;
- </sect2>
-
- <sect2 id="pgpkey-peter">
- <title>&a.peter;</title>
- &pgpkey.peter;
- </sect2>
+ &section.pgpkeys-core;
</sect1>
<sect1 id="pgpkeys-developers">
<title>开发者</title>
- <sect2 id="pgpkey-will">
- <title>&a.will;</title>
- &pgpkey.will;
- </sect2>
-
- <sect2 id="pgpkey-anholt">
- <title>&a.anholt;</title>
- &pgpkey.anholt;
- </sect2>
-
- <sect2 id="pgpkey-mat">
- <title>&a.mat;</title>
- &pgpkey.mat;
- </sect2>
-
- <sect2 id="pgpkey-asami">
- <title>&a.asami;</title>
- &pgpkey.asami;
- </sect2>
-
- <sect2 id="pgpkey-barner">
- <title>&a.barner;</title>
- &pgpkey.barner;
- </sect2>
-
- <sect2 id="pgpkey-dougb">
- <title>&a.dougb;</title>
- &pgpkey.dougb;
- </sect2>
-
- <sect2 id="pgpkey-tobez">
- <title>&a.tobez;</title>
- &pgpkey.tobez;
- </sect2>
-
- <sect2 id="pgpkey-damien">
- <title>&a.damien;</title>
- &pgpkey.damien;
- </sect2>
-
- <sect2 id="pgpkey-mbr">
- <title>&a.mbr;</title>
- &pgpkey.mbr;
- </sect2>
-
- <sect2 id="pgpkey-novel">
- <title>&a.novel;</title>
- &pgpkey.novel;
- </sect2>
-
- <sect2 id="pgpkey-hart">
- <title>&a.harti;</title>
- &pgpkey.harti;
- </sect2>
-
- <sect2 id="pgpkey-obraun">
- <title>&a.obraun;</title>
- &pgpkey.obraun;
- </sect2>
-
- <sect2 id="pgpkey-jmb">
- <title>&a.jmb;</title>
- &pgpkey.jmb;
- </sect2>
-
- <sect2 id="pgpkey-brueffer">
- <title>&a.brueffer;</title>
- &pgpkey.brueffer;
- </sect2>
-
- <sect2 id="pgpkey-markus">
- <title>&a.markus;</title>
- &pgpkey.markus;
- </sect2>
-
- <sect2 id="pgpkey-wilko">
- <title>&a.wilko;</title>
- &pgpkey.wilko;
- </sect2>
-
- <sect2 id="pgpkey-jcamou">
- <title>&a.jcamou;</title>
- &pgpkey.jcamou;
- </sect2>
-
- <sect2 id="pgpkey-perky">
- <title>&a.perky;</title>
- &pgpkey.perky;
- </sect2>
-
- <sect2 id="pgpkey-jon">
- <title>&a.jon;</title>
- &pgpkey.jon;
- </sect2>
-
- <sect2 id="pgpkey-luoqi">
- <title>&a.luoqi;</title>
- &pgpkey.luoqi;
- </sect2>
-
- <sect2 id="pgpkey-ache">
- <title>&a.ache;</title>
- &pgpkey.ache;
- </sect2>
-
- <sect2 id="pgpkey-seanc">
- <title>&a.seanc;</title>
- &pgpkey.seanc;
- </sect2>
-
- <sect2 id="pgpkey-cjh">
- <title>&a.cjh;</title>
- &pgpkey.cjh;
- </sect2>
-
- <sect2 id="pgpkey-cjc">
- <title>&a.cjc;</title>
- &pgpkey.cjc;
- </sect2>
-
- <sect2 id="pgpkey-marcus">
- <title>&a.marcus;</title>
- &pgpkey.marcus;
- </sect2>
-
- <sect2 id="pgpkey-nik">
- <title>&a.nik;</title>
- &pgpkey.nik;
- </sect2>
-
- <sect2 id="pgpkey-ceri">
- <title>&a.ceri;</title>
- &pgpkey.ceri;
- </sect2>
-
- <sect2 id="pgpkey-brd">
- <title>&a.brd;</title>
- &pgpkey.brd;
- </sect2>
-
- <sect2 id="pgpkey-brooks">
- <title>&a.brooks;</title>
- &pgpkey.brooks;
- </sect2>
-
- <sect2 id="pgpkey-gnn">
- <title>&a.gnn;</title>
- &pgpkey.gnn;
- </sect2>
-
- <sect2 id="pgpkey-pjd">
- <title>&a.pjd;</title>
- &pgpkey.pjd;
- </sect2>
-
- <sect2 id="pgpkey-bsd">
- <title>&a.bsd;</title>
- &pgpkey.bsd;
- </sect2>
-
- <sect2 id="pgpkey-danfe">
- <title>&a.danfe;</title>
- &pgpkey.danfe;
- </sect2>
-
- <sect2 id="pgpkey-dd">
- <title>&a.dd;</title>
- &pgpkey.dd;
- </sect2>
-
- <sect2 id="pgpkey-bruno">
- <title>&a.bruno;</title>
- &pgpkey.bruno;
- </sect2>
-
- <sect2 id="pgpkey-ale">
- <title>&a.ale;</title>
- &pgpkey.ale;
- </sect2>
-
- <sect2 id="pgpkey-peadar">
- <title>&a.peadar;</title>
- &pgpkey.peadar;
- </sect2>
-
- <sect2 id="pgpkey-josef">
- <title>&a.josef;</title>
- &pgpkey.josef;
- </sect2>
-
- <sect2 id="pgpkey-ue">
- <title>&a.ue;</title>
- &pgpkey.ue;
- </sect2>
-
- <sect2 id="pgpkey-ru">
- <title>&a.ru;</title>
- &pgpkey.ru;
- </sect2>
-
- <sect2 id="pgpkey-le">
- <title>&a.le;</title>
- &pgpkey.le;
- </sect2>
-
- <sect2 id="pgpkey-stefanf">
- <title>&a.stefanf;</title>
- &pgpkey.stefanf;
- </sect2>
-
- <sect2 id="pgpkey-jedgar">
- <title>&a.jedgar;</title>
- &pgpkey.jedgar;
- </sect2>
-
- <sect2 id="pgpkey-green">
- <title>&a.green;</title>
- &pgpkey.green;
- </sect2>
-
- <sect2 id="pgpkey-lioux">
- <title>&a.lioux;</title>
- &pgpkey.lioux;
- </sect2>
-
- <sect2 id="pgpkey-fanf">
- <title>&a.fanf;</title>
- &pgpkey.fanf;
- </sect2>
-
- <sect2 id="pgpkey-blackend">
- <title>&a.blackend;</title>
- &pgpkey.blackend;
- </sect2>
-
- <sect2 id="pgpkey-petef">
- <title>&a.petef;</title>
- &pgpkey.petef;
- </sect2>
-
- <sect2 id="pgpkey-billf">
- <title>&a.billf;</title>
- &pgpkey.billf;
- </sect2>
-
- <sect2 id="pgpkey-patrick">
- <title>&a.patrick;</title>
- &pgpkey.patrick;
- </sect2>
-
- <sect2 id="pgpkey-gioria">
- <title>&a.gioria;</title>
- &pgpkey.gioria;
- </sect2>
-
- <sect2 id="pgpkey-jmg">
- <title>&a.jmg;</title>
- &pgpkey.jmg;
- </sect2>
-
- <sect2 id="pgpkey-dannyboy">
- <title>&a.dannyboy;</title>
- &pgpkey.dannyboy;
- </sect2>
-
- <sect2 id="pgpkey-dhartmei">
- <title>&a.dhartmei;</title>
- &pgpkey.dhartmei;
- </sect2>
-
- <sect2 id="pgpkey-jhay">
- <title>&a.jhay;</title>
- &pgpkey.jhay;
- </sect2>
-
- <sect2 id="pgpkey-sheldonh">
- <title>&a.sheldonh;</title>
- &pgpkey.sheldonh;
- </sect2>
-
- <sect2 id="pgpkey-mikeh">
- <title>&a.mikeh;</title>
- &pgpkey.mikeh;
- </sect2>
-
- <sect2 id="pgpkey-mheinen">
- <title>&a.mheinen;</title>
- &pgpkey.mheinen;
- </sect2>
-
- <sect2 id="pgpkey-niels">
- <title>&a.niels;</title>
- &pgpkey.niels;
- </sect2>
-
- <sect2 id="pgpkey-ghelmer">
- <title>&a.ghelmer;</title>
- &pgpkey.ghelmer;
- </sect2>
-
- <sect2 id="pgpkey-mux">
- <title>&a.mux;</title>
- &pgpkey.mux;
- </sect2>
-
- <sect2 id="pgpkey-mich">
- <title>&a.mich;</title>
- &pgpkey.mich;
- </sect2>
-
- <sect2 id="pgpkey-foxfair">
- <title>&a.foxfair;</title>
- &pgpkey.foxfair;
- </sect2>
-
- <sect2 id="pgpkey-jkh">
- <title>&a.jkh;</title>
- &pgpkey.jkh;
- </sect2>
-
- <sect2 id="pgpkey-ahze">
- <title>&a.ahze;</title>
- &pgpkey.ahze;
- </sect2>
-
- <sect2 id="pgpkey-trevor">
- <title>&a.trevor;</title>
- &pgpkey.trevor;
- </sect2>
-
- <sect2 id="pgpkey-phk">
- <title>&a.phk;</title>
- &pgpkey.phk;
- </sect2>
-
- <sect2 id="pgpkey-joe">
- <title>&a.joe;</title>
- &pgpkey.joe;
- </sect2>
-
- <sect2 id="pgpkey-vkashyap">
- <title>&a.vkashyap;</title>
- &pgpkey.vkashyap;
- </sect2>
-
- <sect2 id="pgpkey-kris">
- <title>&a.kris;</title>
- &pgpkey.kris;
- </sect2>
-
- <sect2 id="pgpkey-keramida">
- <title>&a.keramida;</title>
- &pgpkey.keramida;
- </sect2>
-
- <sect2 id="pgpkey-fjoe">
- <title>&a.fjoe;</title>
- &pgpkey.fjoe;
- </sect2>
-
- <sect2 id="pgpkey-jkim">
- <title>&a.jkim;</title>
- &pgpkey.jkim;
- </sect2>
-
- <sect2 id="pgpkey-andreas">
- <title>&a.andreas;</title>
- &pgpkey.andreas;
- </sect2>
-
- <sect2 id="pgpkey-jkois">
- <title>&a.jkois;</title>
- &pgpkey.jkois;
- </sect2>
-
- <sect2 id="pgpkey-sergei">
- <title>&a.sergei;</title>
- &pgpkey.sergei;
- </sect2>
-
- <sect2 id="pgpkey-maxim">
- <title>&a.maxim;</title>
- &pgpkey.maxim;
- </sect2>
-
- <sect2 id="pgpkey-jkoshy">
- <title>&a.jkoshy;</title>
- &pgpkey.jkoshy;
- </sect2>
-
- <sect2 id="pgpkey-rik">
- <title>&a.rik;</title>
- &pgpkey.rik;
- </sect2>
-
- <sect2 id="pgpkey-rushani">
- <title>&a.rushani;</title>
- &pgpkey.rushani;
- </sect2>
-
- <sect2 id="pgpkey-clement">
- <title>&a.clement;</title>
- &pgpkey.clement;
- </sect2>
-
- <sect2 id="pgpkey-mlaier">
- <title>&a.mlaier;</title>
- &pgpkey.mlaier;
- </sect2>
-
- <sect2 id="pgpkey-alex">
- <title>&a.alex;</title>
- &pgpkey.alex;
- </sect2>
-
- <sect2 id="pgpkey-erwin">
- <title>&a.erwin;</title>
- &pgpkey.erwin;
- </sect2>
-
- <sect2 id="pgpkey-lawrance">
- <title>&a.lawrance;</title>
- &pgpkey.lawrance;
- </sect2>
-
- <sect2 id="pgpkey-leeym">
- <title>&a.leeym;</title>
- &pgpkey.leeym;
- </sect2>
-
- <sect2 id="pgpkey-sam">
- <title>&a.sam;</title>
- &pgpkey.sam;
- </sect2>
-
- <sect2 id="pgpkey-jylefort">
- <title>&a.jylefort;</title>
- &pgpkey.jylefort;
- </sect2>
-
- <sect2 id="pgpkey-netchild">
- <title>&a.netchild;</title>
- &pgpkey.netchild;
- </sect2>
-
- <sect2 id="pgpkey-lesi">
- <title>&a.lesi;</title>
- &pgpkey.lesi;
- </sect2>
-
- <sect2 id="pgpkey-glewis">
- <title>&a.glewis;</title>
- &pgpkey.glewis;
- </sect2>
-
- <sect2 id="pgpkey-delphij">
- <title>&a.delphij;</title>
- &pgpkey.delphij;
- </sect2>
-
- <sect2 id="pgpkey-avatar">
- <title>&a.avatar;</title>
- &pgpkey.avatar;
- </sect2>
-
- <sect2 id="pgpkey-ijliao">
- <title>&a.ijliao;</title>
- &pgpkey.ijliao;
- </sect2>
-
- <sect2 id="pgpkey-clive">
- <title>&a.clive;</title>
- &pgpkey.clive;
- </sect2>
-
- <sect2 id="pgpkey-clsung">
- <title>&a.clsung;</title>
- &pgpkey.clsung;
- </sect2>
-
- <sect2 id="pgpkey-arved">
- <title>&a.arved;</title>
- &pgpkey.arved;
- </sect2>
-
- <sect2 id="pgpkey-remko">
- <title>&a.remko;</title>
- &pgpkey.remko;
- </sect2>
-
- <sect2 id="pgpkey-pav">
- <title>&a.pav;</title>
- &pgpkey.pav;
- </sect2>
-
- <sect2 id="pgpkey-bmah">
- <title>&a.bmah;</title>
- &pgpkey.bmah;
- </sect2>
-
- <sect2 id="pgpkey-mtm">
- <title>&a.mtm;</title>
- &pgpkey.mtm;
- </sect2>
-
- <sect2 id="pgpkey-dwmalone">
- <title>&a.dwmalone;</title>
- &pgpkey.dwmalone;
- </sect2>
-
- <sect2 id="pgpkey-kwm">
- <title>&a.kwm;</title>
- &pgpkey.kwm;
- </sect2>
-
- <sect2 id="pgpkey-matusita">
- <title>&a.matusita;</title>
- &pgpkey.matusita;
- </sect2>
-
- <sect2 id="pgpkey-ken">
- <title>&a.ken;</title>
- &pgpkey.ken;
- </sect2>
-
- <sect2 id="pgpkey-dinoex">
- <title>&a.dinoex;</title>
- &pgpkey.dinoex;
- </sect2>
-
- <sect2 id="pgpkey-sanpei">
- <title>&a.sanpei;</title>
- &pgpkey.sanpei;
- </sect2>
-
- <sect2 id="pgpkey-jim">
- <title>&a.jim;</title>
- &pgpkey.jim;
- </sect2>
-
- <sect2 id="pgpkey-marcel">
- <title>&a.marcel;</title>
- &pgpkey.marcel;
- </sect2>
-
- <sect2 id="pgpkey-marck">
- <title>&a.marck;</title>
- &pgpkey.marck;
- </sect2>
-
- <sect2 id="pgpkey-tmm">
- <title>&a.tmm;</title>
- &pgpkey.tmm;
- </sect2>
-
- <sect2 id="pgpkey-rich">
- <title>&a.rich;</title>
- &pgpkey.rich;
- </sect2>
-
- <sect2 id="pgpkey-knu">
- <title>&a.knu;</title>
- &pgpkey.knu;
- </sect2>
-
- <sect2 id="pgpkey-max">
- <title>&a.max;</title>
- &pgpkey.max;
- </sect2>
-
- <sect2 id="pgpkey-yoichi">
- <title>&a.yoichi;</title>
- &pgpkey.yoichi;
- </sect2>
-
- <sect2 id="pgpkey-bland">
- <title>&a.bland;</title>
- &pgpkey.bland;
- </sect2>
-
- <sect2 id="pgpkey-simon">
- <title>&a.simon;</title>
- &pgpkey.simon;
- </sect2>
-
- <sect2 id="pgpkey-anders">
- <title>&a.anders;</title>
- &pgpkey.anders;
- </sect2>
-
- <sect2 id="pgpkey-obrien">
- <title>&a.obrien;</title>
- &pgpkey.obrien;
- </sect2>
-
- <sect2 id="pgpkey-philip">
- <title>&a.philip;</title>
- &pgpkey.philip;
- </sect2>
-
- <sect2 id="pgpkey-hmp">
- <title>&a.hmp;</title>
- &pgpkey.hmp;
- </sect2>
-
- <sect2 id="pgpkey-mp">
- <title>&a.mp;</title>
- &pgpkey.mp;
- </sect2>
-
- <sect2 id="pgpkey-roam">
- <title>&a.roam;</title>
- &pgpkey.roam;
- </sect2>
-
- <sect2 id="pgpkey-den">
- <title>&a.den;</title>
- &pgpkey.den;
- </sect2>
-
- <sect2 id="pgpkey-pirzyk">
- <title>&a.pirzyk;</title>
- &pgpkey.pirzyk;
- </sect2>
-
- <sect2 id="pgpkey-jdp">
- <title>&a.jdp;</title>
- &pgpkey.jdp;
- </sect2>
-
- <sect2 id="pgpkey-krion">
- <title>&a.krion;</title>
- &pgpkey.krion;
- </sect2>
-
- <sect2 id="pgpkey-markp">
- <title>&a.markp;</title>
- &pgpkey.markp;
- </sect2>
-
- <sect2 id="pgpkey-thomas">
- <title>&a.thomas;</title>
- &pgpkey.thomas;
- </sect2>
-
- <sect2 id="pgpkey-hq">
- <title>&a.hq;</title>
- &pgpkey.hq;
- </sect2>
-
- <sect2 id="pgpkey-dfr">
- <title>&a.dfr;</title>
- &pgpkey.dfr;
- </sect2>
-
- <sect2 id="pgpkey-trhodes">
- <title>&a.trhodes;</title>
- &pgpkey.trhodes;
- </sect2>
-
- <sect2 id="pgpkey-benno">
- <title>&a.benno;</title>
- &pgpkey.benno;
- </sect2>
-
- <sect2 id="pgpkey-paul">
- <title>&a.paul;</title>
- &pgpkey.paul;
- </sect2>
-
- <sect2 id="pgpkey-roberto">
- <title>&a.roberto;</title>
- &pgpkey.roberto;
- </sect2>
-
- <sect2 id="pgpkey-rodrigc">
- <title>&a.rodrigc;</title>
- &pgpkey.rodrigc;
- </sect2>
-
- <sect2 id="pgpkey-guido">
- <title>&a.guido;</title>
- &pgpkey.guido;
- </sect2>
-
- <sect2 id="pgpkey-niklas">
- <title>&a.niklas;</title>
- &pgpkey.niklas;
- </sect2>
-
- <sect2 id="pgpkey-marks">
- <title>&a.marks;</title>
- &pgpkey.marks;
- </sect2>
-
- <sect2 id="pgpkey-hrs">
- <title>&a.hrs;</title>
- &pgpkey.hrs;
- </sect2>
-
- <sect2 id="pgpkey-wosch">
- <title>&a.wosch;</title>
- &pgpkey.wosch;
- </sect2>
-
- <sect2 id="pgpkey-das">
- <title>&a.das;</title>
- &pgpkey.das;
- </sect2>
-
- <sect2 id="pgpkey-schweikh">
- <title>&a.schweikh;</title>
- &pgpkey.schweikh;
- </sect2>
-
- <sect2 id="pgpkey-gshapiro">
- <title>&a.gshapiro;</title>
- &pgpkey.gshapiro;
- </sect2>
-
- <sect2 id="pgpkey-arun">
- <title>&a.arun;</title>
- &pgpkey.arun;
- </sect2>
-
- <sect2 id="pgpkey-nork">
- <title>&a.nork;</title>
- &pgpkey.nork;
- </sect2>
-
- <sect2 id="pgpkey-vanilla">
- <title>&a.vanilla;</title>
- &pgpkey.vanilla;
- </sect2>
-
- <sect2 id="pgpkey-cshumway">
- <title>&a.cshumway;</title>
- &pgpkey.cshumway;
- </sect2>
-
- <sect2 id="pgpkey-demon">
- <title>&a.demon;</title>
- &pgpkey.demon;
- </sect2>
-
- <sect2 id="pgpkey-jesper">
- <title>&a.jesper;</title>
- &pgpkey.jesper;
- </sect2>
-
- <sect2 id="pgpkey-scop">
- <title>&a.scop;</title>
- &pgpkey.scop;
- </sect2>
-
- <sect2 id="pgpkey-glebius">
- <title>&a.glebius;</title>
- &pgpkey.glebius;
- </sect2>
-
- <sect2 id="pgpkey-kensmith">
- <title>&a.kensmith;</title>
- &pgpkey.kensmith;
- </sect2>
-
- <sect2 id="pgpkey-ben">
- <title>&a.ben;</title>
- &pgpkey.ben;
- </sect2>
-
- <sect2 id="pgpkey-des">
- <title>&a.des;</title>
- &pgpkey.des;
- </sect2>
-
- <sect2 id="pgpkey-sobomax">
- <title>&a.sobomax;</title>
- &pgpkey.sobomax;
- </sect2>
-
- <sect2 id="pgpkey-dcs">
- <title>&a.dcs;</title>
- &pgpkey.dcs;
- </sect2>
-
- <sect2 id="pgpkey-brian">
- <title>&a.brian;</title>
- &pgpkey.brian;
- </sect2>
-
- <sect2 id="pgpkey-nsouch">
- <title>&a.nsouch;</title>
- &pgpkey.nsouch;
- </sect2>
-
- <sect2 id="pgpkey-ssouhlal">
- <title>&a.ssouhlal;</title>
- &pgpkey.ssouhlal;
- </sect2>
-
- <sect2 id="pgpkey-vsevolod">
- <title>&a.vsevolod;</title>
- &pgpkey.vsevolod;
- </sect2>
-
- <sect2 id="pgpkey-vs">
- <title>&a.vs;</title>
- &pgpkey.vs;
- </sect2>
-
- <sect2 id="pgpkey-gsutter">
- <title>&a.gsutter;</title>
- &pgpkey.gsutter;
- </sect2>
-
- <sect2 id="pgpkey-metal">
- <title>&a.metal;</title>
- &pgpkey.metal;
- </sect2>
-
- <sect2 id="pgpkey-garys">
- <title>&a.garys;</title>
- &pgpkey.garys;
- </sect2>
-
- <sect2 id="pgpkey-nyan">
- <title>&a.nyan;</title>
- &pgpkey.nyan;
- </sect2>
-
- <sect2 id="pgpkey-mi">
- <title>&a.mi;</title>
- &pgpkey.mi;
- </sect2>
-
- <sect2 id="pgpkey-gordon">
- <title>&a.gordon;</title>
- &pgpkey.gordon;
- </sect2>
-
- <sect2 id="pgpkey-lth">
- <title>&a.lth;</title>
- &pgpkey.lth;
- </sect2>
-
- <sect2 id="pgpkey-thierry">
- <title>&a.thierry;</title>
- &pgpkey.thierry;
- </sect2>
-
- <sect2 id="pgpkey-thompsa">
- <title>&a.thompsa;</title>
- &pgpkey.thompsa;
- </sect2>
-
- <sect2 id="pgpkey-flz">
- <title>&a.flz;</title>
- &pgpkey.flz;
- </sect2>
-
- <sect2 id="pgpkey-viny">
- <title>&a.viny;</title>
- &pgpkey.viny;
- </sect2>
-
- <sect2 id="pgpkey-ume">
- <title>&a.ume;</title>
- &pgpkey.ume;
- </sect2>
-
- <sect2 id="pgpkey-ups">
- <title>&a.ups;</title>
- &pgpkey.ups;
- </sect2>
-
- <sect2 id="pgpkey-nectar">
- <title>&a.nectar;</title>
- &pgpkey.nectar;
- </sect2>
-
- <sect2 id="pgpkey-adamw">
- <title>&a.adamw;</title>
- &pgpkey.adamw;
- </sect2>
-
- <sect2 id="pgpkey-nate">
- <title>&a.nate;</title>
- &pgpkey.nate;
- </sect2>
-
- <sect2 id="pgpkey-wollman">
- <title>&a.wollman;</title>
- &pgpkey.wollman;
- </sect2>
-
- <sect2 id="pgpkey-joerg">
- <title>&a.joerg;</title>
- &pgpkey.joerg;
- </sect2>
-
- <sect2 id="pgpkey-bz">
- <title>&a.bz;</title>
- &pgpkey.bz;
- </sect2>
-
- <sect2 id="pgpkey-phantom">
- <title>&a.phantom;</title>
- &pgpkey.phantom;
- </sect2>
-
+ &section.pgpkeys-developers;
</sect1>
</appendix>
diff --git a/zh_CN.GB2312/books/handbook/ports/chapter.sgml b/zh_CN.GB2312/books/handbook/ports/chapter.sgml
index 6b322adfd1..c58527c2f9 100644
--- a/zh_CN.GB2312/books/handbook/ports/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/ports/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Documentation Project
- Original Revision: 1.243
+ Original Revision: 1.253
$FreeBSD$
-->
@@ -14,11 +14,11 @@
<indexterm><primary>ports</primary></indexterm>
<indexterm><primary>packages</primary></indexterm>
- <para>FreeBSD 捆绑了很多系统工具作为基本系统的一部分。然而,在实际工作中,
- 您可能仍需要安装额外的第三方应用程序。 FreeBSD
- 提供了两种安装第三方应用程序的方法: FreeBSD Ports Collection 和二进制软件包
- (package)。 无论用哪种方式, 您都可以从本地媒体 (设备)
- 或直接通过网络来安装您喜欢的最新版本的应用程序。</para>
+ <para>FreeBSD 将许多系统工具捆绑作为基本系统的一部分。 然而,
+ 要完成实际的工作, 可能还需要安装更多的第三方应用。 FreeBSD 提供了两种补充的技术,
+ 用以在您的系统中安装第三方软件: FreeBSD Ports 套件 (用于从源代码安装),
+ 以及 packages (用以从预编译的二进制版本安装)。
+ 这两种方法都可以用于从本地介质, 或从网上直接安装您喜欢的应用程序的最新版本。</para>
<para>读完这章,您将了解到:</para>
@@ -27,7 +27,7 @@
<para>如何安装第三方的二进制软件包。</para>
</listitem>
<listitem>
- <para>如何从Ports Collection安装第三方软件。</para>
+ <para>如何使用 ports 套件从源代码构建第三方软件。</para>
</listitem>
<listitem>
<para>如何删除先前安装的软件包。</para>
@@ -39,7 +39,7 @@
<para>如何找到您需要的软件包。</para>
</listitem>
<listitem>
- <para>如何升级您的ports。</para>
+ <para>如何升级您的应用软件。</para>
</listitem>
</itemizedlist>
</sect1>
@@ -467,7 +467,9 @@ docbook =
<sect1 id="ports-using">
<title>使用Ports Collection</title>
- <para>下面的章节提供了使用Ports Collection来安装或卸载程序的基本用法。</para>
+ <para>下面的几个小节中, 给出了关于如何使用
+ Ports 套件来在您的系统中安装或卸载程序的介绍。 关于可用的 <command>make</command>
+ targets 以及环境变量的介绍, 可以在 &man.ports.7; 中找到。</para>
<sect2 id="ports-tree">
<title>获得Ports Collection</title>
@@ -482,62 +484,12 @@ docbook =
那您可以用下面的指令来安装 Ports Collection:</para>
<procedure>
- <title>Sysinstall 方式</title>
-
- <para>这种方式使用 <application>sysinstall</application>
- 再次手动安装Ports Collection。</para>
-
- <step>
- <para>以 <username>root</username> 用户身份, 运行
- <command>sysinstall</command>
- (对于 &os; 5.2 之前的版本, 应该是
- <command>/stand/sysinstall</command>), 如下所示:</para>
-
- <screen>&prompt.root; <userinput>sysinstall</userinput></screen>
- </step>
-
- <step>
- <para>选择 <guimenuitem>Configure</guimenuitem>, 按 <keycap>Enter</keycap>。</para>
- </step>
-
- <step>
- <para>选择 <guimenuitem>Distributions</guimenuitem>, 按 <keycap>Enter</keycap>。</para>
- </step>
-
- <step>
- <para>选择 <guimenuitem>ports</guimenuitem>, 按 <keycap>Space</keycap>。</para>
- </step>
-
- <step>
- <para>选择 <guimenuitem>Exit</guimenuitem>, 按 <keycap>Enter</keycap>。</para>
- </step>
-
- <step>
- <para>选择您的安装介质,就像CDROM,FTP,等等</para>
- </step>
-
- <step>
- <para>选择 <guimenuitem>Exit</guimenuitem> 并按 <keycap>Enter</keycap>。</para>
- </step>
-
- <step>
- <para>按 <keycap>X</keycap> 键退出 <application>sysinstall</application>。</para>
- </step>
- </procedure>
-
- <para>您可以使用 <application>CVSup</application>,这个程序让您获得和更新
- Ports Collection。 <application>CVSup</application> 需要使用
- <filename>/usr/share/examples/cvsup/ports-supfile</filename> 这个配置文件。
- 如果您想获得关于 <application>CVSup</application> 这个应用程序的更多信息,
- 请看 <link linkend="cvsup">使用 CVSup</link> (<xref linkend="cvsup">) 和本文。</para>
-
- <procedure>
<title>CVSup 方法</title>
- <para>使用 <application>CVSup</application> 获得 Ports Collection,
- 是一个非常快捷的方法。 如果您想保持您的 ports 树的最新状态,
- 或了解更多关于 <application>CVSup</application>
- 的内容, 您可以阅读刚才提及的内容。</para>
+ <para>保持您本地 Ports 套件最新的一种快捷的方法,
+ 是使用 <application>CVSup</application> 来进行更新。
+ 如果您希望了解更多关于 <application>CVSup</application> 的细节, 请参见
+ <link linkend="cvsup">使用 CVSup</link>。</para>
<step>
<para>安装 <filename
@@ -603,6 +555,104 @@ docbook =
不过这一过程并不重新联编您系统上的 ports。</para>
</step>
</procedure>
+
+ <procedure>
+ <title>Portsnap 方式</title>
+
+ <para>&man.portsnap.8; 是另一种用于发布
+ Ports 套件的方法。 它最早从 &os;&nbsp;6.0 开始引入。
+ 在较早的系统中, 您可以通过 <filename
+ role="package">sysutils/portsnap</filename> port 来安装它:</para>
+
+ <screen>&prompt.root; <userinput>pkg_add -r portsnap</userinput></screen>
+
+ <para>请参见 <link linkend="portsnap">使用 Portsnap</link>
+ 以了解关于全部 <application>Portsnap</application>
+ 功能的详细描述。</para>
+
+ <step>
+ <para>如果没有的话, 建立一个空的 <filename
+ role="directory">/usr/ports</filename> 目录。</para>
+
+ <screen>&prompt.root; <userinput>mkdir /usr/ports</userinput></screen>
+ </step>
+
+ <step>
+ <para>下载压缩的 Ports 套件快照到
+ <filename role="directory">/var/db/portsnap</filename>。
+ 您可以根据需要在这之后关闭 Internet 连接。</para>
+
+ <screen>&prompt.root; <userinput>portsnap fetch</userinput></screen>
+ </step>
+
+ <step>
+ <para>假如您是首次运行 <application>Portsnap</application>,
+ 则需要将快照释放到 <filename
+ role="directory">/usr/ports</filename>:
+ </para>
+
+ <screen>&prompt.root; <userinput>portsnap extract</userinput></screen>
+
+ <para>如果您已经有装好的 <filename
+ role="directory">/usr/ports</filename> 而您只想更新,
+ 则应执行下面的命令:</para>
+
+ <screen>&prompt.root; <userinput>portsnap update</userinput></screen>
+ </step>
+
+ </procedure>
+
+ <procedure>
+ <title>Sysinstall 方式</title>
+
+ <para>这种方法需要使用 <application>sysinstall</application>
+ 从安装介质上安装 Ports 套件。 注意, 安装的将是发布发行版时的旧版 Ports
+ 套件。 如果您能访问 Internet, 应使用前面介绍的方法之一。</para>
+
+ <step>
+ <para>以 <username>root</username> 身份运行
+ <command>sysinstall</command>
+ (对 &os; 5.2 之前的版本, 应执行 <command>/stand/sysinstall</command>):</para>
+
+ <screen>&prompt.root; <userinput>sysinstall</userinput></screen>
+ </step>
+
+ <step>
+ <para>用光标向下选择 <guimenuitem>Configure</guimenuitem>,
+ 并按 <keycap>Enter</keycap>。</para>
+ </step>
+
+ <step>
+ <para>向下并选择
+ <guimenuitem>Distributions</guimenuitem>, 按
+ <keycap>Enter</keycap>。</para>
+ </step>
+
+ <step>
+ <para>选择 <guimenuitem>ports</guimenuitem>, 并按
+ <keycap>Space</keycap>。</para>
+ </step>
+
+ <step>
+ <para>选择 <guimenuitem>Exit</guimenuitem>, 并按
+ <keycap>Enter</keycap>。</para>
+ </step>
+
+ <step>
+ <para>选择所希望的安装介质, 例如 CDROM、
+ FTP, 等等。</para>
+ </step>
+
+ <step>
+ <para>选择 <guimenuitem>Exit</guimenuitem> 并按
+ <keycap>Enter</keycap>。</para>
+ </step>
+
+ <step>
+ <para>按 <keycap>X</keycap> 退出
+ <application>sysinstall</application>。</para>
+ </step>
+ </procedure>
</sect2>
<sect2 id="ports-skeleton">
@@ -692,25 +742,12 @@ docbook =
欲了解进一步的情况,请参阅 &man.portaudit.1; 和 &man.periodic.8;。</para>
</warning>
- <sect3 id="ports-cd">
- <title>从光盘安装 Ports</title>
-
- <indexterm>
- <primary>ports</primary>
- <secondary>从 CD-ROM 安装</secondary>
- </indexterm>
- <para>FreeBSD 项目发行的官方光盘文件不再包含 distfiles。
- 他们提供了许多更多的更好的使用编译好的软件包。
- 如果您从 <ulink
- url="http://www.freebsdmall.com/">FreeBSD Mall</ulink> 购买了像
- FreeBSD PowerPak 这样的光盘产品, 里面就包含了distfiles。
- 下面的章节假设您已经有了一张FreeBSD的安装光盘。
- </para>
+ <para>Ports 套件假定您有可用的
+ Internet 连接。 如果您没有, 则需要将
+ distfile 手工放到 <filename>/usr/ports/distfiles</filename>
+ 中。</para>
- <para>将 FreeBSD CD-ROM 放进驱动器。 将其挂接到
- <filename>/cdrom</filename>。 (如果您使用了与此不同的挂接点,
- 请设置 <makevar>CD_MOUNTPTS</makevar> make 变量)。
- 首先, 进入要安装的 port 所在的目录:</para>
+ <para>要开始操作, 首先进入要安装 port 的目录:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/sysutils/lsof</userinput></screen>
@@ -721,7 +758,7 @@ docbook =
<screen>&prompt.root; <userinput>make</userinput>
&gt;&gt; lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
-&gt;&gt; Attempting to fetch from file:/cdrom/ports/distfiles/.
+&gt;&gt; Attempting to fetch from ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/.
===&gt; Extracting for lsof-4.57
...
[extraction output snipped]
@@ -761,10 +798,20 @@ docbook =
因此显示了一个安全警告。 在编译和安装 ports 的时候,
您应该留意任何出现的警告。</para>
+ <para>删除工作目录是个好主意,
+ 这个目录中包含了全部在编译过程中用到的临时文件。
+ 这些文件不仅会占用宝贵的磁盘空间, 而且可能会给升级新版本的 port
+ 时带来麻烦。</para>
+
+ <screen>&prompt.root; <userinput>make clean</userinput>
+===&gt; Cleaning for lsof-4.57
+&prompt.root;</screen>
+
<note>
- <para>您可以运行一个命令 <command>make
- install</command> 来替换 <command>make</command> 和
- <command>make install</command>这两个分离的步骤。</para>
+ <para>使用 <command>make
+ install clean</command> 可以代替 <command>make</command>、
+ <command>make install</command> 和 <command>make clean</command>
+ 这三个分开的步骤。</para>
</note>
<note>
@@ -775,67 +822,25 @@ docbook =
命令, 然后才能运行新安装的那些命令。
这个命令可以在类似
<command>tcsh</command> 的 shell 中使用。 对于类似
- <command>sh</command> 或 <filename
- role="package">shells/bash</filename> 的 shell,
+ <command>sh</command> 的 shell,
对应的命令是 <command>hash -r</command>。
请参见您的 shell 的文档以了解进一步的情况。</para>
</note>
- <note>
- <para>有一小部分的 port 由于许可协议的问题不允许包含在光盘内。
- 可能是因为在下载前需要注册一些信息或不允许再发布, 或者其他理由。
- 如果您想安装的 port 不在光盘中, 为此您将需要在线操作来安装
- (请看 <link linkend="ports-inet">下一章节</link>)。</para>
- </note>
- </sect3>
-
- <sect3 id="ports-inet">
- <title>从互联网安装Port</title>
-
- <para>作为最后一节, 本节假定您有一个可用的互联网连接。 如果您没有,
- 您需要察看上一章节<link linkend="ports-cd">从光盘安装</link>,
- 或者手工将 distfile 放到 <filename>/usr/ports/distfiles</filename>
- </para>
-
- <para>实际上从互联网安装 port 和从光盘安装差不多,
- 不同的是从互联网下载distfile,而不是从光盘读取。</para>
-
- <para>相关步骤是一样的:</para>
+ <para>某些第三方 DVD-ROM 产品, 如 <ulink url="http://www.freebsdmall.com/">FreeBSD
+ Mall</ulink> 的 FreeBSD Toolkit 中包含了 distfiles。
+ 这些文件可以与 Ports 套件配合使用。
+ 将 DVD-ROM 挂接到 <filename>/cdrom</filename>。
+ 如果您使用不同的挂接点, 则应设置 make 变量 <makevar>CD_MOUNTPTS</makevar>。
+ 如果盘上有需要的 distfiles, 则会自动使用。</para>
- <screen>&prompt.root; <userinput>make install</userinput>
-&gt;&gt; lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
-&gt;&gt; Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
-Receiving lsof_4.57D.freebsd.tar.gz (439860 bytes): 100%
-439860 bytes transferred in 18.0 seconds (23.90 kBps)
-===&gt; Extracting for lsof-4.57
-...
-[extraction output snipped]
-...
-&gt;&gt; Checksum OK for lsof_4.57D.freebsd.tar.gz.
-===&gt; Patching for lsof-4.57
-===&gt; Applying FreeBSD patches for lsof-4.57
-===&gt; Configuring for lsof-4.57
-...
-[configure output snipped]
-...
-===&gt; Building for lsof-4.57
-...
-[compilation output snipped]
-...
-===&gt; Installing for lsof-4.57
-...
-[installation output snipped]
-...
-===&gt; Generating temporary packing list
-===&gt; Compressing manual pages for lsof-4.57
-===&gt; Registering installation for lsof-4.57
-===&gt; SECURITY NOTE:
- This port has installed the following binaries which execute with
- increased privileges.
-&prompt.root;</screen>
-
- <para>就像您看到的, 唯一区别是有一行告知您系统正在从哪里获得 port 的
- distfile 的信息。</para>
+ <note>
+ <para>请注意, 少数 ports 并不允许通过 CD-ROM 发行。
+ 这可能是由于下载之前需要填写注册表格,
+ 或者不允许再次发布, 或者有一些其它原因。
+ 如果您希望安装在 CD-ROM 上没有的 port,
+ 就需要在线操作了。</para>
+ </note>
<para>ports 系统使用 &man.fetch.1; 去下载文件, 它有很多可以设置的环境变量,
其中包括 <envar>FTP_PASSIVE_MODE</envar>、 <envar>FTP_PROXY</envar>,
@@ -877,17 +882,16 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
role="package">security/gpgme</filename>、 以及 <filename
role="package">mail/sylpheed-claws</filename>。
如果存在这样的选项, 通常会在编译时给出提示。</para></note>
- </sect3>
<sect3>
<title>改变默认的 Ports 目录</title>
- <para>一些时候使用不同的 distfiles 和 ports 目录可能很有用
+ <para>有时, 使用不同的工作临时目录和目标目录可能很有用
(甚至是必要的)。 可以用
- <makevar>PORTSDIR</makevar> 和 <makevar>PREFIX</makevar>
- 来改变默认的目录。 例如:</para>
+ <makevar>WRKDIRPREFIX</makevar> 和 <makevar>PREFIX</makevar>
+ 这两个变量来改变默认的目录。 例如:</para>
- <screen>&prompt.root; <userinput>make PORTSDIR=/usr/home/example/ports install</userinput></screen>
+ <screen>&prompt.root; <userinput>make WRKDIRPREFIX=/usr/home/example/ports install</userinput></screen>
<para>将把编译
<filename>/usr/home/example/ports</filename> 中的 port 并把所有的文件安装到
@@ -900,7 +904,7 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
<para>当然,</para>
- <screen>&prompt.root; <userinput>make PORTSDIR=../ports PREFIX=../local install</userinput></screen>
+ <screen>&prompt.root; <userinput>make WRKDIRPREFIX=../ports PREFIX=../local install</userinput></screen>
<para>将包含两种设置 (没有办法在这一页把它写完,
但您应该已经知道怎么回事了)。</para>
@@ -931,67 +935,30 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
<primary>ports</primary>
<secondary>卸载</secondary>
</indexterm>
- <para>现在您已经知道如何安装 port, 您可能很想知道如何卸载它们,
- 例如您安装了一个之后才意识到装错了。
- 我们将卸载前面的例子中安装的那个
- (也就是 <command>lsof</command>, 如果您没有注意过的话)。
- 和安装 port 时类似, 第一件事是进入 port 的目录,
- <filename>/usr/ports/sysutils/lsof</filename>。
- 之后您就可以卸载 <command>lsof</command> 了。
- 这可以通过命令 <command>make deinstall</command> 来完成:</para>
-
- <screen>&prompt.root; <userinput>cd /usr/ports/sysutils/lsof</userinput>
-&prompt.root; <userinput>make deinstall</userinput>
-===&gt; Deinstalling for lsof-4.57</screen>
-
- <para>这个过程足够地简单。 现在已经从系统上卸载了
- <command>lsof</command>。
- 如果您想重新安装它, 可以在
- <filename>/usr/ports/sysutils/lsof</filename> 目录中运行
- <command>make reinstall</command> 来达到目的。</para>
-
- <para><command>make deinstall</command> 以及 <command>make
- reinstall</command> 在您执行过
- <command>make clean</command> 之后就不能用了。
- 如果您在清理目录之后还想删除 port,
- 可以用 <link linkend="packages-using">使用手册中的
- Package 相关章节</link> 中介绍的 &man.pkg.delete.1;
- 来完成。</para>
- </sect2>
+ <para>现在您已经了解了如何安装 ports, 并希望进一步了解如何卸载,
+ 特别是在安装了某个之后发现不合适的 port 时。
+ 我们将卸载前面例子 (假如您没有注意的话, 是
+ <command>lsof</command>) 中安装的 port。 Ports 可以同 packages
+ 以完全相同的方式 (在 <link
+ linkend="packages-using">Packages 一节</link> 中进行了介绍) 卸载, 方法是使用
+ &man.pkg.delete.1; 命令:</para>
- <sect2 id="ports-disk-space">
- <title>Ports 与磁盘空间</title>
+ <screen>&prompt.root; <userinput>pkg_delete lsof-4.57</userinput></screen>
- <indexterm>
- <primary>ports</primary>
- <secondary>磁盘空间</secondary>
- </indexterm>
- <para>使用 Ports Collection 显然会逐渐地吃掉您的磁盘空间。
- 由于 ports tree 趋于不断增大, 在构建和安装软件之后,
- 您应该通过使用 <command>make
- <makevar>clean</makevar></command>
- 来清理包含临时文件的 <filename class="directory">work</filename>
- 目录。 这一命令会删除 <filename class="directory">work</filename>,
- 因为在您构建并安装完之后它就没用了。 如果已经安装或不再需要,
- 您也可以从 <filename class="directory">distfiles</filename> 目录中删除源代码包。</para>
-
- <para>一些用户还通过把一些不需要的 port 分类放入
- <filename>refuse</filename> 文件来避免下载它们。 这样在运行
- <application>CVSup</application> 时就不会下载这些分类中的文件了。
- 关于 <filename>refuse</filename> 的详情请参考 <xref
- linkend="cvsup-refuse-file">。</para>
</sect2>
<sect2 id="ports-upgrading">
<title>升级 Ports</title>
<indexterm>
- <primary>portupgrade</primary>
- </indexterm>
- <indexterm>
<primary>ports</primary>
<secondary>升级</secondary>
</indexterm>
+ <para>首先, 使用 &man.pkg.version.1; 命令来列出 Ports Collection
+ 中提供了更新版本的那些 port:</para>
+
+ <screen>&prompt.root; <userinput>pkg_version -v</userinput></screen>
+
<note>
<para>一旦您更新了 Ports Collection, 在开始升级之前,
应该首先检查一下
@@ -999,34 +966,40 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
它描述了在升级时可能遇到的问题, 以及因应的步骤。</para>
</note>
- <para>保持 ports 最新可能是一件乏味的工作。 例如,
- 为了更新 port 您需要进入它的目录, 编译, 卸载旧的,
- 然后安装新的, 并在之后进行清理。 考虑一下对五个 port
- 做这样的升级, 很乏味是不是? 这是系统管理员需要处理的一大难题,
- 而我们现在有了一些能够帮助我们做这件事的工具。
- 例如 <filename role="package">sysutils/portupgrade</filename>
- 就能够帮助您完成所有这一切! 只需像其他 port 一样用
- <command>make <makevar>install
- clean</makevar></command> 来安装它就可以了。</para>
-
- <para>接下来需要通过 <command>pkgdb -F</command>
- 命令来创建一个数据库。 这将读取已经安装的 port 并创建一个数据库文件到
- <filename>/var/db/pkg</filename> 目录中。
- 接下来执行 <command>portupgrade
- -a</command>, 它会读取这个数据库以及 ports 的
- <filename>INDEX</filename> 文件。 最后,
- <application>portupgrade</application> 将开始下载, 编译,
- 备份, 安装并清理更新了的 ports。
- <application>portupgrade</application> 包含了许多的选项,
- 最重要的那些将在下面说明。</para>
-
- <para>如果您只想升级某个具体的应用程序而不是数据库中的记录的所有程序,
- 则使用 <command>portupgrade
- <replaceable>pkgname</replaceable></command>,
- 如果您认为 <application>portupgrade</application>
- 应该升级所有基于那个 port 的软件,
- 则需要指定 <option>-r</option>; 而如果使用
- <option>-R</option> 则它用到的所有包也会被升级。</para>
+ <sect3 id="portupgrade">
+ <title>使用 Portupgrade 来更新 Ports</title>
+
+ <indexterm>
+ <primary>portupgrade</primary>
+ </indexterm>
+
+ <para><application>portupgrade</application> 工具是设计来简化升级已安装的 port 的操作的。
+ 它通过 <filename
+ role="package">sysutils/portupgrade</filename> port 来提供。
+ 您可以像其它 port 那样, 使用 <command>make <makevar>install
+ clean</makevar></command> 命令来安装它:</para>
+
+ <screen>&prompt.root; <userinput>cd /usr/ports/sysutils/portupgrade</userinput>
+&prompt.root; <userinput>make install clean</userinput></screen>
+
+ <para>使用 <command>pkgdb
+ -F</command> 命令来扫描已安装的 port 的列表,
+ 并修正其所报告的不一致。 在每次升级之前, 有规律地执行它是个好主意。</para>
+
+ <para>运行 <command>portupgrade -a</command> 时,
+ <application>portupgrade</application> 将开始并升级系统中所安装的所有过时的 ports。
+ 如果您希望在每个升级操作时得到确认, 应指定 <option>-i</option>
+ 参数。</para>
+
+ <screen>&prompt.root; <userinput>portupgrade -ai</userinput></screen>
+
+ <para>如果您只希望升级某个特定的应用程序, 而非全部可用的 port,
+ 应使用 <command>portupgrade
+ <replaceable>pkgname</replaceable></command>。
+ 如果 <application>portupgrade</application> 应首先升级指定应用程序的话,
+ 则应指定 <option>-R</option> 参数。</para>
+
+ <screen>&prompt.root; <userinput>portupgrade -R firefox</userinput></screen>
<para>要使用预编译的 package 而不是 ports 来进行安装, 需要指定
<option>-P</option>。 如果指定了这个选项,
@@ -1037,22 +1010,83 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
<application>portupgrade</application> 将使用 ports。
要禁止使用 port, 可以指定 <option>-PP</option>。</para>
+ <screen>&prompt.root; <userinput>portupgrade -PR gnome2</userinput></screen>
+
<para>如果只想下载 distfiles (或者, 如果指定了 <option>-P</option>
的话, 是 packages) 而不想构建或安装任何东西,
可以使用 <option>-F</option>。
要了解更多细节, 请参考 &man.portupgrade.1;。</para>
+ </sect3>
+
+ <sect3 id="portmanager">
+ <title>使用 Portmanager 来升级 Ports</title>
+
+ <indexterm>
+ <primary>portmanager</primary>
+ </indexterm>
+
+ <para><application>Portmanager</application> 是另一个用以简化已安装 port
+ 升级操作的工具。 它可以通过
+ <filename role="package">sysutils/portmanager</filename> port 安装:</para>
+
+ <screen>&prompt.root; <userinput>cd <filename role="directory">/usr/ports/sysutils/portmanager</filename></userinput>
+&prompt.root; <userinput>make install clean</userinput></screen>
+
+ <para>可以通过这个简单的命令来升级所有已安装的 port:</para>
+
+ <screen>&prompt.root; <userinput>portmanager -u</userinput></screen>
+
+ <para>如果希望 <application>Portmanager</application> 在进行每步操作之前都给出提示,
+ 应使用 <option>-ui</option> 参数。 <application>Portmanager</application>
+ 也可以用来在系统中安装新的 ports。 与通常的
+ <command>make install clean</command> 命令不同,
+ 它会在联编和安装您所选择的 port 之前升级所有依赖包。</para>
+
+ <screen>&prompt.root; <userinput>portmanager <replaceable>x11/gnome2</replaceable></userinput></screen>
+
+ <para>如果关于所选 port 的依赖有任何问题,
+ 可以用 <application>Portmanager</application> 来以正确的顺序重新构建它们。
+ 完成之后, 有问题的 port 也将被重新构建。</para>
+
+ <screen>&prompt.root; <userinput>portmanager <replaceable>graphics/gimp</replaceable> -f</userinput></screen>
+
+ <para>要了解更多信息, 请参见
+ <application>Portmanager</application> 联机手册。</para>
+ </sect3>
+ </sect2>
+
+ <sect2 id="ports-disk-space">
+ <title>Ports 和磁盘空间</title>
+
+ <indexterm>
+ <primary>ports</primary>
+ <secondary>disk-space</secondary>
+ </indexterm>
+ <para>使用 Ports 套件会最终用完磁盘空间。 在通过 ports 联编和安装软件之后,
+ 您应记得清理临时的 <filename class="directory">work</filename> 目录,
+ 其方法是使用 <command>make
+ <makevar>clean</makevar></command> 命令。 您可以使用下面的命令来清理整个
+ Ports 套件:</para>
+
+ <screen>&prompt.root; <userinput>portsclean -C</userinput></screen>
+
+ <para>随着时间的推移, 您可能会在
+ <filename class="directory">distfiles</filename> 目录中积累下大量源代码文件。
+ 您可以手工删除这些文件, 也可以使用下面的命令来删除所有 port
+ 都不引用的文件:</para>
+
+ <screen>&prompt.root; <userinput>portsclean -D</userinput></screen>
<note>
- <para>规律性地更新 package 数据库非常重要。 您可以使用
- <command>pkgdb -F</command> 来修复不一致, 特别是当
- <application>portupgrade</application> 要求您这么做的时候。 当
- <application>portupgrade</application> 正在更新数据库时请不要打断它,
- 因为这将做的结果将是不一致的数据库。</para>
+ <para>这个 <command>portsclean</command> 工具是
+ <application>portupgrade</application> 套件的一部分。</para>
</note>
- <para>还有一些其他工具能够完成类似的以及其他一些任务, 请查看
- <filename>ports/sysutils</filename> 目录中是否有您需要的。</para>
+ <para>不要忘记删除那些已经安装, 但已不再使用的 ports。
+ 用于自动完成这种工作的一个好工具是
+ <filename role="package">sysutils/pkg_cutleaves</filename> port。</para>
</sect2>
+
</sect1>
<sect1 id="ports-nextsteps">
@@ -1118,24 +1152,45 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
有几件事值得尝试, 包括:</para>
<orderedlist>
- <listitem>
- <para>修好它! <ulink
- url="&url.books.porters-handbook;/index.html">Porter
- 手册</ulink> 中包括了关于
- <quote>Ports</quote> 基础设施的详细信息,
- 它们能够帮助您修好有问题的 port 甚至提交自己的 port!</para>
+ <listitem>
+ <para>在 <ulink url="&url.base;/support.html#gnats">问题报告数据库</ulink>
+ 中查找是否有尚未提交的修正。 如果有, 可以使用所提议的修正。</para>
</listitem>
<listitem>
- <para><emphasis>通过电子邮件</emphasis> &mdash; 抱怨!
- 首先发邮件给 port 的维护人员 (maintainer)。 使用
+ <para>要求 port 的监护人 (maintainer) 提供帮助。 输入
<command>make maintainer</command> 或阅读
- <filename>Makefile</filename> 都可以找到维护人员的电子邮件地址。
+ <filename>Makefile</filename> 查找监护人的电子邮件地址。
请记得把 port 的名字和版本写在邮件里
(<filename>Makefile</filename> 中的
- <literal>&dollar;FreeBSD:</literal>这一行) 并把错误输出的头几行发给 maintainer。
- 如果维护人员没有回应您的邮件, 则可以使用 &man.send-pr.1;
- 来提交问题报告。</para>
+ <literal>&dollar;FreeBSD:</literal>这一行) 并把错误输出的头几行发给 maintainer。</para>
+
+ <note>
+ <para>某些 ports 并没由个人维护, 而是写了一个 <ulink
+ url="&url.articles.mailing-list-faq;/article.html">邮件列表</ulink>。
+ 许多, 但并非所有 port, 使用类似
+ <email role="nolink">freebsd-listname@FreeBSD.org</email> 这样的地址。
+ 请在提出问题时考虑这一点。</para>
+
+ <para>特别地, 由
+ <email role="nolink">freebsd-ports@FreeBSD.org</email> 监护的 port,
+ 实际上并没有人维护。 订阅这个邮件列表的人们会感谢您提供的修正和支持。
+ 我们一直都需要更多志愿者!</para>
+ </note>
+
+ <para>如果您没有得到回应,
+ 则可以使用 &man.send-pr.1; 来提交问题报告 (请参见 <ulink
+ url="&url.articles.problem-reports;/article.html">如何撰写
+ FreeBSD 问题报告</ulink>)。</para>
+ </listitem>
+
+ <listitem>
+ <para>修正它! <ulink
+ url="&url.books.porters-handbook;/index.html">Porter
+ 手册</ulink> 中提供了关于
+ <quote>Ports</quote> 基础设施的详细信息,
+ 通过了解这些内容, 您就能修正偶然坏掉的 port,
+ 或甚至提交自己的 port 了!</para>
</listitem>
<listitem>
@@ -1144,7 +1199,9 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
role="fqdn">ftp.FreeBSD.org</hostid> 的 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/">packages
目录中</ulink>, 但 <emphasis>在此之前</emphasis>
- 一定记得先看看本地镜像上是否已经有了!
+ 一定记得先看看 <ulink
+ url="http://mirrorlist.FreeBSD.org/">本地镜像</ulink>
+ 上是否已经有了!
通常情况下这些安装包都可以直接使用,
而且应该比自行编译快一些。
安装过程本身可以通过 &man.pkg.add.1; 来完成。</para>
diff --git a/zh_CN.GB2312/books/handbook/ppp-and-slip/Makefile b/zh_CN.GB2312/books/handbook/ppp-and-slip/Makefile
index c980dc2eff..548cbb3a68 100644
--- a/zh_CN.GB2312/books/handbook/ppp-and-slip/Makefile
+++ b/zh_CN.GB2312/books/handbook/ppp-and-slip/Makefile
@@ -1,7 +1,7 @@
#
# Build the Handbook with just the content from this chapter.
#
-# Original Revision: 1.143
+# Original Revision: 1.1
# $FreeBSD$
#
diff --git a/zh_CN.GB2312/books/handbook/ppp-and-slip/chapter.sgml b/zh_CN.GB2312/books/handbook/ppp-and-slip/chapter.sgml
index 478bd3035f..4ba18867eb 100644
--- a/zh_CN.GB2312/books/handbook/ppp-and-slip/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/ppp-and-slip/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.170
+ Original Revision: 1.172
$FreeBSD$
-->
@@ -341,7 +341,7 @@
</varlistentry>
<varlistentry>
- <term>行6 和7:</term>
+ <term>行 6 &amp; 7:</term>
<indexterm><primary>PPP</primary><secondary>user PPP</secondary></indexterm>
<listitem>
@@ -403,7 +403,7 @@
</varlistentry>
<varlistentry>
- <term>行13和14:</term>
+ <term>行 13 &amp; 14:</term>
<listitem>
<para>指定用户名和密码.当使用一个&unix;风格的命令提示符登录时,这些值可以用带有\U \P参数
@@ -1457,7 +1457,7 @@ reinput 1 {\255}
if success goto slhup
reinput 1 {\127}
if success goto slhup
-if < \%x 60 goto look
+if &lt; \%x 60 goto look
else goto slhup
:sllogin ; login
@@ -1478,7 +1478,7 @@ reinput 1 {\255}
if success goto slhup
reinput 1 {\127}
if success goto slhup
-if < \%x 10 goto slloop ; try 10 times to get a login prompt
+if &lt; \%x 10 goto slloop ; try 10 times to get a login prompt
else goto slhup ; hang up and start again if 10 failures
:sluid
@@ -2343,8 +2343,9 @@ water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438
<title>设置SLIP服务器</title>
<indexterm><primary>SLIP</primary><secondary>server</secondary></indexterm>
- <para>本文提供了在FreeBSD上设置SLIP服务的建议,主要是指配置您的系统使其能根据远程SLIP客户端的
- 登录自动地开启连接.</para>
+ <para>本文提供了在 FreeBSD 上设置 SLIP 服务,
+ 也就是如何配置您的系统, 使其能在远程 SLIP
+ 客户端登录时自动地开启连接的建议。</para>
<!-- Disclaimer is not necessarily relevant
<para> The author has written this document based
diff --git a/zh_CN.GB2312/books/handbook/preface/preface.sgml b/zh_CN.GB2312/books/handbook/preface/preface.sgml
index ece7d8c52d..c06514c679 100644
--- a/zh_CN.GB2312/books/handbook/preface/preface.sgml
+++ b/zh_CN.GB2312/books/handbook/preface/preface.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Chinese Documentation Project
- Original Revision: 1.29
+ Original Revision: 1.30
$FreeBSD$
-->
@@ -315,7 +315,14 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><emphasis><xref linkend="vinum-vinum">,Vinum</emphasis></term>
+ <term><emphasis><xref linkend="geom">, GEOM</emphasis></term>
+ <listitem>
+ <para>介绍了 FreeBSD 中的 GEOM 框架是什么,
+ 以及如何配置它所支持的各级 RAID。</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis><xref linkend="vinum-vinum">, Vinum</emphasis></term>
<listitem>
<para>本章描述了怎样使用逻辑卷管理器 Vinum。它提供了设备无关的逻辑磁盘和软件
RAID-0、RAID-1 以及 RAID-5。</para>
diff --git a/zh_CN.GB2312/books/handbook/printing/chapter.sgml b/zh_CN.GB2312/books/handbook/printing/chapter.sgml
index 347d0e2083..12c67ac397 100644
--- a/zh_CN.GB2312/books/handbook/printing/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/printing/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.93
+ Original Revision: 1.95
$FreeBSD$
-->
@@ -92,8 +92,9 @@
<sect1 id="printing-intro-spooler">
<title>介绍</title>
- <para>为了在FreeBSD中使用打印机,
- 您需要将伯克利行式打印机打印池系统即<application>LPD</application>
+ <para>为了在 FreeBSD 中使用打印机,
+ 您需要将伯克利行式打印机打印池系统即
+ <application>LPD</application>
打印池系统设置好。
它是FreeBSD的标准打印控制系统。 这章介绍<application>LPD</application>
打印池系统, 经常简称<application>LPD</application>,
@@ -195,8 +196,8 @@
</listitem>
<listitem>
- <para>参见<link linkend="printing-advanced">高级
- 打印机设置</link>来了解怎样打印多种
+ <para>参见 <link linkend="printing-advanced">高级打印机设置</link>
+ 来了解怎样打印多种
特殊格式的文件, 怎样打印报头页, 怎样通过网络
打印, 怎样控制打印机的访问权限, 并且学会为打印
作业记帐统计。 </para>
@@ -226,9 +227,9 @@
</itemizedlist>
<para>如果您正在设置一台通过网络协议
- 接收数据来打印而不是通过串行或者并行界面的打印机,
- 参见<link linkend="printing-advanced-network-net-if">使用
- 网络数据流界面的打印机</link>。 </para>
+ 接收数据来打印而不是通过串行或者并口的打印机,
+ 参见 <link
+ linkend="printing-advanced-network-net-if">使用网络数据流界面的打印机</link>。</para>
<para>尽管这部分叫<quote>简单打印机
设置</quote>, 但还是相当复杂的。 使打印机
@@ -262,16 +263,14 @@
<secondary>serial</secondary>
</indexterm>
<listitem>
- <para><emphasis>串行</emphasis>接口, 也叫
- RS232C, RS232D 或者 COM 口, 使用您计算机上的
- 串口来发送数据到打印机。 串行
- 接口在计算机上已经非常普遍, 而且电缆
- 也非常容易买到且容易制作。 串行
- 接口有时需要特殊的电缆, 而且可能需要
- 您去配置稍微有点儿复杂的通讯
- 选项。 大多数 PC 的串口的最高
- 传输速度只有 115200&nbsp;bps, 这使得打印
- 很大的图像需要的时间很长。 </para>
+ <para><emphasis>串行</emphasis>接口, 也叫 RS-232 或者 COM 口,
+ 使用您计算机上的串口来发送数据到打印机。
+ 串行接口在计算机上已经非常普遍,
+ 而且电缆也非常容易买到且容易制作。
+ 串行接口有时需要特殊的电缆,
+ 而且可能需要您去配置稍微有点儿复杂的通讯选项。
+ 大多数 PC 的串口的最高传输速度只有 115200&nbsp;bps,
+ 这使得打印很大的图像需要的时间很长。 </para>
</listitem>
<indexterm>
@@ -279,22 +278,19 @@
<secondary>parallel</secondary>
</indexterm>
<listitem>
- <para><emphasis>并行</emphasis>界面使用
- 计算机上的并口来发送数据到
- 打印机。 并行接口在计算机上也已经非常普遍
- 而且速度高于 RS232 串行界面。
- 电缆非常容易买到, 但很难手工
- 制作。 并行接口通常没有
- 通讯选项, 这使得
- 配置它相当简单。 </para>
+ <para><emphasis>并口</emphasis>
+ 使用计算机上的并口来发送数据到打印机。
+ 并口在计算机上也已经非常普遍,
+ 而且速度高于 RS-232 串口。 电缆非常容易买到,
+ 但很难手工制作。 并口通常没有通讯选项,
+ 这使得配置它相当简单。</para>
<indexterm>
<primary>centronics</primary>
<see>parallel printers</see>
</indexterm>
<para>并口按打印机上的接头来命名也叫做
- <quote>Centronics</quote>接口
- 。 </para>
+ <quote>Centronics</quote>接口。</para>
</listitem>
<indexterm>
@@ -302,64 +298,57 @@
<secondary>USB</secondary>
</indexterm>
<listitem>
- <para>USB 接口, 即通用串行
- 总线, 可以达到比并口和串口
- 高很多的速度。 而电缆简单又便宜。
- USB 用来打印比串口和并口
- 更有优势, 但是 &unix;
+ <para>USB 接口, 即通用串行总线,
+ 可以达到比并口和串口高很多的速度。 其电缆既简单又便宜。
+ USB 用来打印比串口和并口更有优势, 但 &unix;
系统不能很好的支持它。 避免这个问题的方法就是购买一台
- 像大多数打印机一样的即有 USB 接口又有并口的
+ 像大多数打印机一样的既有 USB 接口又有并口的
打印机。 </para>
</listitem>
</itemizedlist>
- <para>一般来说并口只提供
- 单向通讯( 计算机到打印机), 而串口
- 和 USB 则可以提供双向通讯。 新的并口( EPP and
- ECP) 和打印机
- 在使用了 IEEE1284 标准的电缆之后, 可以在FreeBSD下
- 双向通讯。 </para>
+ <para>一般来说并口只提供单向通讯
+ (计算机到打印机), 而串口和
+ USB 则可以提供双向通讯。 新的并口 (EPP 和
+ ECP) 及打印机在使用了
+ IEEE-1284 标准的电缆之后, 可以在FreeBSD下双向通讯。</para>
<indexterm><primary>PostScript</primary></indexterm>
- <para>与打印机通过并口双向通讯
- 通常由这两种方法中的一种来完成。 第一个方法是
- 使用为 FreeBSD 编写的可以通过打印机使用的语言
- 与打印机通讯的驱动程序。 这通常
- 用在喷墨打印机上, 并且可以用来报告
- 剩余墨水多少和其他状态信息。 第二种方法
- 使用在支持
+ <para>与打印机通过并口双向通讯通常由这两种方法中的一种来完成。
+ 第一个方法是使用为 FreeBSD
+ 编写的可以通过打印机使用的语言与打印机通讯的驱动程序。
+ 这通常用在喷墨打印机上,
+ 且可以用来报告剩余墨水多少和其他状态信息。
+ 第二种方法使用在支持
&postscript; 的打印机上。 </para>
- <para>&postscript; 任务
- 事实上由程序发送给打印机; 但它并不进行打印
- 而是直接将结果返回给计算机。
- &postscript; 也采取双向通讯来将打印中的问题
- 报告给计算机, 比如 &postscript; 程序中的错误
- 或者打印机卡纸。 这些信息对于用户来说也许是非常
- 有价值的。 此外, 最好的在支持
- &postscript; 的打印机上记帐的方法需要双向
- 通讯: 询问打印机打印总页数 ( 打印机
- 从出厂一共打印过多少页 ), 然后发送
- 用户的任务, 之后再次查询总打印页数。 将打印前后得到
- 的两个值相减就可以得到该用户要付多少
- 纸钱。 </para>
+ <para>&postscript; 任务事实上由程序发送给打印机;
+ 但它并不进行打印而是直接将结果返回给计算机。
+ &postscript; 也采取双向通讯来将打印中的问题报告给计算机,
+ 比如 &postscript; 程序中的错误或者打印机卡纸。
+ 这些信息对于用户来说也许是非常有价值的。 此外,
+ 最好的在支持 &postscript;
+ 的打印机上记帐的方法需要双向通讯:
+ 询问打印机打印总页数 (打印机从出厂一共打印过多少页),
+ 然后发送用户的任务, 之后再次查询总打印页数。
+ 将打印前后得到的两个值相减就可以得到该用户要付多少纸钱。</para>
</sect4>
<sect4 id="printing-parallel">
<title>并口</title>
- <para>用并口连接打印机需要用
- Centronics 电缆把打印机与计算机连接起来。
- 具体说明指导应该在打印机, 计算机的说明书上有, 或者
- 干脆两个上面都有。 </para>
+ <para>用并口连接打印机需要用 Centronics
+ 电缆把打印机与计算机连接起来。
+ 具体说明指导在打印机, 计算机的说明书上应该有,
+ 或者干脆两个上面都有。 </para>
<para>记住您用的计算机上的哪个并口。
- 第一个并口在 FreeBSD 上叫 <filename>/dev/ppc0</filename>
- ; 第二个叫 <filename>/dev/ppc1</filename>, 依此
- 类推。 打印机设备也用同样的方法命名:
- <filename>/dev/lpt0</filename> 是连接在第一个并口
- 上的打印机, 依此类推。 </para>
+ 第一个并口在 FreeBSD 上叫 <filename>/dev/ppc0</filename>;
+ 第二个叫 <filename>/dev/ppc1</filename>, 依此类推。
+ 打印机设备也用同样的方法命名:
+ <filename>/dev/lpt0</filename>
+ 是接在第一个并口上的打印机, 依此类推。</para>
</sect4>
<sect4 id="printing-serial">
@@ -409,11 +398,10 @@
<literal>波特</literal> (每秒多少比特, 有时也叫
<emphasis>波特率</emphasis>) 的传输速率。
选择7或者8个数据位; 选择不校验,
- 偶校验或者奇校验; 选择1个或2个停止位。 还要选择流量
- 控制协议: 无, XON/XOFF (也叫做
+ 偶校验或者奇校验; 选择1个或2个停止位。 还要选择流量控制协议:
+ 无, XON/XOFF (也叫做
<quote>in-band</quote> 或 <quote>软件</quote>) 流量控制。
- 记住您的软件配置中的参数也要设成上面的
- 数值。 </para>
+ 记住您的软件配置中的参数也要设成上面的数值。</para>
</sect4>
</sect3>
@@ -1008,22 +996,19 @@ showpage</programlisting>
<sect4 id="printing-naming">
<title>命名打印机</title>
- <para>第一步 ( 简单 ) 就是给打印机起一个名字。
+ <para>第一步 (简单) 就是给打印机起一个名字。
您是按功能起名字还是干脆起个古怪的名字都没有关系,
- 因为您可以给打印机设置许多的
- 别名。 </para>
+ 因为您可以给打印机设置许多的别名。 </para>
<para>在
<filename>/etc/printcap</filename> 里至少有一个打印机必须指定, 别名是
- <literal>lp</literal>. 这是默认的打印机名。
- 如果用户既没有 <envar>PRINTER</envar> 环境
- 变量, 也没有在任何
+ <literal>lp</literal>。 这是默认的打印机名。
+ 如果用户既没有 <envar>PRINTER</envar> 环境变量, 也没有在任何
<application>LPD</application> 命令的命令行中指定打印机名,
- 则 <literal>lp</literal> 将是默认
- 要使用的打印机。 </para>
+ 则 <literal>lp</literal> 将是默认要使用的打印机。</para>
<para>还有, 我们通常把最后一个别名设置成能完全描述打印机的名字,
- 包括厂家和型号。 </para>
+ 包括厂家和型号。</para>
<para>一旦您选好了名字或者一些别名, 把它们放进文件
<filename>/etc/printcap</filename> 里。
@@ -1085,10 +1070,9 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:</programlisting>
- <para>注意我们的正确格式: 第一行从
- 最左边一列开始, 而后的每一行用
- TAB 缩进一次。 一行写不下需要换行时, 在换行前打一个
- 反斜杠。 </para>
+ <para>注意我们的正确格式: 第一行从最左边一列开始,
+ 而后的每一行用 TAB 缩进一次。
+ 一行写不下需要换行时, 在换行前打一个反斜杠。 </para>
</sect4>
<sect4 id="printing-spooldir">
@@ -1154,10 +1138,8 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=/var/spool/lpd/bamboo:</programlisting>
- <para>注意打印机的名字要从
- 第1列开始, 其他记录每行都要
- 用TAB键缩进一次, 写不开需要换行在最后加上反
- 斜杠。 </para>
+ <para>注意打印机的名字要从第 1 列开始, 其他记录每行都要用
+ TAB 键缩进一次, 写不开需要换行在最后加上反斜杠。</para>
<para>如果您没用
<literal>sd</literal> 标记指定打印池目录, 打印池系统会将
@@ -3773,10 +3755,9 @@ total 337.00 154 $ 6.74</screen>
</varlistentry>
</variablelist>
- <para>这里还有一个管理命令, &man.lpc.8; ,
- 在 <link linkend="printing-lpc"> 管理
- <application>LPD</application>
- 打印池</link> 这节中描述, 用来控制打印机和它们的队列。</para>
+ <para>还有一个管理命令, &man.lpc.8;, 在 <link
+ linkend="printing-lpc">管理打印机</link> 一节中有所介绍,
+ 它可以用于控制打印机及其队列。</para>
<para> &man.lpr.1;, &man.lprm.1;, and &man.lpq.1;
这三个命令都接受 <option>-P
diff --git a/zh_CN.GB2312/books/handbook/security/chapter.sgml b/zh_CN.GB2312/books/handbook/security/chapter.sgml
index 550194d970..729f0ca862 100644
--- a/zh_CN.GB2312/books/handbook/security/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/security/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.281
+ Original Revision: 1.292
$FreeBSD$
-->
@@ -717,8 +717,6 @@
65535, 随后在防火墙中阻止低于 4000 的所有端口
(当然, 除了那些特地为 Internet 访问而开设的端口)。</para>
- <indexterm><primary>ICMP_BANDLIM</primary></indexterm>
-
<para>另一种常被称作 springboard 的攻击也是非常常见的 DoS 攻击
&mdash; 它通过使服务器产生其无法处理的响应来达到目的。
最常见的攻击就是 <emphasis>ICMP ping 广播攻击</emphasis>。
@@ -730,8 +728,10 @@
通过建立可以生成 ICMP 出错响应的包, 攻击者能够攻击服务器的网络下行资源,
并导致其上行资源耗尽。 这种类型的攻击也可以通过耗尽 mbuf
来使得使得被攻击的服务器崩溃,特别是当这些服务器无法足够快地完成
- ICPM 响应的时候。 可以通过为 &os; 内核配置称为
- <option>ICMP_BANDLIM</option> 的编译选项来使这类攻击变得不那么有效。
+ ICPM 响应的时候。 在 &os; 4.X 内核中有一个叫做
+ <option>ICMP_BANDLIM</option> 的编译选项来限制这类攻击,
+ 使其变得不再那么有效, 而较新的内核则可以通过 <application>sysctl</application>
+ 变量 <literal>net.inet.icmp.icmplim</literal> 来调整。
最后一类主要的 springboard 是针对某些
<application>inetd</application> 的内部服务, 例如
udp echo 服务进行的。 攻击者简单地伪造一个来自服务器 A 的
@@ -752,7 +752,7 @@
1600 秒才会过期。 如果内核发现路由表变得太大, 它会动态地降低
<varname>rtexpire</varname> 但以
<varname>rtminexpire</varname> 为限。 这引发了两个问题:</para>
-
+
<orderedlist>
<listitem>
<para>在访问量不大的服务器上, 内核对于突然袭击的反应不够快。</para>
@@ -2092,11 +2092,10 @@ _kerberos IN TXT EXAMPLE.ORG</programlisting></note>
<note>
<para>要让客户机能够找到
- <application>Kerberos</application> 服务, 您
- <emphasis>必须</emphasis> 已经配置了一个完整的
- <filename>/etc/krb5.conf</filename> 或最小配置的
- <filename>/etc/krb5.conf</filename> <emphasis>加上</emphasis>
- 正确配置的 DNS 服务器。</para>
+ <application>Kerberos</application> 服务, 就
+ <emphasis>必须</emphasis> 首先配置完整或最小配置的
+ <filename>/etc/krb5.conf</filename> <emphasis>并且</emphasis>
+ 正确地配置 DNS 服务器。</para>
</note>
<para>接下来需要创建 <application>Kerberos</application> 数据库。
@@ -2899,10 +2898,10 @@ Connection closed by foreign host.</screen>
options FAST_IPSEC # new IPsec (cannot define w/ IPSEC)
</screen>
- <para>请注意, 目前还不能把
- <quote>Fast IPsec</quote> 子系统同 KAME
- 的 IPsec 实现同时混用。 请参考 &man.fast.ipsec.4;
- 联机手册以了解进一步的信息。</para>
+ <para>需要注意的是, 目前还不能用
+ <quote>Fast IPsec</quote> 子系统完全替代 KAME
+ 的 IPsec 实现。 请参见联机手册 &man.fast.ipsec.4;
+ 以了解进一步的详情。</para>
</note>
@@ -3290,8 +3289,7 @@ Destination Gateway Flags Refs Use Netif Expire
<itemizedlist>
<title>小结:</title>
<listitem>
- <para>使用 <quote>pseudo-device
- gif</quote> 配置两边的内核。</para>
+ <para>在两边的内核中配置 <quote>device gif</quote>。</para>
</listitem>
<listitem>
<para>编辑网关 #1 上的 <filename>/etc/rc.conf</filename> 并将下面的行添加进去
@@ -3388,13 +3386,13 @@ options IPSEC_ESP
<para>在 FreeBSD 上可供选择的用于管理安全关联的服务程序有很多。
这篇文章将介绍其中的一种, racoon&nbsp;&mdash;。 它可以从
&os; 的 Ports collection 中的
- <filename role="package">security/racoon</filename> 安装。</para>
+ <filename role="package">security/ipsec-tools</filename> 安装。</para>
<indexterm>
<primary>racoon</primary>
</indexterm>
- <para><filename role="package">security/racoon</filename> 软件,
+ <para><application>racoon</application> 软件,
必须在两台网关机上都运行。 需要配置 VPN 另一端的 IP, 以及一个密钥
(这个密钥可以任意选择, 但两个网关上的密钥必须一致)。</para>
@@ -3675,7 +3673,7 @@ options IPSEC_ESP
</listitem>
<listitem>
<para>安装 <filename
- role="package">security/racoon</filename>。 编辑两台网关上的
+ role="package">security/ipsec-tools</filename>。 编辑两台网关上的
<filename>${PREFIX}/etc/racoon/psk.txt</filename>
并添加远程主机的 IP 和共享的密钥。 文件的权限应该是 0600。</para>
</listitem>
@@ -3777,15 +3775,19 @@ ipfw add 1 allow ipencap from W.X.Y.Z to A.B.C.D
<secondary>启用</secondary>
</indexterm>
- <para>在 &os;&nbsp;4.X 上,
- <application>sshd</application> 服务是默认启用的,
- 而在 &os;&nbsp;5.X 上则是在安装过程中由用户指定。
- 要查看它是否已被启用,
- 请检查 <filename>rc.conf</filename> 文件中的:</para>
+ <para>在 &os;&nbsp;4.X 上, <application>sshd</application>
+ 服务是默认启用的。 在 &os; 5.X 和更高版本上,
+ <application>sshd</application> 的启用是作为 &os; 安装中
+ <literal>Standard</literal> 安装过程中的一步来进行的。 要查看
+ <application>sshd</application> 是否已被启用, 请检查
+ <filename>rc.conf</filename> 文件中的:</para>
<screen>sshd_enable="YES"</screen>
- <para>将在下次启动系统时加载 <application>OpenSSH</application> 的 &man.sshd.8; 服务程序。
- 另外, 也可以简单地使用 <command>sshd</command> 来直接启动
- <application>sshd</application> 服务。</para>
+ <para>这表示在下次系统启动时加载 <application>OpenSSH</application>
+ 的服务程序 &man.sshd.8;。 此外, 也可以手动使用 &man.rc.8;
+ 脚本 <filename>/etc/rc.d/sshd</filename>
+ 来启动 <application>OpenSSH</application>:</para>
+
+ <programlisting>/etc/rc.d/sshd start</programlisting>
</sect2>
<sect2>
@@ -3921,7 +3923,7 @@ bb:48:db:f2:93:57:80:b6:aa:bc:f5:d5:ba:8f:79:17 user@host.example.com
<para>&man.ssh-agent.1; 工具能够使用加载到其中的私钥来处理验证过程。
&man.ssh-agent.1; 应被用于启动另一个应用程序。 最基本的用法是,
- 使用它来启动 shell, 而高级一些的用法则是用它来启动窗口管理器。<para>
+ 使用它来启动 shell, 而高级一些的用法则是用它来启动窗口管理器。</para>
<para>要在 shell 中使用 &man.ssh-agent.1;, 首先应把 shell
作为参数来启动它。 随后, 应通过 &man.ssh-add.1; 并输入通行字,
@@ -4289,7 +4291,7 @@ drwxr-xr-x 2 robert robert 512 Nov 10 11:54 public_html</programlisting>
<para>要开始使用 <application>Portaudit</application>,
需要首先从 Ports Collection 安装它:</para>
- <screen>&prompt.root; <userinput>cd /usr/ports/security/portaudit && make install clean</userinput></screen>
+ <screen>&prompt.root; <userinput>cd /usr/ports/security/portaudit &amp;&amp; make install clean</userinput></screen>
<para>在安装过程中,
&man.periodic.8; 的配置文件将被修改, 以便让
@@ -4297,11 +4299,10 @@ drwxr-xr-x 2 robert robert 512 Nov 10 11:54 public_html</programlisting>
一定要保证发到 <username>root</username> 帐号的每日安全审计邮件确实有人在读。
除此之外不需要进行更多的配置了。</para>
- <para>安装完成之后, 管理员必须通过运行下面的命令,
- 来更新保存在本地
- <filename role="directory">/var/db/portaudit</filename> 的数据库:</para>
+ <para>安装完成之后, 管理员可以通过下面的命令来更新数据库,
+ 并查看目前安装的软件包中所存在的已知安全漏洞:</para>
- <screen>&prompt.root; <userinput>portaudit -F</userinput></screen>
+ <screen>&prompt.root; <userinput>portaudit -Fda</userinput></screen>
<note>
<para>由于每天执行
@@ -4309,12 +4310,13 @@ drwxr-xr-x 2 robert robert 512 Nov 10 11:54 public_html</programlisting>
运行这条命令是可选的。 在这里只是作为例子给出。</para>
</note>
- <para>管理员可以使用下面的命令审计通过 Ports Collection
- 安装的第三方工具:</para>
+ <para>在任何时候, 如果希望对通过 Ports Collection
+ 安装的第三方软件工具进行审计, 管理员都可以使用下面的命令:</para>
<screen>&prompt.root; <userinput>portaudit -a</userinput></screen>
- <para>下面是一个示范的输出:</para>
+ <para>针对存在漏洞的软件包, <application>Portaudit</application>
+ 将生成类似下面的输出:</para>
<programlisting>Affected package: cups-base-1.1.22.0_1
Type of problem: cups-base -- HPGL buffer overflow vulnerability.
diff --git a/zh_CN.GB2312/books/handbook/serialcomms/chapter.sgml b/zh_CN.GB2312/books/handbook/serialcomms/chapter.sgml
index e46d84fcec..54b72d9cdd 100644
--- a/zh_CN.GB2312/books/handbook/serialcomms/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/serialcomms/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.100
+ Original Revision: 1.112
$FreeBSD$
-->
@@ -29,11 +29,11 @@
<para>阅读这章之前,您应当了解:</para>
<itemizedlist>
- <listitem><para>如何配置和安装一个新的内核。(<xref
- linkend="kernelconfig">)。</para></listitem>
- <listitem><para>理解UNIX的权限和进程(<xref linkend="basics">)。</para></listitem>
- <listitem><para>准备您打算使用的串行设备 (modem或多插口卡)
- 的技术参考手册。</para></listitem>
+ <listitem><para>如何配置和安装一个新的内核 (<xref
+ linkend="kernelconfig">)。</para></listitem>
+ <listitem><para>理解 &unix; 的权限和进程 (<xref linkend="basics">)。</para></listitem>
+ <listitem><para>准备您打算在 FreeBSD 中使用的串口设备 (modem 或多插口卡)
+ 的技术参考手册。</para></listitem>
</itemizedlist>
</sect1>
@@ -46,7 +46,7 @@
<title>术语</title>
<variablelist>
- <indexterm><primary>bits-per-second</primary></indexterm>
+ <indexterm><primary>bits-per-second</primary></indexterm>
<varlistentry>
<term>bps</term>
<listitem>
@@ -88,15 +88,16 @@
<sect2 id="serial-cables-ports">
<title>线缆和端口</title>
- <para>要连接 modem 或终端到您的 FreeBSD 系统,
- 您需要有一个串口以及连接到您串行设备所需的线缆。
- 如果您比较熟悉硬件和它要求的线缆, 则可以跳过这节。</para>
+ <para>要将 modem 或终端与您的 FreeBSD 系统相连,
+ 您的计算机需要一个串口, 以及用于连接串口设备所需的线缆。
+ 如果您比较熟悉硬件及所需要的电缆, 则可以跳过这节。</para>
<sect3 id="term-cables">
<title>线缆</title>
- <para>有好几种不同的串行线缆。 两个最普通的类型是 null-modem
- 线缆和标准RS-232线缆。 您硬件的规格说明会有详细描述。</para>
+ <para>串口线缆又许多不同的种类。 最常见的两种类型是 null-modem
+ 线缆和标准 (<quote>直联</quote>) RS-232 线缆。
+ 您的硬件说明书中会介绍应使用的线缆种类。</para>
<sect4 id="term-cables-null">
<title>Null-modem线缆</title>
@@ -104,23 +105,31 @@
<indexterm>
<primary>null-modem cable</primary>
</indexterm>
- <para>一根null-modem线缆会直接通过像 <quote>地信号</quote>
- 这样的信号,而转换其他的信号。 例如,
- <quote>数据发送</quote> 连到对端的
- <quote>数据接收</quote> 引脚上。</para>
+ <para>null-modem 电缆会直接传送某些信号, 如 <quote>Signal
+ Ground</quote> (信号地), 但对其他信号进行交换。
+ 例如, <quote>Transmitted Data</quote> (数据发送) 引脚是连到另一端
+ <quote>Received Data</quote> (数据接收) 引脚的。</para>
+
+ <para>也可以自行制作 null-modem 电缆给终端使用 (例如, 为了品质的要求)。
+ 下面的表格展示了 RS-232C
+ <link linkend="serialcomms-signal-names">信号</link>,
+ 以及 DB-25 连接器上的引脚。 注意, 标准也要求一根直通引脚 1 到引脚 1
+ 的 <emphasis>保护地 (Protective Ground)</emphasis>
+ 线, 但这通常都被省掉。 某些终端在只有引脚 2、 3 和 7 的时候,
+ 就已经能够正常使用了, 而其他一些,
+ 则需要下面例子中所展示的不同的配置。</para>
+
+ <table frame="none" pgwide="1">
+ <title>DB-25 to DB-25 Null-Modem Cable</title>
- <para>如果需要, 您可以自己做一个null-modem的线缆。
- 下面这个表列出了这个线缆 DB-25 头上的 RS-232C 信号名和引脚标号。</para>
-
- <informaltable frame="none" pgwide="1">
<tgroup cols="5">
<thead>
<row>
- <entry>信号</entry>
- <entry>引脚 #</entry>
+ <entry align="left">信号</entry>
+ <entry align="left">引脚 #</entry>
<entry></entry>
- <entry>引脚 #</entry>
- <entry>信号</entry>
+ <entry align="left">引脚 #</entry>
+ <entry align="left">信号</entry>
</row>
</thead>
@@ -174,38 +183,235 @@
</row>
<row>
+ <entry>DTR</entry>
+ <entry>20</entry>
+ <entry>连接到</entry>
+ <entry>8</entry>
+ <entry>DCD</entry>
+ </row>
+
+ <row>
+ <entry>DSR</entry>
+ <entry>6</entry>
+ <entry>连接到</entry>
+ <entry>20</entry>
+ <entry>DTR</entry>
+ </row>
+
+ <row>
<entry>DCD</entry>
<entry>8</entry>
+ <entry>连接到</entry>
+ <entry>20</entry>
+ <entry>DTR</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>这里还有两种目前比较流行的其他接线方式。</para>
+
+ <table frame="none" pgwide="1">
+ <title>DB-9 到 DB-9 Null-Modem 电缆</title>
+
+ <tgroup cols="5">
+ <thead>
+ <row>
+ <entry align="left">信号</entry>
+ <entry align="left">引脚 #</entry>
<entry></entry>
+ <entry align="left">引脚 #</entry>
+ <entry align="left">信号</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>RD</entry>
+ <entry>2</entry>
+ <entry>接到</entry>
+ <entry>3</entry>
+ <entry>TD</entry>
+ </row>
+
+ <row>
+ <entry>TD</entry>
+ <entry>3</entry>
+ <entry>接到</entry>
+ <entry>2</entry>
+ <entry>RD</entry>
+ </row>
+
+ <row>
+ <entry>DTR</entry>
+ <entry>4</entry>
+ <entry>接到</entry>
<entry>6</entry>
<entry>DSR</entry>
</row>
<row>
+ <entry>DTR</entry>
+ <entry>4</entry>
+ <entry>接到</entry>
+ <entry>1</entry>
+ <entry>DCD</entry>
+ </row>
+
+ <row>
+ <entry>SG</entry>
+ <entry>5</entry>
+ <entry>接到</entry>
+ <entry>5</entry>
+ <entry>SG</entry>
+ </row>
+
+ <row>
<entry>DSR</entry>
<entry>6</entry>
- <entry>连接到</entry>
+ <entry>接到</entry>
+ <entry>4</entry>
+ <entry>DTR</entry>
+ </row>
+
+ <row>
+ <entry>DCD</entry>
+ <entry>1</entry>
+ <entry>接到</entry>
+ <entry>4</entry>
+ <entry>DTR</entry>
+ </row>
+
+ <row>
+ <entry>RTS</entry>
+ <entry>7</entry>
+ <entry>接到</entry>
+ <entry>8</entry>
+ <entry>CTS</entry>
+ </row>
+
+ <row>
+ <entry>CTS</entry>
+ <entry>8</entry>
+ <entry>接到</entry>
+ <entry>7</entry>
+ <entry>RTS</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table frame="none" pgwide="1">
+ <title>DB-9 到 DB-25 Null-Modem 电缆</title>
+
+ <tgroup cols="5">
+ <thead>
+ <row>
+ <entry align="left">信号</entry>
+ <entry align="left">引脚 #</entry>
+ <entry></entry>
+ <entry align="left">引脚 #</entry>
+ <entry align="left">信号</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>RD</entry>
+ <entry>2</entry>
+ <entry>DB-9 到 DB-25 Null-Modem 电缆</entry>
+ <entry>2</entry>
+ <entry>TD</entry>
+ </row>
+
+ <row>
+ <entry>TD</entry>
+ <entry>3</entry>
+ <entry>接到</entry>
+ <entry>3</entry>
+ <entry>RD</entry>
+ </row>
+
+ <row>
+ <entry>DTR</entry>
+ <entry>4</entry>
+ <entry>接到</entry>
+ <entry>6</entry>
+ <entry>DSR</entry>
+ </row>
+
+ <row>
+ <entry>DTR</entry>
+ <entry>4</entry>
+ <entry>接到</entry>
+ <entry>8</entry>
+ <entry>DCD</entry>
+ </row>
+
+ <row>
+ <entry>SG</entry>
+ <entry>5</entry>
+ <entry>接到</entry>
+ <entry>7</entry>
+ <entry>SG</entry>
+ </row>
+
+ <row>
+ <entry>DSR</entry>
+ <entry>6</entry>
+ <entry>接到</entry>
<entry>20</entry>
<entry>DTR</entry>
</row>
+
+ <row>
+ <entry>DCD</entry>
+ <entry>1</entry>
+ <entry>接到</entry>
+ <entry>20</entry>
+ <entry>DTR</entry>
+ </row>
+
+ <row>
+ <entry>RTS</entry>
+ <entry>7</entry>
+ <entry>接到</entry>
+ <entry>5</entry>
+ <entry>CTS</entry>
+ </row>
+
+ <row>
+ <entry>CTS</entry>
+ <entry>8</entry>
+ <entry>接到</entry>
+ <entry>4</entry>
+ <entry>RTS</entry>
+ </row>
</tbody>
</tgroup>
- </informaltable>
+ </table>
<note>
- <para>在连接头里面连接好<quote>数据发送就绪</quote> (DSR)和
- <quote>载波检测</quote> (DCD) 两个信号,然后连接到对端的
- <quote>数据终端就绪</quote> (DTR)。</para>
+ <para>当某一段连接器上的一个引脚需要连接到对端的一对引脚时,
+ 通常是将那一对引脚使用一短线连接,
+ 而使用长线接到另一端的那个引脚。</para>
</note>
+
+ <para>上面的设计似乎更为流行。 在其他变种中 (在 <emphasis>RS-232 Made
+ Easy</emphasis> 这本书中进行了详细介绍) 则是 SG 接 SG,
+ TD 接 RD、 RTS 和
+ CTS 接 DCD、 DTR 接 DSR, 反之亦然。</para>
</sect4>
<sect4 id="term-cables-std">
<title>标准RS-232C线缆</title>
<indexterm><primary>RS-232C cables</primary></indexterm>
- <para>一个标准的串行线缆会直接通过所有的RS-232C信号。
- 这是连接一个modem到您的 FreeBSD 系统的线缆类型,
- 线缆的类型需要针对一些终端。</para>
+ <para>标准的串口电缆会直接传送所有 RS-232C 信号。
+ 也就是说, 一头的 <quote>Transmitted Data</quote> 引脚,
+ 会直接接到另一头的 <quote>Transmitted Data</quote> 引脚。
+ 这包括将调制解调器接到您的
+ FreeBSD 系统上的那种电缆, 同样也适用于某些型号的终端。</para>
</sect4>
</sect3>
@@ -218,15 +424,16 @@
<sect4 id="term-portkinds">
<title>端口的种类</title>
- <para>存在好几种端口。 在购买和做线缆之前,
- 您需要确定它是否适合您机器的终端。</para>
+ <para>有好几种串口端口。 在采购或制作线缆之前,
+ 您应确认它能够适合您的终端以及 FreeBSD 系统。</para>
- <para>绝大多数的终端有DB25端口。个人计算机, 也包括运行 FreeBSD
- 的PC机, 通常都会有 DB25 或 DB9 插口。
- 如果您的计算机有一个多插口的串口卡,
- 则可以使用RJ-12 或RJ-45端口。</para>
+ <para>绝大多数终端都提供 DB-25 端口。 个人计算机,
+ 也包括运行 FreeBSD 的 PC 机, 通常会有 DB-25 或 DB-9 口。
+ 如果您的 PC 上有多插口串口卡, 则可能有 RJ-12 或
+ RJ-45 口。</para>
- <para>请仔细看看硬件的说明, 此外您也可以通过外观了解是什么插口。</para>
+ <para>请参见您硬件的文档以了解所用接口的规格。
+ 此外, 您也可以通过观察外观来了解所用的端口。</para>
</sect4>
<sect4 id="term-portnames">
@@ -244,10 +451,13 @@
</listitem>
<listitem>
- <para>呼出端口被命名为 <filename>/dev/cuaa<replaceable>N</replaceable></filename>。
+ <para>呼出端口被命名为 <filename>/dev/cuad<replaceable>N</replaceable></filename>。
您通常不使用呼出端口作为终端, 只使用modem。
如果串行线或终端不支持载波检测数据传输,
您可以使用呼出端口。</para>
+
+ <note><para>在 &os;&nbsp;5.X 和更早版本中, 呼出端口的名字是
+ <filename>/dev/cuaa<replaceable>N</replaceable></filename>。</para></note>
</listitem>
</itemizedlist>
@@ -278,8 +488,8 @@
或使用 <command>/sbin/dmesg</command> 命令重新检测内核启动信息。
特别的,寻找以<literal>sio</literal>字符启动的信息。</para>
- <tip><para>提示:要看看带有<literal>sio</literal>字符的信息,
- 可以使用下面的命令:</para>
+ <tip><para>如果想只察看包含
+ <literal>sio</literal> 一词的消息, 可以使用下面的命令:</para>
<screen>&prompt.root; <userinput>/sbin/dmesg | grep 'sio'</userinput></screen>
</tip>
@@ -295,28 +505,22 @@ sio2: type 16550A
sio3 at 0x2e8-0x2ef irq 9 on isa
sio3: type 16550A</screen>
- <para>如果您的内核没有认出您的所有串口,您需要为您的系统定制内核。
- 更多有关配置内核的细节,可以看看第9章<xref
- linkend="kernelconfig">。</para>
+ <para>如果内核未能认出所有的串口, 可能需要通过修改
+ <filename>/boot/device.hints</filename> 文件来进行一些配置。
+ 此外, 也可以注释或完全删除掉您没有的设备。</para>
- <para>在您的内核配置文件中相关的设备行是这样的,FreeBSD&nbsp;4.X:</para>
+ <para>在 &os;&nbsp;4.X 中, 必须修改内核配置文件来达到这一目的。
+ 要了解关于配置内核的详细信息, 请参见 <xref
+ linkend="kernelconfig">。 相关的设备如下:</para>
- <programlisting>
-device sio0 at isa? port port IO_COM1 irq 4
-device sio1 at isa? port port IO_COM2 irq 3
+ <programlisting>device sio0 at isa? port IO_COM1 irq 4
+device sio1 at isa? port IO_COM2 irq 3
device sio2 at isa? port IO_COM3 irq 5
device sio3 at isa? port IO_COM4 irq 9</programlisting>
-
- <para>FreeBSD&nbsp;5.X:</para>
-
- <programlisting>device sio</programlisting>
-
- <para>您可以注释掉或完全删除您没有的设备。 FreeBSD&nbsp;5.X 需要修改
- <filename>/boot/device.hints</filename>文件。请看看 &man.sio.4;
- 的有关如何为您的多插口主板写入配置信息的联机手册。
- 如果您使用了一个不同版本的 FreeBSD 的配置文件,请小心点,
- 因为设备的标记在两个版本之间已经改变了。</para>
+ <para>请参见 &man.sio.4; 联机手册来了解关于串口,
+ 以及多插口卡配置的进一步细节。 如果您正使用一个在不同版本的
+ FreeBSD 上的文件请务必小心, 因为设备参数和语法发生了变化。</para>
<note>
<para>这里端口 <literal>IO_COM1</literal> 代替了
@@ -333,24 +537,32 @@ device sio3 at isa? port IO_COM4 irq 9</programlisting>
</sect2>
<sect2>
- <title>设备指定文件</title>
-
- <para>内核中的绝大多数设备可以通过 <quote>设备特殊文件</quote> 来访问,
- 它就在<filename>/dev</filename>目录下。
- <devicename>sio</devicename> 设备通过
- <filename>/dev/ttyd<replaceable>N</replaceable></filename> (拨入)和
- <filename>/dev/cuaa<replaceable>N</replaceable></filename> (拨出)
- 设备来访问。 FreeBSD 也提供了初始化的设备
- (<filename>/dev/ttyid<replaceable>N</replaceable></filename> 和
- <filename>/dev/cuaia<replaceable>N</replaceable></filename>) 以及锁定的设备
- (<filename>/dev/ttyld<replaceable>N</replaceable></filename> 和
+ <title>设备特殊文件</title>
+
+ <para>在内核中, 大多数设备都是通过 <quote>设备特殊文件</quote> 来访问的,
+ 这些文件一般位于 <filename>/dev</filename> 目录中。
+ <devicename>sio</devicename> 是通过
+ <filename>/dev/ttyd<replaceable>N</replaceable></filename> (呼入)
+ 和 <filename>/dev/cuad<replaceable>N</replaceable></filename>
+ (呼出) 设备来访问的。 此外, FreeBSD 也提供了初始化设备
+ (在 &os;&nbsp;6.X 上是
+ <filename>/dev/ttyd<replaceable>N</replaceable>.init</filename> 以及
+ <filename>/dev/cuad<replaceable>N</replaceable>.init</filename>,
+ 而在 &os;&nbsp;5.X 和更早版本上则是
+ <filename>/dev/ttyid<replaceable>N</replaceable></filename> 和
+ <filename>/dev/cuaia<replaceable>N</replaceable></filename>) 以及锁设备
+ (在 &os;&nbsp;6.X 上是
+ <filename>/dev/ttyd<replaceable>N</replaceable>.lock</filename> 和
+ <filename>/dev/cuad<replaceable>N</replaceable>.lock</filename>,
+ 而在 &os;&nbsp;5.X 和更早版本上则是
+ <filename>/dev/ttyld<replaceable>N</replaceable></filename> 和
<filename>/dev/cuala<replaceable>N</replaceable></filename>)。
- 初始化的设备在每次端口被打开时被用来初始化设备通讯端口参数。
- 例如使用 <literal>RTS/CTS</literal> 的流控制信号的
- <literal>crts</literal>的调制解调器。
- 锁定设备用来锁定端口的标记以阻止用户或程序改变某个参数。
- 参见 &man.termios.4;、&man.sio.4; 以及 &man.stty.1;
- 联机手册了解更多信息。</para>
+ 初始化设备用于在打开端口时初始化其通讯参数, 例如使用
+ <literal>RTS/CTS</literal> 信号进行流控制的调制解调器的
+ <literal>crtscts</literal>。 锁设备则用于在端口上提供一个锁标志,
+ 防止用户或程序改变特定的参数; 请参见 &man.termios.4;、
+ &man.sio.4;, 以及 &man.stty.1; 的联机手册, 以了解关于终端配置、
+ 锁和初始化设备, 以及配置终端参数的详细信息。</para>
<sect3>
<title>编译设备指定文件</title>
@@ -396,9 +608,10 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<title>串行端口配置</title>
<indexterm><primary><devicename>ttyd</devicename></primary></indexterm>
- <indexterm><primary><devicename>cuaa</devicename></primary></indexterm>
+ <indexterm><primary><devicename>cuad</devicename></primary></indexterm>
- <para><devicename>ttyd<replaceable>N</replaceable></devicename> (或<devicename>cuaa<replaceable>N</replaceable></devicename>)
+ <para><devicename>ttyd<replaceable>N</replaceable></devicename> (或
+ <devicename>cuad<replaceable>N</replaceable></devicename>)
设备是您将要打开的应用程序的一般设备。 当进程打开某个设备时,
它将有一个终端 I/O 设置的默认配置。 您可以在命令行看看这些设置:</para>
@@ -411,24 +624,27 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<option>CLOCAL</option> 模式,8位通讯和默认的 <option>XON/XOFF</option> 流控制,
输入:</para>
- <screen>&prompt.root; <userinput>stty -f /dev/ttyid5 clocal cs8 ixon ixoff</userinput></screen>
+ <screen>&prompt.root; <userinput>stty -f /dev/ttyd5.init clocal cs8 ixon ixoff</userinput></screen>
<indexterm>
<primary>rc files</primary>
<secondary><filename>rc.serial</filename></secondary>
</indexterm>
- <!-- XXX; /etc/rc.serial is gone in 5.1.
- How do you set default parameters for these devices in 5.X ? -->
+ <para>串口设备的系统级初始化,
+ 是由 <filename>/etc/rc.d/serial</filename> 来控制的。
+ 这个文件会影响串口设备的默认设置。</para>
- <para>串行设备的系统初始化是用<filename>/etc/rc.serial</filename>文件类控制的。
- 这个文件会影响串行设备的默认设置。</para>
+ <note>
+ <para>在 &os;&nbsp;4.X 中, 串口设备的初始化,
+ 是在 <filename>/etc/rc.serial</filename> 中控制的。</para>
+ </note>
- <para>要防止某个设置被一个应用程序所修改,需要调整 <quote>锁状态</quote>设备。
- 例如,要锁定<devicename>ttyd5</devicename> 的速度为57600&nbsp;bit/s,
- 键入:</para>
+ <para>为了防止应用程序修改某些设置,
+ 应修改 <quote>lock state</quote>(锁状态) 设备。 例如, 要把
+ <devicename>ttyd5</devicename> 的速率锁定为 57600&nbsp;bps, 输入:</para>
- <screen>&prompt.root; <userinput>stty -f /dev/ttyld5 57600</userinput></screen>
+ <screen>&prompt.root; <userinput>stty -f /dev/ttyd5.lock 57600</userinput></screen>
<para>现在,一个打开<devicename>ttyd5</devicename>
和设法改变端口速度的应用程序将被固定在57600bit/s。很自然地,
@@ -445,7 +661,7 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<sect1 id="term">
<sect1info>
<authorgroup>
- <author>
+ <author>
<firstname>Sean</firstname>
<surname>Kelly</surname>
<contrib>Contributed by </contrib>
@@ -458,8 +674,8 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<indexterm><primary>终端</primary></indexterm>
<para>当您在计算机控制台或是在一个连接的网络上时,
- 终端提供了一个方便和低成本的访问FreeBSD系统的方法。
- 这节描述了如何在FreeBSD上使用终端。</para>
+ 终端提供了一个方便和低成本的访问 FreeBSD 系统的方法。
+ 这节描述了如何在 FreeBSD 上使用终端。</para>
<sect2 id="term-uses">
<title>终端的用法和类型</title>
@@ -610,7 +826,8 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
如果您从那些端口中某一个使用终端,您不需要添加另一个记录。</para>
<example id="ex-etc-ttys">
- <title>添加终端记录到<filename>/etc/ttys</filename></title>
+ <title>在
+ <filename>/etc/ttys</filename> 中增加终端记录</title>
<para>假设我们连接两个终端给系统: 一个 Wyse-50 和一个老的运行
<application>Procomm</application> 终端软件模拟一个
@@ -733,7 +950,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
例如, 可以用<command>ps</command> 命令得到运行
<command>getty</command> 程序的列表,键入:</para>
- <screen>&prompt.root; <userinput>ps -axww|grep getty</userinput></screen>
+ <screen>&prompt.root; <userinput>ps -axww|grep getty</userinput></screen>
<para>您将看到一个终端的记录。例如,下面的显示表明一个<command>getty</command>
正在第二个串行端口 <literal>ttyd1</literal> 运行,
@@ -794,7 +1011,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
</author>
</authorgroup>
<authorgroup>
- <author>
+ <author>
<firstname>Sean</firstname>
<surname>Kelly</surname>
<contrib>Additions by </contrib>
@@ -827,57 +1044,77 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
<para>如果您使用一个外置的 modem,那您将需要适当的电缆线。
一个标准的串行线应当足够长以至普通的信号能够连接上:</para>
- <itemizedlist>
- <listitem>
- <para>Transmitted Data (<acronym>TD</acronym>)</para>
- </listitem>
+ <table frame="none" pgwide="1" id="serialcomms-signal-names">
+ <title>信号名称</title>
- <listitem>
- <para>Received Data (<acronym>RD</acronym>)</para>
- </listitem>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry align="left">缩写</entry>
+ <entry align="left">全名</entry>
+ </row>
+ </thead>
- <listitem>
- <para>Request to Send (<acronym>RTS</acronym>)</para>
- </listitem>
+ <tbody>
+ <row>
+ <entry><acronym>RD</acronym></entry>
+ <entry>收到数据 (Received Data)</entry>
+ </row>
- <listitem>
- <para>Clear to Send (<acronym>CTS</acronym>)</para>
- </listitem>
+ <row>
+ <entry><acronym>TD</acronym></entry>
+ <entry>传出数据 (Transmitted Data)</entry>
+ </row>
- <listitem>
- <para>Data Set Ready (<acronym>DSR</acronym>)</para>
- </listitem>
+ <row>
+ <entry><acronym>DTR</acronym></entry>
+ <entry>数据终端就绪 (Data Terminal Ready)</entry>
+ </row>
- <listitem>
- <para>Data Terminal Ready (<acronym>DTR</acronym>)</para>
- </listitem>
+ <row>
+ <entry><acronym>DSR</acronym></entry>
+ <entry>数据集就绪 (Data Set Ready)</entry>
+ </row>
- <listitem>
- <para>Carrier Detect (<acronym>CD</acronym>)</para>
- </listitem>
+ <row>
+ <entry><acronym>DCD</acronym></entry>
+ <entry>数据载波检测 (Data Carrier Detect) (RS-232 的收到线路信号检测器)</entry>
+ </row>
- <listitem>
- <para>Signal Ground (<acronym>SG</acronym>)</para>
- </listitem>
- </itemizedlist>
+ <row>
+ <entry><acronym>SG</acronym></entry>
+ <entry>信号地 (Signal Ground)</entry>
+ </row>
- <para>FreeBSD需要对速度超过2400bit/s的<acronym>RTS</acronym> 和
- <acronym>CTS</acronym>信号进行流控制,
- 当一个呼叫被回复或线路被挂起的时候, <acronym>CD</acronym>
- 信号就会被侦测到,一个会话完成之后,<acronym>DTR</acronym>
- 信号就会刷新modem。 一些线缆不需要任何信号就可以连接,
- 所以如果您有问题, 当线路被挂断时, 一个登录任务就会丢失,
- 您可能会在线缆上有问题。</para>
-
- <para>像其他 &unix; 类的操作系统一样, FreeBSD
- 使用硬件信号来寻找出一个呼叫什么时候会回复或一个线路会被挂起。
- FreeBSD 避免发送命令给 modem 或监视 modem 的状况。
- 如果您熟悉连接 modem 到基于 PC 的 BBS,这可能看起来有点笨拙。</para>
+ <row>
+ <entry><acronym>RTS</acronym></entry>
+ <entry>要求发送数据 (Request to Send)</entry>
+ </row>
+
+ <row>
+ <entry><acronym>CTS</acronym></entry>
+ <entry>允许对方发送数据 (Clear to Send)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>FreeBSD 对速度超过 2400&nbsp;bps 的情形需要通过 <acronym>RTS</acronym> 和
+ <acronym>CTS</acronym> 信号来完成流控制,
+ 通过 <acronym>CD</acronym> 信号来检测呼叫响应和挂机, 并通过
+ <acronym>DTR</acronym> 信号来在会话结束时对调制解调器进行复位。
+ 某些电缆在连接时没有提供全部需要的信号, 这会给您带来问题,
+ 例如在挂断时登录会话不消失, 这就有可能是电缆的问题。</para>
+
+ <para>与其它类 &unix; 操作系统类似, FreeBSD 使用硬件信号来检测呼叫响应,
+ 以及在挂断时挂断并复位调制解调器。 FreeBSD 避免发送命令给调制解调器,
+ 或监视其状态。 如果您熟悉通过调制解调器来连接基于 PC 的 BBS 系统,
+ 这可能看起来有点难用。</para>
</sect3>
</sect2>
<sect2>
- <title>串行接口的考虑</title>
+ <title>串口的考虑</title>
<para>FreeBSD支持基于 NS8250, NS16450, NS16550 和 NS16550A
的EIA RS-232C通讯接口。 8250和16450设备有单字符缓冲。
@@ -907,7 +1144,7 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
就会设法调节线速度,直到它接收到合理的字符。</para>
<indexterm>
- <primary><command>/usr/bin/login</command></primary>
+ <primary><command>/usr/bin/login</command></primary>
</indexterm>
<para>用户在键入他/她的登录名称后,
<command>getty</command>执行<filename>/usr/bin/login</filename>,
@@ -918,43 +1155,45 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
<sect2>
<title>配置文件</title>
- <para>在 <filename>/etc</filename> 目录中,有三个您将需要编辑的系统配置文件,
- 来允许拨号访问到您的 FreeBSD 系统。 第一,
- <filename>/etc/gettytab</filename> 包含了针对
- <filename>/usr/libexec/getty</filename> 守护程序的配置信息。
- 第二, 保存信息来告诉 <filename>/sbin/init</filename>
- 什么 <filename>tty</filename> 设备将有运行在它们系统上的
- <command>getty</command>进程。 最后,
- 您可以把端口初始化命令放在 <filename>/etc/rc.serial</filename>
- 脚本中。</para>
-
- <para>在 &unix; 上, 关于拨号 modem 的想法主要有两种。
- 一种是把本地接口配置成一个固定速度,
- 以至一个远程用户拨号进入时都保持一个固定速度。
- 这样配置的好处是远程用户总是可以立即看到一个系统的登录界面。
- 这种下降趋势是系统不知道一个用户真正的数据速度是多少,
- 所以像 Emacs 全屏程序将不会调节屏幕刷新来确保对比较慢的连接有比较好的回应。</para>
-
- <para>另一所学校将他们的 modem 所在的 RS-232 设置为自动适应远程用户的连接速度。
- 例如, V.32bis (14.4&nbsp;Kbps) 的连接将让 modem 所在的 RS-232 接口运行在
- 19.2&nbsp;Kbps, 而 2400&nbsp;bps 的连接则会使 modem 的 RS-232 以
- 2400&nbsp;bps 运行。 由于
- <command>getty</command> 并不知道任何一个特定的 modem 的连接速率,
- 因此 <command>getty</command> 会以初始的速率给出一个
- <prompt>login:</prompt> 消息并监视用户回应的字符。
- 如果用户看到一些乱码, 则他们应该知道连续按
- <keycode>Enter</keycode> 键直到能够看到可以识别的提示为止。
- 如果数据传输速率不匹配, <command>getty</command>
- 将把用户输入的任何信息看作 <quote>乱码</quote>,
- 并尝试下一个速度并再次给出 <prompt>login:</prompt> 提示。
- 这个过程可以令人作呕地继续下去,
- 但用户通常只需按一两次键盘就可以看到正常的提示了。
- 很明显, 这个登录过程看起来可能没有前面所介绍的
- <quote>锁定速率</quote> 方法那样脉络清晰,
- 但在低速连接上的用户应该能够从全屏幕程序中得到更好的交互响应。</para>
-
- <para>这一节将尽量给出较为公平的配置信息, 但更偏向于使用遵守连接速率的
- modem。</para>
+ <para>如果希望允许拨入您的 FreeBSD 系统, 在
+ <filename>/etc</filename> 目录中有三个系统配置文件需要您关注。 其一是
+ <filename>/etc/gettytab</filename>,
+ 其中包含用于 <filename>/usr/libexec/getty</filename> 服务的配置信息。 其二是
+ <filename>/etc/ttys</filename>, 它的作用是告诉
+ <filename>/sbin/init</filename> 哪些 <filename>tty</filename>
+ 设备上应该运行 <command>getty</command>。 最后,
+ 关于端口的初始化命令, 应放到
+ <filename>/etc/rc.d/serial</filename> 脚本中。</para>
+
+ <para>关于在 &unix; 上配置拨入调制解调器有两种主要的流派。
+ 一种是将本地计算机到调制解调器的
+ RS-232 接口配置为固定速率。 这样做的好处是,
+ 远程用户总能立即见到系统的登录提示符, 而其缺点则是,
+ 系统并不知道用户真实的数据速率是多少, 因而, 类似 Emacs
+ 这样的程序, 也就无法调整它们绘制屏幕的方式,
+ 以便为慢速连接改善响应时间。</para>
+
+ <para>另一种流派将调制解调器的 RS-232 接口速率配置为随远程用户的连接速率变化。 例如, 对
+ V.32bis (14.4&nbsp;Kbps) 连接,
+ 调制解调器会让自己的 RS-232 接口以 19.2&nbsp;Kbps 的速率运行,
+ 而 2400&nbsp;bps 连接, 则会使调制解调器的 RS-232 接口以 2400&nbsp;bps
+ 的速率运行。 由于
+ <command>getty</command> 并不能识别具体的调制解调器的连接速率反馈信息,
+ 因此, <command>getty</command> 会以初始速度给出一个
+ <prompt>login:</prompt> 提示, 并检查用户的响应字符。
+ 如果用户看到乱码, 则他们应知道此时应按下
+ <keycode>Enter</keycode> 键, 直到看到可以辨认的提示符为止。
+ 如果数据速率不匹配, 则 <command>getty</command>
+ 会将用户输入的任何信息均视为 <quote>乱码</quote>,
+ 并尝试以下一种速率来再次给出 <prompt>login:</prompt> 提示符。
+ 这一过程可能需要令人作呕地重复下去, 不过一般而言,
+ 用户只要敲一两下键盘就能看到正确的提示符了。 显然,
+ 这种登录过程看起来不如前面所介绍的
+ <quote>锁定速率</quote> 方法那样简单明了,
+ 但使用低速连接的用户, 却可以在运行全屏幕程序时得到更好的交互响应。</para>
+
+ <para>这一节将尽可能公平地介绍关于配置的信息,
+ 但更着力于介绍调制解调器速率随连接速率变化的配置方法。</para>
<sect3>
<title><filename>/etc/gettytab</filename></title>
@@ -1040,7 +1279,7 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
:nx=VH9600:tc=std.57600:</programlisting>
<para>如果您的 CPU 速度较低, 或系统的负荷很重, 而且没有
- 16550A的串行端口,您可能会在57.6 Kbit/s上得到
+ 16550A的串行端口,您可能会在57.6 Kbit/s 上得到
<errorname>sio</errorname> <quote>silo</quote>错误。</para>
</sect4>
</sect3>
@@ -1117,67 +1356,70 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
</sect3>
<sect3>
- <title><filename>/etc/rc.serial</filename></title>
+ <title><filename>/etc/rc.d/serial</filename></title>
<indexterm>
<primary>rc files</primary>
<secondary><filename>rc.serial</filename></secondary>
</indexterm>
- <para>高速modem, 像 V.32,V.32bis,和 V.34 modem,需要使用硬件
- (<filename>RTS/CTS</filename>) 流控制。 您可以在
- <filename>/etc/rc.serial</filename> 中添加
- <command>stty</command> 命令来设置硬件流控制标记。</para>
-
- <para>例如,在拨入和拨出初始设备的第一个 (<devicename>COM2</devicename>)
- 串行端口上设置termios标记crtscts, 下面这些行会被添加到
- <filename>/etc/rc.serial</filename>中:</para>
+ <para>高速调制解调器, 如使用 V.32、 V.32bis, 以及 V.34 的那些,
+ 需要使用硬件 (<literal>RTS/CTS</literal>) 流控制。
+ 您可以在
+ <filename>/etc/rc.d/serial</filename> 中增加
+ <command>stty</command> 命令来在 FreeBSD 内核中,
+ 为调制解调器设置硬件流控制标志。</para>
+
+ <para>例如, 在 1 号串口
+ (<devicename>COM2</devicename>) 拨入和拨出设备上配置 <literal>termios</literal> 标志
+ <varname>crtscts</varname>, 可以通过在
+ <filename>/etc/rc.d/serial</filename> 增加下面的设置来实现:</para>
<programlisting># Serial port initial configuration
-stty -f /dev/ttyid1 crtscts
-stty -f /dev/cuaia1 crtscts</programlisting>
-
+stty -f /dev/ttyd1.init crtscts
+stty -f /dev/cuad1.init crtscts</programlisting>
+
</sect3>
</sect2>
<sect2>
- <title>Modem设置</title>
+ <title>Modem 设置</title>
<para>如果您有一个 modem, 它的参数能被存储在非易失性的 RAM 中,
您将必须使用一个终端程序来设置参数。 使用同样的通讯速度来连接
modem 作为初始速度 <command>getty</command> 将使用和配置
- modem 的非易失性RAM来匹配这些要求:</para>
+ modem 的非易失性RAM来适应这些要求:</para>
<itemizedlist>
<listitem>
- <para><acronym>CD</acronym> asserted when connected</para>
+ <para>连接时宣告 <acronym>CD</acronym></para>
</listitem>
<listitem>
- <para><acronym>DTR</acronym> asserted for operation; dropping DTR
- hangs up line and resets modem</para>
+ <para>操作时宣告 <acronym>DTR</acronym>; DTR
+ 消失时挂断线路并复位调制解调器</para>
</listitem>
<listitem>
- <para><acronym>CTS</acronym> transmitted data flow control</para>
+ <para><acronym>CTS</acronym> 传输数据流控制</para>
</listitem>
<listitem>
- <para>Disable <acronym>XON/XOFF</acronym> flow control</para>
+ <para>禁用 <acronym>XON/XOFF</acronym> 流控制</para>
</listitem>
<listitem>
- <para><acronym>RTS</acronym> received data flow control</para>
+ <para><acronym>RTS</acronym> 接收数据流控制</para>
</listitem>
<listitem>
- <para>Quiet mode (no result codes)</para>
+ <para>宁静模式 (无返回码)</para>
</listitem>
<listitem>
- <para>No command echo</para>
+ <para>无命令回显</para>
</listitem>
</itemizedlist>
- <para>请读读您的 modem 的文档找到您需要用什么命令和 DIP 接口设置。</para>
+ <para>请阅读您 modem 的文档找到您需要用什么命令和 DIP 接口设置。</para>
<para>例如,要在一个 USRobotics Sportster 14400 的外置 modem
上设置上面的参数,可以用下面这些命令:</para>
@@ -1403,32 +1645,28 @@ AT&amp;B2&amp;W</programlisting>
<title>我如何输入这些 AT 命令?</title>
<indexterm>
- <primary><filename>/etc/remote</filename></primary>
+ <primary><filename>/etc/remote</filename></primary>
</indexterm>
- <para>在 <filename>/etc/remote</filename> 文件中编译一个叫做
- <quote>direct</quote> 的记录。 例如, 如果您的 modem
- 连接在第一个串行端口, <filename>/dev/cuaa0</filename>,
- 就添加下面这行:</para>
+ <para>在
+ <filename>/etc/remote</filename> 文件中增加一个 <quote>direct</quote> 项。
+ 举例而言, 如果您的调制解调器挂在第一个串口, 即 <filename>/dev/cuad0</filename> 上,
+ 则应添加下面这行:</para>
- <programlisting>cuaa0:dv=/dev/cuaa0:br#19200:pa=none</programlisting>
+ <programlisting>cuad0:dv=/dev/cuad0:br#19200:pa=none</programlisting>
- <para>使用 br 命令来启用您 modem 支持的最高传输速度。
- 然后键入 <command>tip</command> cuaa0,
- 您就可以连到您的 modem 上了。</para>
+ <para>此处应使用您的 modem 所支持的最高 br bps 速率。
+ 接下来, 输入 <command>tip cuad0</command> 就可以连到 modem 上了。</para>
- <para>如果在您的系统上没有 <filename>/dev/cuaa0</filename>,可以这样:</para>
-
- <screen>&prompt.root; <userinput>cd /dev</userinput>
-&prompt.root; <userinput>sh MAKEDEV cuaa0</userinput></screen>
-
- <para>或以 <username>root</username> 使用 <command>cu</command>,
- 执行下面的命令:</para>
+ <para>此外, 也可以 <username>root</username> 身份执行 <command>cu</command>
+ 命令:</para>
<screen>&prompt.root; <userinput>cu -l<replaceable>line</replaceable> -s<replaceable>speed</replaceable></userinput></screen>
- <para><replaceable>line</replaceable> line是串行端口 (例如
- <filename>/dev/cuaa0</filename>), speed 是速度 (如57600)。
- 键入 <keycap>~.</keycap> 退出。</para>
+ <para><replaceable>line</replaceable> 是串口
+ (例如 <filename>/dev/cuad0</filename>) 而
+ <replaceable>speed</replaceable> 则是速率
+ (如 <literal>57600</literal>)。 当您输入完 AT
+ 之后, 按 <keycap>~.</keycap> 即可退出。</para>
</sect2>
<sect2>
@@ -1449,18 +1687,18 @@ AT&amp;B2&amp;W</programlisting>
<quote>generic</quote> 的记录。 例如:</para>
<programlisting>tip115200|Dial any phone number at 115200 bps:\
- :dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
+ :dv=/dev/cuad0:br#115200:at=hayes:pa=none:du:
tip57600|Dial any phone number at 57600 bps:\
- :dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du:</programlisting>
+ :dv=/dev/cuad0:br#57600:at=hayes:pa=none:du:</programlisting>
- <para>然后,您可以这样:</para>
+ <para>然后, 可以执行:</para>
<screen>&prompt.root; <userinput>tip -115200 5551234</userinput></screen>
<para>如果您更喜欢<command>cu</command>而不是<command>tip</command>,使用一个通用的<literal>cu</literal>记录:</para>
<programlisting>cu115200|Use cu to dial any number at 115200bps:\
- :dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:</programlisting>
+ :dv=/dev/cuad1:br#57600:at=hayes:pa=none:du:</programlisting>
<para>然后键入:</para>
@@ -1472,7 +1710,7 @@ tip57600|Dial any phone number at 57600 bps:\
<para>添加一项 <literal>tip1200</literal> 或
<literal>cu1200</literal>, 并将 bps 速率换成更合适的值。
- <command>tip</command> 的默认值是1200 &nbsp;bps, 也就是为什么会有
+ <command>tip</command> 的默认值是1200 &nbsp;bps, 也就是为什么会有
<literal>tip1200</literal> 这条记录的原因。
虽然您并不需要使用 1200&nbsp;bps。</para>
</sect2>
@@ -1490,8 +1728,8 @@ tip57600|Dial any phone number at 57600 bps:\
muffin|muffin.deep13.com|Frank's machine:\
:cm=CONNECT muffin\n:tc=deep13:
deep13:Gizmonics Institute terminal server:\
- :dv=/dev/cuaa2:br#38400:at=hayes:du:pa=none:pn=5551234:</programlisting>
-
+ :dv=/dev/cuad2:br#38400:at=hayes:du:pa=none:pn=5551234:</programlisting>
+
<para>将让您键入 <command>tip pain</command> 或 <command>tip
muffin</command> 连接到主机pain或muffin, 和 <command>tip
deep13</command> 连接到终端服务器。</para>
@@ -1508,8 +1746,8 @@ deep13:Gizmonics Institute terminal server:\
<programlisting>big-university:\
:pn=\@:tc=dialout
dialout:\
- :dv=/dev/cuaa3:br#9600:at=courier:du:pa=none:</programlisting>
-
+ :dv=/dev/cuad3:br#9600:at=courier:du:pa=none:</programlisting>
+
<para>接着, 在 <filename>/etc/phones</filename>
中列出大学的电话号码:</para>
@@ -1517,7 +1755,7 @@ dialout:\
big-university 5551112
big-university 5551113
big-university 5551114</programlisting>
-
+
<para><command>tip</command> 将按顺序试用每一个,然后就停止。
如果想继续测试, 隔一段时间再运行 <command>tip</command>。</para>
</sect2>
@@ -1525,7 +1763,7 @@ big-university 5551114</programlisting>
<sect2>
<title>为什么我必须键入
<keycombo action="simul">
- <keycap>Ctrl</keycap>
+ <keycap>Ctrl</keycap>
<keycap>P</keycap>
</keycombo>
两次才能发出
@@ -1588,7 +1826,7 @@ big-university 5551114</programlisting>
<programlisting>force=^^
raisechar=^^</programlisting>
- <para>The ^^ is
+ <para>The ^^ is
<keycombo action="simul">
<keycap>Shift</keycap><keycap>Ctrl</keycap><keycap>6</keycap>
</keycombo>.</para>
@@ -1608,13 +1846,13 @@ raisechar=^^</programlisting>
<arg choice="plain">local-file</arg>
<arg choice="opt">remote-file</arg>
</cmdsynopsis>
-
+
<cmdsynopsis>
<command>~t</command>
<arg choice="plain">remote-file</arg>
<arg choice="opt">local-file</arg>
</cmdsynopsis>
-
+
<para>由于没有错误校验, 所以您需要使用其他协议, 如 zmodem。</para>
</sect2>
@@ -1632,7 +1870,7 @@ raisechar=^^</programlisting>
<sect1 id="serialconsole-setup">
<sect1info>
<authorgroup>
- <author>
+ <author>
<firstname>Kazutaka</firstname>
<surname>YOKOTA</surname>
<contrib>Contributed by </contrib>
@@ -1664,10 +1902,10 @@ raisechar=^^</programlisting>
<para>为了设置串行控制台, 您必须配置启动代码块, 启动引导器代码和内核。</para>
</sect2>
-
+
<sect2 id="serialconsole-howto-fast">
<title>串行控制台的配置, 简明版</title>
-
+
<para>这一节假定您使用默认的配置, 只希望迅速地获得关于配置串口控制台的概览。</para>
<procedure>
@@ -1726,11 +1964,12 @@ raisechar=^^</programlisting>
来避免它。 请参考您的主板的使用说明了解更多细节。</para>
<tip>
- <para>在 BIOS 中设置键盘 <quote>Not installed</quote>
- 并不意味着您不能使用键盘。 这样做只是告诉 BIOS
- 不要在机器开机检测时检测键盘以至提示您系统找不到键盘。
- 即使您设置了 <quote>Not installed</quote>,
- 只要把键盘插上去仍然可以使用。</para>
+ <para>在 BIOS 中将键盘设为 <quote>Not installed</quote> (未安装)。
+ 现在您仍然无法使用键盘。 这样做只是告诉 BIOS
+ 在启动时不要探测键盘。 您的 BIOS 不应抱怨键盘不存在。
+ 即使这一标志设置为 <quote>Not
+ installed</quote> 时, 只要把键盘插上,
+ 它就仍可使用。</para>
</tip>
<note>
@@ -1778,11 +2017,10 @@ raisechar=^^</programlisting>
<term><literal>0x20</literal></term>
<listitem>
- <para>不管下面有没有讨论, 都强制这个选项支持控制台。
- 这个标记在 FreeBSD 2.X 中取代了
- <literal>COMCONSOLE</literal>选项。
- 标记 <literal>0x20</literal> 必须和
- <option>0x10</option> 一起使用。</para>
+ <para>无论是否使用了下面将要讨论的
+ <option>-h</option> 选项, 都强制这个单元作为控制台
+ (除非使用了更高优先级的控制台)。
+ 标志 <literal>0x20</literal> 必须与 <option>0x10</option> 一起使用。</para>
</listitem>
</varlistentry>
@@ -1798,7 +2036,7 @@ raisechar=^^</programlisting>
参见 <ulink
url="&url.books.developers-handbook;/index.html">开发者手册</ulink>
以了解关于远程调试更进一步的情况。</para>
-
+
<note>
<para>在FreeBSD 4.0-CURRENT和以后的版本中,标记
<literal>0x40</literal>通常是不同的,
@@ -1891,18 +2129,18 @@ raisechar=^^</programlisting>
<screen>/boot.config: -P
Keyboard: no</screen>
-
+
<para>如果您把 <option>-P</option> 放在 <filename>/boot.config</filename>
中并指出键盘存在或不存在, 那将只出现第二行。
这些信息会被定位到串口或内部控制台, 或两者同时, 这完全取决于
<filename>/boot.config</filename> 中的选项。</para>
-
+
<informaltable frame="none" pgwide="1">
<tgroup cols="2">
<thead>
<row>
- <entry>选项</entry>
- <entry>定位信息</entry>
+ <entry align="left">选项</entry>
+ <entry align="left">送出消息的设备</entry>
</row>
</thead>
@@ -1946,7 +2184,7 @@ Keyboard: no</screen>
<para>在控制台上按 <keycode>Enter</keycode> 以外的任意键就能打断启动进程。
引导块将进入命令行模式。 您将看到:</para>
- <screen>>> FreeBSD/i386 BOOT
+ <screen>&gt;&gt; FreeBSD/i386 BOOT
Default: 0:ad(0,a)/boot/loader
boot:</screen>
@@ -1981,10 +2219,10 @@ boot:</screen>
<tgroup cols="4">
<thead>
<row>
- <entry>在/boot.config中的选项</entry>
- <entry>引导块过程中的控制台</entry>
- <entry>启动引导器过程中的控制台</entry>
- <entry>内核中的控制台</entry>
+ <entry align="left">在 /boot.config 中的选项</entry>
+ <entry align="left">引导块执行时所用的控制台</entry>
+ <entry align="left">引导加载器执行时所用的控制台</entry>
+ <entry align="left">内核所用的控制台</entry>
</row>
</thead>
@@ -2039,15 +2277,15 @@ boot:</screen>
<title>例2:您为sio0设置标记为0x30</title>
<programlisting>device sio0 at isa? port IO_COM1 flags 0x30 irq 4</programlisting>
-
+
<informaltable frame="none" pgwide="1">
<tgroup cols="4">
<thead>
<row>
- <entry>在/boot.config中的选项</entry>
- <entry>引导块过程中的控制台</entry>
- <entry>启动引导器过程中的控制台</entry>
- <entry>内核中的控制台</entry>
+ <entry align="left">在 /boot.config 中的选项</entry>
+ <entry align="left">引导块执行时所用的控制台</entry>
+ <entry align="left">引导加载器执行时所用的控制台</entry>
+ <entry align="left">内核所用的控制台</entry>
</row>
</thead>
@@ -2110,14 +2348,14 @@ boot:</screen>
中添加下面一行, 然后编译新的引导块:</para>
<programlisting>BOOT_COMCONSOLE_SPEED=19200</programlisting>
-
+
<para>参见 <xref linkend="serialconsole-com2">
以了解如何编译和安装新的引导块。</para>
<para>如果串行控制台用其他方法来配置而不是在启动时用
<option>-h</option>, 或内核使用的串行控制台与引导块使用的不同,
就必须在内核配置中加入下面这行,并重新编译内核:</para>
-
+
<programlisting>options CONSPEED=19200</programlisting>
</sect3>
@@ -2149,9 +2387,9 @@ boot:</screen>
例如, 如果要将 <devicename>sio1</devicename>
(<devicename>COM2</devicename>) 作为控制台:</para>
- <programlisting>device sio1 at isa? port port IO_COM2 flags 0x10 irq 3</programlisting>
+ <programlisting>device sio1 at isa? port IO_COM2 flags 0x10 irq 3</programlisting>
- <para>or</para>
+ <para>或</para>
<programlisting>device sio1 at isa? port port IO_COM2 flags 0x30 irq 3</programlisting>
diff --git a/zh_CN.GB2312/books/handbook/users/chapter.sgml b/zh_CN.GB2312/books/handbook/users/chapter.sgml
index e47749b099..0b6ac45c78 100644
--- a/zh_CN.GB2312/books/handbook/users/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/users/chapter.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Chinese Documentation Project
- Original Revision: 1.52
+ Original Revision: 1.54
$FreeBSD$
-->
@@ -666,11 +666,10 @@ passwd: done</screen>
<note>
<para>系统并不直接读取
<filename>/etc/login.conf</filename> 中的配置,
- 相反, 它读取数据库文件
- <filename>/etc/login.conf.db</filename>。
- 为了从 <filename>/etc/login.conf</filename> 生成
- <filename>/etc/login.conf.db</filename>,
- 需要执行下面的命令:</para>
+ 而是采用数据库文件 <filename>/etc/login.conf.db</filename>
+ 以提供更快的查找能力。 要从
+ <filename>/etc/login.conf</filename> 文件生成
+ <filename>/etc/login.conf.db</filename>, 应使用下面的命令:</para>
<screen>&prompt.root; <userinput>cap_mkdb /etc/login.conf</userinput></screen>
</note>
@@ -879,14 +878,6 @@ passwd: done</screen>
&man.cap.mkdb.1;, &man.getrlimit.2;, &man.login.conf.5;.</para>
</sect1>
- <sect1 id="users-personalizing">
- <title>个性化用户设置</title>
-
- <para>本地化是由系统管理员或用户设置的的一个环境,
- 它可以用来调整不同的语言、 字符设置、 时钟时区等等。
- 这将在 <link linkend="l10n">本地化</link> 一章做详细讨论。</para>
- </sect1>
-
<sect1 id="users-groups">
<title>组</title>
diff --git a/zh_CN.GB2312/books/handbook/x11/chapter.sgml b/zh_CN.GB2312/books/handbook/x11/chapter.sgml
index 6e01b78ffe..8d2f84bb81 100644
--- a/zh_CN.GB2312/books/handbook/x11/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/x11/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.166
+ Original Revision: 1.169
$FreeBSD$
-->
@@ -382,7 +382,7 @@
<title>配置 X11</title>
- <indexterm><primary>&xfree86;&nbsp;4.X</primary></indexterm>
+ <indexterm><primary>&xfree86; 4.X</primary></indexterm>
<indexterm><primary>&xfree86;</primary></indexterm>
<indexterm><primary>&xorg;</primary></indexterm>
<indexterm><primary>X11</primary></indexterm>
@@ -637,7 +637,7 @@ EndSection</programlisting>
<title>Type1 字体</title>
<para>X11 使用的默认字体不是很理想。
大型的字体显得参差不齐,看起来很不专业, 并且, 在
- <application>&netscape;</application> 中, 中的小字体简直难以看懂。
+ <application>&netscape;</application> 中, 小字体简直无法看清。
有好几种免费、 高质量的字体可以很方便地用在 X11 中。 例如,URW字体集合
(<filename role="package">x11-fonts/urwfonts</filename>) 就包括了高质量的
标准 type1 字体 (<trademark class="registered">Times Roman</trademark>,
@@ -1088,13 +1088,13 @@ EndSection</programlisting>
<sect3>
<title>Xaccess</title>
- <para>连接到
- <application>XDM</application> 的用来控制显示的协议
- 叫做 X 显示管理连接协议(XDMCP)。
- 这个文件是一个用来控制来自远程机器的XDMCP连接。默认的,
- 它允许任何客户端连接,但那没有用,除非
- <filename>xdm-config</filename>
- 被修改成用于侦听远程连接。</para>
+ <para>用以连接由
+ <application>XDM</application> 所控制的显示设备的协议,
+ 叫做 X 显示管理器连接协议 (XDMCP)。
+ 这个文件是一组用以控制来自远程计算机的 XDMCP 连接的规则。
+ 除非您修改 <filename>xdm-config</filename>
+ 使其接受远程连接, 否则其内容将被忽略。 默认情况下,
+ 它不允许来自任何客户端的连接。</para>
</sect3>
<sect3>
@@ -1241,7 +1241,8 @@ DisplayManager.requestPort: 0</screen>
<para>从源代码编译<application>GNOME</application>,可以使用
ports树:</para>
- <screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome2</userinput> &prompt.root; <userinput>make install clean</userinput></screen>
+ <screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome2</userinput>
+&prompt.root; <userinput>make install clean</userinput></screen>
<para>一旦装好了 <application>GNOME</application>,
就必须告诉 X server 启动
@@ -1254,7 +1255,7 @@ DisplayManager.requestPort: 0</screen>
<application>GDM</application> (但默认是禁用的), 可以通过在
<filename>/etc/rc.conf</filename> 中加入
<literal>gdm_enable="YES"</literal> 来启用。 这样在重新启动的时候,
- <application>GNOME</application> 就会在登录时自动启动 -
+ <application>GNOME</application> 就会在登录时自动启动 &mdash;
除此之外不需要进一步设置了。</para>
<para><application>GNOME</application> 也可以通过适当地配置名为
@@ -1277,8 +1278,8 @@ DisplayManager.requestPort: 0</screen>
取代现有的窗口管理器:
</para></note>
- <screen>&prompt.user; <userinput>echo "#!/bin/sh" > ~/.xsession</userinput>
-&prompt.user; <userinput>echo "/usr/X11R6/bin/gnome-session" >> ~/.xsession</userinput>
+ <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
+&prompt.user; <userinput>echo "/usr/X11R6/bin/gnome-session" &gt;&gt; ~/.xsession</userinput>
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
<para>还有一种做法, 是配置显示管理器,