Makefile:	1.112 -> 1.113
advanced-networking/chapter.sgml:	1.430 -> 1.434
	      audit/chapter.sgml:	 1.34 -> 1.35
	     basics/chapter.sgml:	1.157 -> 1.158
       bibliography/chapter.sgml:	 1.88 -> 1.89
	       boot/chapter.sgml:	 1.70 -> 1.71
	     config/chapter.sgml:	1.239 -> 1.245
       cutting-edge/chapter.sgml:	1.247 -> 1.252
	    desktop/chapter.sgml:	 1.96 -> 1.98
	      disks/chapter.sgml:	1.294 -> 1.302
	 eresources/chapter.sgml:	1.201 -> 1.203
	  firewalls/chapter.sgml:	 1.92 -> 1.95
	       geom/chapter.sgml:	 1.48 -> 1.50
	    install/chapter.sgml:	1.392 -> 1.414
       introduction/chapter.sgml:	1.137 -> 1.139
	      jails/chapter.sgml:	 1.20 -> 1.21
       kernelconfig/chapter.sgml:	1.194 -> 1.195
	       l10n/chapter.sgml:	1.133 -> 1.134
	    inuxemu/chapter.sgml:	1.140 -> 1.142
	       mail/chapter.sgml:	1.138 -> 1.140
	    mirrors/chapter.sgml:	1.485 -> 1.490
	 multimedia/chapter.sgml:	1.135 -> 1.139
    network-servers/chapter.sgml:	1.122 -> 1.126
	      ports/chapter.sgml:	1.290 -> 1.291
       ppp-and-slip/chapter.sgml:	1.192 -> 1.195
	    preface/preface.sgml:	 1.46 -> 1.48
	   printing/chapter.sgml:	1.122 -> 1.123
	   security/chapter.sgml:	1.336 -> 1.337
	serialcomms/chapter.sgml:	1.133 -> 1.135
	       updating/Makefile:	    REMOVED
	   updating/chapter.sgml:	    REMOVED
	      vinum/chapter.sgml:	 1.47 -> 1.48
     virtualization/chapter.sgml:	 1.24 -> 1.25
		x11/chapter.sgml:	1.201 -> 1.205

Obtained from:	The FreeBSD Simplified Chinese Project
This commit is contained in:
Xin LI 2011-01-02 10:45:22 +00:00
parent be540db9ab
commit c2a96407d3
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=36752
34 changed files with 1225 additions and 4031 deletions

View file

@ -3,7 +3,7 @@
#
# Build the FreeBSD Handbook (Simplified Chinese).
#
# Original revision: 1.112
# Original revision: 1.113
# ------------------------------------------------------------------------
#
@ -58,6 +58,7 @@ IMAGES_EN+= install/adduser3.scr
IMAGES_EN+= install/boot-loader-menu.scr
IMAGES_EN+= install/boot-mgr.scr
IMAGES_EN+= install/config-country.scr
IMAGES_EN+= install/config-keymap.scr
IMAGES_EN+= install/console-saver1.scr
IMAGES_EN+= install/console-saver2.scr
IMAGES_EN+= install/console-saver3.scr

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
Original revision: 1.430
Original revision: 1.434
$FreeBSD$
-->
@ -631,11 +631,11 @@ route_net2="-net 192.168.1.0/24 192.168.1.1"</programlisting>
的手册里找到。</para>
<note>
<para>&os;&nbsp;7.0 开始 &man.mrouted.8;
多播路由守护进程已从基本系统中移除。 实现 <acronym>DVMRP</acronym>
多播路由协议的程序主要由 &man.pim.4; 取代。相关的
&man.map-mbone.8; 和 &man.mrinfo.8 工具也被移除了。
这些程序能在 &os; 的 Ports&nbsp;Collection
<para>多播路由服务 &man.mrouted.8; 实现了
<acronym>DVMRP</acronym> 多播路由协议,
在许多采用多播的场合,
它已被 &man.pim.4; 取代。 &man.mrouted.8; 以及相关的
&man.map-mbone.8; 和 &man.mrinfo.8 工具可以在 &os; 的 Ports&nbsp;Collection
<filename role="package">net/mrouted</filename> 中找到。</para>
</note>
</sect2>
@ -731,7 +731,7 @@ route_net2="-net 192.168.1.0/24 192.168.1.1"</programlisting>
(QoS) 协议和增强媒体访问协议来安排优先级。
对于这些协议的正确实现, 能够实现高速突发数据和流量分级。</para>
<para>从 6.0 版本开始, &os; 支持采用 802.11a, 802.11b 和 802.11g
<para>&os; 支持采用 802.11a, 802.11b 和 802.11g
的网络。 类似地, 它也支持 WPA 和 802.11i 安全协议 (与
11a、 11b 和 11g 配合) 而 WME/WMM 所需要的 QoS 和流量分级,
则在部分无线设备上提供了支持。</para>
@ -846,9 +846,9 @@ device wlan_scan_sta # 802.11 STA mode scanning</programlisting>
<para>在系统启动之后, 您会在引导时给出的信息中,
找到类似下面这样的关于无线设备的信息:</para>
<screen>ath0: &lt;Atheros 5212&gt; mem 0xff9f0000-0xff9fffff irq 17 at device 2.0 on pci2
ath0: Ethernet address: 00:11:95:d5:43:62
ath0: mac 7.9 phy 4.5 radio 5.6</screen>
<screen>ath0: &lt;Atheros 5212&gt; mem 0x88000000-0x8800ffff irq 11 at device 0.0 on cardbus1
ath0: [ITHREAD]
ath0: AR2413 mac 7.9 RF2413 phy 4.5</screen>
</sect3>
</sect2>
@ -874,7 +874,7 @@ ath0: mac 7.9 phy 4.5 radio 5.6</screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> up scan</userinput>
SSID BSSID CHAN RATE S:N INT CAPS
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
dlinkap 00:13:46:49:41:76 11 54M -90:96 100 EPS WPA WME
freebsdap 00:11:95:c3:0d:ac 1 54M -83:96 100 EPS WPA</screen>
@ -1110,7 +1110,7 @@ wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
请务必保持其他用于连接无线访问点的参数:</para>
<programlisting>wlans_ath0="wlan0"
ifconfig_wlan0="ssid <replaceable>your_ssid_here</replaceable> inet <replaceable>192.168.1.100</replaceable> netmask <replaceable>255.255.255.0</replaceable>"</programlisting>
ifconfig_wlan0="inet <replaceable>192.168.1.100</replaceable> netmask <replaceable>255.255.255.0</replaceable> ssid <replaceable>your_ssid_here</replaceable>"</programlisting>
</sect5>
</sect4>
@ -1566,8 +1566,8 @@ wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
<command>ifconfig</command> 配置:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> ssid my_net wepmode on weptxkey 3 wepkey 3:0x3456789012 \
inet <replaceable>192.168.1.100</replaceable> netmask <replaceable>255.255.255.0</replaceable></userinput></screen>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> inet <replaceable>192.168.1.100</replaceable> netmask <replaceable>255.255.255.0</replaceable> \
ssid <replaceable>my_net</replaceable> wepmode on weptxkey <replaceable>3</replaceable> wepkey <replaceable>3:0x3456789012</replaceable></userinput></screen>
<itemizedlist>
<listitem>
@ -1624,40 +1624,42 @@ Associated with 00:13:46:49:41:76</screen>
<para>在计算机 <hostid>A</hostid> 上:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> ssid <replaceable>freebsdap</replaceable> mediaopt adhoc inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable></userinput>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable> wlanmode adhoc</userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable> ssid <replaceable>freebsdap</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
ether 00:11:95:c3:0d:ac
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect &lt;adhoc&gt; (autoselect &lt;adhoc&gt;)
status: associated
ssid freebsdap channel 2 bssid 02:11:95:c3:0d:ac
authmode OPEN privacy OFF txpowmax 36 protmode CTS bintval 100</screen>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g &lt;adhoc&gt;
status: running
ssid freebsdap channel 2 (2417 Mhz 11g) bssid 02:11:95:c3:0d:ac
country US ecm authmode OPEN privacy OFF txpower 21.5 scanvalid 60
protmode CTS wme burst</screen>
<para>此处的 <literal>adhoc</literal> 参数表示无线网络接口应以 IBSS 模式运转。</para>
<para>此时, 在 <hostid>B</hostid> 上应该能够检测到
<hostid>A</hostid> 的存在了:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> up scan</userinput>
SSID BSSID CHAN RATE S:N INT CAPS
freebsdap 02:11:95:c3:0d:ac 2 54M -90:-96 100 IS</screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable> wlanmode adhoc</userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> up scan</userinput>
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
freebsdap 02:11:95:c3:0d:ac 2 54M -64:-96 100 IS WME</screen>
<para>在输出中的 <literal>I</literal> 再次确认了 <hostid>A</hostid>
机是以 ad-hoc 模式运行的。 我们只需给 <hostid>B</hostid> 配置一不同的 IP
地址:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> ssid <replaceable>freebsdap</replaceable> mediaopt adhoc inet <replaceable>192.168.0.2</replaceable> netmask <replaceable>255.255.255.0</replaceable></userinput>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> inet <replaceable>192.168.0.2</replaceable> netmask <replaceable>255.255.255.0</replaceable> ssid <replaceable>freebsdap</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
ether 00:11:95:d5:43:62
inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect &lt;adhoc&gt; (autoselect &lt;adhoc&gt;)
status: associated
ssid freebsdap channel 2 bssid 02:11:95:c3:0d:ac
authmode OPEN privacy OFF txpowmax 36 protmode CTS bintval 100</screen>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g &lt;adhoc&gt;
status: running
ssid freebsdap channel 2 (2417 Mhz 11g) bssid 02:11:95:c3:0d:ac
country US ecm authmode OPEN privacy OFF txpower 21.5 scanvalid 60
protmode CTS wme burst</screen>
<para>这样, <hostid>A</hostid> 和 <hostid>B</hostid> 就可以交换信息了。</para>
</sect2>
@ -1687,40 +1689,47 @@ Associated with 00:13:46:49:41:76</screen>
你就可以检查一下看看你的无线设备是否支持基于主机的无线访问接入模式
(通常也被称为 hostap 模式):</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable> list caps</userinput>
ath0=783ed0f&lt;WEP,TKIP,AES,AES_CCM,IBSS,HOSTAP,AHDEMO,TXPMGT,SHSLOT,SHPREAMBLE,MONITOR,TKIPMIC,WPA1,WPA2,BURST,WME&gt;</screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> list caps</userinput>
drivercaps=6f85edc1&lt;STA,FF,TURBOP,IBSS,HOSTAP,AHDEMO,TXPMGT,SHSLOT,SHPREAMBLE,MONITOR,MBSS,WPA1,WPA2,BURST,WME,WDS,BGSCAN,TXFRAG&gt;
cryptocaps=1f&lt;WEP,TKIP,AES,AES_CCM,TKIPMIC&gt;</screen>
<para>这段输出显示了网卡所支持的各种功能; 其中的关键字
<literal>HOSTAP</literal>
表示这块无线网卡能作为一个(无线)访问接入点使用。
同时也提到了各种加密算法: WEPTKIPWPA2等等,
<literal>HOSTAP</literal> 表示这块网卡可以作为无线网络接入点来使用。
此外, 这里还会给出所支持的加密算法: WEP、 TKIP、 AES 等等,
这些信息对于知道在访问接入点上使用何种安全协议非常重要。</para>
<para>现在这块无线设备在配置了正确的 SSID 和 IP
地址后进入 hostap 模式了。</para>
<para>只有创建网络伪设备时能够配置无线设备是否以 hostap 模式运行,
如果之前已经存在了相应的设备, 则需要首先将其销毁:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable> ssid <replaceable>freebsdap</replaceable> mode 11g mediaopt hostap</userinput> inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable></screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> destroy</userinput></screen>
<para>再一次用 <command>ifconfig</command> 查看一下
<devicename>ath0</devicename> 网络接口的状态:</para>
<para>接着, 在配置其它参数前, 以正确的选项重新生成设备:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable></userinput>
ath0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::211:95ff:fec3:dac%ath0 prefixlen 64 scopeid 0x4
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable> wlanmode hostap</userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable> ssid <replaceable>freebsdap</replaceable> mode 11g channel 1</userinput></screen>
<para>再次使用 <command>ifconfig</command> 检查
<devicename>wlan0</devicename> 网络接口的状态:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
ether 00:11:95:c3:0d:ac
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g &lt;hostap&gt;
status: associated
ssid freebsdap channel 1 bssid 00:11:95:c3:0d:ac
authmode OPEN privacy OFF txpowmax 38 bmiss 7 protmode CTS burst dtimperiod 1 bintval 100</screen>
status: running
ssid freebsdap channel 1 (2412 Mhz 11g) bssid 00:11:95:c3:0d:ac
country US ecm authmode OPEN privacy OFF txpower 21.5 scanvalid 60
protmode CTS wme burst dtimperiod 1 -dfs</screen>
<para><literal>hostap</literal>
参数说明这个网络接口目前正运行在基于主机的接入访问模式。</para>
<para><literal>hostap</literal> 参数指定了接口以主机接入点的方式运行。</para>
<para>也可以在 <filename>/etc/rc.conf</filename>
中加入以下这行使得网络界面的配置能够在机器启动的时候自动完成:</para>
<para>通过在 <filename>/etc/rc.conf</filename> 中加入下面的配置,
也可以在系统引导的过程中自动完成对于网络接口的配置:</para>
<programlisting>ifconfig_ath0="ssid <replaceable>freebsdap</replaceable> mode 11g mediaopt hostap inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable>"</programlisting>
<programlisting>wlans_ath0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable> ssid <replaceable>freebsdap</replaceable> mode 11g channel <replaceable>1</replaceable>"</programlisting>
</sect3>
<sect3>
@ -1733,22 +1742,24 @@ ath0=783ed0f&lt;WEP,TKIP,AES,AES_CCM,IBSS,HOSTAP,AHDEMO,TXPMGT,SHSLOT,SHPREAMBLE
<para>一旦 AP 被配置成了我们前面所展示的那样,
就可以在另外一台无线机器上初始化一次扫描来找到这个 AP</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable> up scan</userinput>
SSID BSSID CHAN RATE S:N INT CAPS
freebsdap 00:11:95:c3:0d:ac 1 54M 22:1 100 ES</screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> up scan</userinput>
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
freebsdap 00:11:95:c3:0d:ac 1 54M -66:-96 100 ES WME</screen>
<para>在客户机上能看到已经连接上了(无线)访问接入点:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable> ssid <replaceable>freebsdap</replaceable> inet <replaceable>192.168.0.2</replaceable> netmask <replaceable>255.255.255.0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable></userinput>
ath0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet6 fe80::211:95ff:fed5:4362%ath0 prefixlen 64 scopeid 0x1
inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> inet <replaceable>192.168.0.2</replaceable> netmask <replaceable>255.255.255.0</replaceable> ssid <replaceable>freebsdap</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
ether 00:11:95:d5:43:62
media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
status: associated
ssid freebsdap channel 1 bssid 00:11:95:c3:0d:ac
authmode OPEN privacy OFF txpowmax 36 protmode CTS bintval 100</screen>
ssid freebsdap channel 1 (2412 Mhz 11g) bssid 00:11:95:c3:0d:ac
country US ecm authmode OPEN privacy OFF txpower 21.5 bmiss 7
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 5 protmode CTS wme burst</screen>
</sect3>
<sect3>
@ -1782,7 +1793,7 @@ freebsdap 00:11:95:c3:0d:ac 1 54M 22:1 100 ES</screen>
<para>配置文件为
<filename>/etc/hostapd.conf</filename> file</para>
<programlisting>interface=ath0 <co id="co-ap-wpapsk-iface">
<programlisting>interface=wlan0 <co id="co-ap-wpapsk-iface">
debug=1 <co id="co-ap-wpapsk-dbug">
ctrl_interface=/var/run/hostapd <co id="co-ap-wpapsk-ciface">
ctrl_interface_group=wheel <co id="co-ap-wpapsk-cifacegrp">
@ -1857,8 +1868,8 @@ wpa_pairwise=CCMP TKIP <co id="co-ap-wpapsk-pwise"></programlisting>
<screen>&prompt.root <userinput>/etc/rc.d/hostapd forcestart</userinput></screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable></userinput>
ath0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 2290
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 2290
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::211:95ff:fec3:dac%ath0 prefixlen 64 scopeid 0x4
ether 00:11:95:c3:0d:ac
@ -1870,7 +1881,7 @@ wpa_pairwise=CCMP TKIP <co id="co-ap-wpapsk-pwise"></programlisting>
<para>现在客户端能够连接上运行的(无线)访问接入点了,
更多细节可以参阅 <xref linkend="network-wireless-wpa">。
查看有哪些客户连接上了 AP 可以运行命令
<command>ifconfig <replaceable>ath0</replaceable> list
<command>ifconfig <replaceable>wlan0</replaceable> list
sta</command>。</para>
</sect4>
</sect3>
@ -1886,8 +1897,9 @@ wpa_pairwise=CCMP TKIP <co id="co-ap-wpapsk-pwise"></programlisting>
<para>在设置了正确的 SSID 和 IP 地址后,无线设备就可以进入
hostap 模式了:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable> ssid <replaceable>freebsdap</replaceable> wepmode on weptxkey 3 wepkey 3:0x3456789012 mode 11g mediaopt hostap \
inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable></userinput></screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable> wlanmode hostap</userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> inet <replaceable>192.168.0.1</replaceable> netmask <replaceable>255.255.255.0</replaceable> \
ssid <replaceable>freebsdap</replaceable> wepmode on weptxkey <replaceable>3</replaceable> wepkey <replaceable>3:0x3456789012</replaceable> mode 11g</userinput></screen>
<itemizedlist>
<listitem>
@ -1908,22 +1920,23 @@ wpa_pairwise=CCMP TKIP <co id="co-ap-wpapsk-pwise"></programlisting>
</itemizedlist>
<para>再使用一次 <command>ifconfig</command> 命令查看
<devicename>ath0</devicename> 接口的状态:</para>
<devicename>wlan0</devicename> 接口的状态:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable></userinput>
ath0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::211:95ff:fec3:dac%ath0 prefixlen 64 scopeid 0x4
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
ether 00:11:95:c3:0d:ac
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g &lt;hostap&gt;
status: associated
ssid freebsdap channel 1 bssid 00:11:95:c3:0d:ac
authmode OPEN privacy ON deftxkey 3 wepkey 3:40-bit txpowmax 36 protmode CTS dtimperiod 1 bintval 100</screen>
status: running
ssid freebsdap channel 4 (2427 Mhz 11g) bssid 00:11:95:c3:0d:ac
country US ecm authmode OPEN privacy ON deftxkey 3 wepkey 3:40-bit
txpower 21.5 scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs</screen>
<para>现在可以从另外一台无线机器上初始化一次扫描来找到这个
AP 了:</para>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ath0</replaceable> up scan</userinput>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>ath0</replaceable></userinput>
&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> up scan</userinput>
SSID BSSID CHAN RATE S:N INT CAPS
freebsdap 00:11:95:c3:0d:ac 1 54M 22:1 100 EPS</screen>
@ -2299,7 +2312,7 @@ c2e8bc80 0 250 00:02:72:00:d4:1a 00:07:e0:00:0b:ca 3 6 OPEN</scree
现在您的个人计算机已经与远程设备结对了。
另外您也可以在远程设备上初始结点。</para>
<para>在 &os; 5.5、 6.1 以及更新版本上, 可以通过在
<para>可以通过在
<filename>/etc/rc.conf</filename> 文件中增加下面的行, 以便让
<application>hcsecd</application> 在系统启动时自动运行:</para>
@ -2375,12 +2388,12 @@ 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; 服务。
在 &os; 5.5、 6.1 和更新版本之上, 可以通过在
可以通过在
<filename>/etc/rc.conf</filename> 中加入下面的行:</para>
<programlisting>sdpd_enable="YES"</programlisting>
<para>接下来使用下面的命令来启动 <application>sdpd</application> 服务:</para>
<para>然后用下面的命令来启动 <application>sdpd</application> 服务:</para>
<screen>&prompt.root; <userinput>/etc/rc.d/sdpd start</userinput></screen>
@ -2718,43 +2731,13 @@ ifconfig_fxp1="up"</programlisting>
<title>生成树</title>
<para>网桥驱动实现了快速生成树协议 (RSTP 或 802.1w)
并与较早的生成树协议 (STP) 兼容。 生成树可以用来在网络拓扑中检测并消除环路。 RSTP
提供了比传统 STP 更快的生成树覆盖速度, 这种协议会在相邻的交换机之间交换信息,
以迅速进入转发状态, 而不会产生环路。</para>
<para>下表展示了支持的运行模式:</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="3">
<thead>
<row>
<entry>OS 版本</entry>
<entry>STP 模式</entry>
<entry>默认模式</entry>
</row>
</thead>
<tbody>
<row>
<entry>&os; 5.4&mdash;&os; 6.2</entry>
<entry>STP</entry>
<entry>STP</entry>
</row>
<row>
<entry>&os; 6.3+</entry>
<entry>RSTP 或 STP</entry>
<entry>STP</entry>
</row>
<row>
<entry>&os; 7.0+</entry>
<entry>RSTP 或 STP</entry>
<entry>RSTP</entry>
</row>
</tbody>
</tgroup>
</informaltable>
并与较早的生成树协议 (STP) 兼容。
生成树可以用来在网络拓扑中检测并消除环路。 RSTP
提供了比传统 STP 更快的生成树覆盖速度,
这种协议会在相邻的交换机之间交换信息,
以迅速进入转发状态, 并避免产生环路。
&os; 支持以 RTSP 和 STP 模式运行, 而 RTSP
是默认模式。</para>
<para>使用 <literal>stp</literal> 命令可以在成员接口上启用生成树。 对包含
<devicename>fxp0</devicename> 和
@ -3438,9 +3421,9 @@ ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP"
服务器可以回应 BOOTP 和 <acronym>DHCP</acronym>
的请求。</para>
<para><application>ISC DHCP 3.0</application>
<para><application>ISC DHCP 3.1</application>
并不属于基本系统。首先您需要安装
<filename role="package">net/isc-dhcp30-server</filename>
<filename role="package">net/isc-dhcp31-server</filename>
port 或相应的<quote>包</quote>。</para>
<para>一旦安装了 <application>ISC DHCP</application>
@ -3765,6 +3748,7 @@ options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info
export DESTDIR=/data/misc/diskless
mkdir -p ${DESTDIR}
cd /usr/src; make buildworld &amp;&amp; make buildkernel
make installworld &amp;&amp; make installkernel
cd /usr/src/etc; make distribution</programlisting>
<para>一旦完成,您可能需要定制 <filename>/etc/rc.conf</filename>
@ -3919,9 +3903,7 @@ cd /usr/src/etc; make distribution</programlisting>
<para>当前积极的支持的 ISDN 卡有 AVM B1 (ISA 和 PCI) BRI
卡和 AVM T1 PCI PRI 卡。</para>
<para>关于 <application>isdn4bsd</application> 的文档,请查看
FreeBSD 系统里的 <filename>/usr/share/examples/isdn/</filename>
目录或查看 <ulink
<para>关于 <application>isdn4bsd</application> 的文档,请查看 <ulink
url="http://www.freebsd-support.de/i4b/">isdn4bsd的主页</ulink>
那里也有提示、勘误表以及更多的文档 (如 <ulink
url="http://people.FreeBSD.org/~hm/">isdn4bsd手册</ulink>)。</para>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.34
Original Revision: 1.35
$FreeBSD$
-->
@ -499,7 +499,7 @@ trailer,133</programlisting>
最后, <literal>return</literal> 短语表示执行成功,
而 <literal>trailer</literal> 表示终结这一记录。</para>
<para>在 &os; 6.3 以及以后的版本中, <command>praudit</command>
<para><command>praudit</command>
可以选择使用 <option>-x</option> 参数来支持 XML 格式的输出。</para>
</sect2>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.157
Original Revision: 1.158
$FreeBSD$
-->
@ -1649,8 +1649,7 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<listitem>
<para>以只读方式挂接文件系统。
这和在指定了 <option>-o</option> 选项配合
<option>ro</option> (对于 &os; 5.2 之前的版本来说,
则是 <option>rdonly</option>) 参数的效果是一样的。</para>
<option>ro</option> 参数的效果是一样的。</para>
</listitem>
</varlistentry>

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Chinese Documentation Project
Original Revision: 1.88
Original Revision: 1.89
$FreeBSD$
-->
@ -605,8 +605,7 @@
<para>Simon Garfinkel, Daniel Weise, Steven Strassmann. <emphasis>The
UNIX-HATERS Handbook</emphasis>. IDG Books Worldwide, Inc.,
1994. ISBN 1-56884-203-1. Out of print, but available <ulink
url="http://research.microsoft.com/~daniel/unix-haters.html">
online</ulink>.</para>
url="http://www.simson.net/ref/ugh.pdf">online</ulink>.</para>
</listitem>
<listitem>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese (Simplified) Project
Original Revision: 1.70
Original Revision: 1.71
$FreeBSD$
-->
@ -690,9 +690,6 @@ bitmap_name="<replaceable>/boot/splash.pcx</replaceable>"</programlisting>
</indexterm>
<title>Device Hints</title>
<note><para>这是 FreeBSD&nbsp;5.0 及其以后版本的组件,
不存在于早前的版本中。</para></note>
<para>在初始化系统启动时,&man.loader.8; 会读取
&man.device.hints.5; 文件。这个文件以变量的形式储存着内核引导信息,
有时被称为 <quote>device hints</quote>。

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
Original Revision: 1.239
Original Revision: 1.245
$FreeBSD$
-->
@ -723,16 +723,18 @@ sshd is running as pid 433.</screen>
<screen>dc0: &lt;82c169 PNIC 10/100BaseTX&gt; port 0xa000-0xa0ff mem 0xd3800000-0xd38
000ff irq 15 at device 11.0 on pci0
dc0: Ethernet address: 00:a0:cc:da:da:da
miibus0: &lt;MII bus&gt; on dc0
ukphy0: &lt;Generic IEEE 802.3u media interface&gt; on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bmtphy0: &lt;BCM5201 10/100baseTX PHY&gt; PHY 1 on miibus0
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: Ethernet address: 00:a0:cc:da:da:da
dc0: [ITHREAD]
dc1: &lt;82c169 PNIC 10/100BaseTX&gt; port 0x9800-0x98ff mem 0xd3000000-0xd30
000ff irq 11 at device 12.0 on pci0
dc1: Ethernet address: 00:a0:cc:da:da:db
miibus1: &lt;MII bus&gt; on dc1
ukphy1: &lt;Generic IEEE 802.3u media interface&gt; on miibus1
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto</screen>
bmtphy1: &lt;BCM5201 10/100baseTX PHY&gt; PHY 1 on miibus1
bmtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc1: Ethernet address: 00:a0:cc:da:da:db
dc1: [ITHREAD]</screen>
<para>在这个例子中,我们看到有两块使用 &man.dc.4; 驱动的网卡在系统中。</para>
@ -785,8 +787,7 @@ linuxemu/chapter.sgml -->
包括参与 &os; 开发的绝大多数开发人员,
都选择了后一种方法。</para>
<para>得益于 Bill Paul (wpaul) 的工作, 从
&os;&nbsp;5.3-RELEASE 开始, 已经可以 <quote>直接地</quote>
<para>得益于 Bill Paul (wpaul) 的工作, 已经可以 <quote>直接地</quote>
支持 网络驱动接口标准 (NDIS, Network Driver Interface Specification) 了。
&os; NDISulator (也被称为 Project Evil) 可以支持二进制形式的
&windows; 驱动程序, 并让它相信正在运行的是 &windows;。 由于
@ -837,7 +838,7 @@ linuxemu/chapter.sgml -->
这些工作完成之后, 它会在当前目录生成一个内核模块文件,
这个文件可以通过下述命令来加载:</para>
<screen>&prompt.root; <userinput>kldload <replaceable>./W32DRIVER.ko</replaceable></userinput></screen>
<screen>&prompt.root; <userinput>kldload <replaceable>./W32DRIVER_SYS.ko</replaceable></userinput></screen>
<para>除了刚刚生成的内核模块之外,
还必须加载 <filename>ndis.ko</filename> 和
@ -866,12 +867,12 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen>
<para>与任何其它模块一样, 您也可以配置系统,
令其在启动时自动加载 NDIS 模块。 首先, 将生成的模块
<filename>W32DRIVER.ko</filename> 复制到 <filename
<filename>W32DRIVER_SYS.ko</filename> 复制到 <filename
class="directory">/boot/modules</filename> 目录中。
接下来, 在
<filename>/boot/loader.conf</filename> 中加入:</para>
<programlisting>W32DRIVER_load="YES"</programlisting>
<programlisting>W32DRIVER_SYS_load="YES"</programlisting>
</sect3>
</sect2>
@ -890,27 +891,25 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen>
<para>要显示您系统上的网络接口的配置,输入下列命令:</para>
<screen>&prompt.user; <userinput>ifconfig</userinput>
dc0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
dc0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=80008&lt;VLAN_MTU,LINKSTATE&gt;
ether 00:a0:cc:da:da:da
inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100baseTX &lt;full-duplex&gt;)
status: active
dc1: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
dc1: flags=8802&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=80008&lt;VLAN_MTU,LINKSTATE&gt;
ether 00:a0:cc:da:da:db
inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
media: Ethernet 10baseT/UTP
status: no carrier
lp0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; mtu 1500
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; mtu 16384
plip0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; metric 0 mtu 16384
options=3&lt;RXCSUM,TXCSUM&gt;
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
tun0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</screen>
<note>
<para>老版本的 &os; 可能需要在 &man.ifconfig.8; 后面接
<option>-a</option> 选项,需要了解更多的 &man.ifconfig.8;
语法请查阅使用手册。注意所有关于 IPv6 (<literal>inet6</literal>
等等) 的记录在这个例子里都被忽略了。</para>
</note>
nd6 options=3&lt;PERFORMNUD,ACCEPT_RTADV&gt;</screen>
<para>在这个例子中,显示出了下列设备:</para>
@ -926,18 +925,12 @@ tun0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</screen>
</listitem>
<listitem>
<para><devicename>lp0</devicename>: 并行端口网络接口
</para>
<para><devicename>plip0</devicename> 并口 (如果系统中有并口的话)</para>
</listitem>
<listitem>
<para><devicename>lo0</devicename>: 回环设备</para>
</listitem>
<listitem>
<para><devicename>tun0</devicename>:
<application>ppp</application>使用的隧道设备</para>
</listitem>
</itemizedlist>
<para>
@ -996,8 +989,11 @@ tun0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</screen>
<para>如果 &man.ifconfig.8; 的输出显示了类似于:</para>
<screen>dc0: flags=8843&lt;BROADCAST,SIMPLEX,MULTICAST&gt; mtu 1500
ether 00:a0:cc:da:da:da</screen>
<screen>dc0: flags=8843&lt;BROADCAST,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=80008&lt;VLAN_MTU,LINKSTATE&gt;
ether 00:a0:cc:da:da:da
media: Ethernet autoselect (100baseTX &lt;full-duplex&gt;)
status: active</screen>
<para>的信息,那么就是还没有配置网卡。</para>
@ -1019,16 +1015,22 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlis
的手册页来了解各选项,也要查看一下 &man.rc.conf.5;
帮助页来了解 <filename>/etc/rc.conf</filename> 的语法。</para>
<para>
如果在安装的时候配置了网络,关于网卡的一些行可能已经存在了。
所以在添加新行前仔细检查一下 <filename>/etc/rc.conf</filename>。
</para>
<para>如果在安装的时候配置了网络,关于网卡的一些行可能已经存在了。
所以在添加新行前仔细检查一下 <filename>/etc/rc.conf</filename>。</para>
<para>
您也可能需要编辑 <filename>/etc/hosts</filename>
来添加局域网中不同的机器名称和 IP 地址,如果它们不存在,查看
&man.hosts.5; 帮助和 <filename>/usr/share/examples/etc/hosts</filename>
以获得更多信息。</para>
<para>您也可能需要编辑
<filename>/etc/hosts</filename> 来添加局域网中不同的机器名称和 IP
地址, 如果它们不在那里的话。 请查看联机手册 &man.hosts.5;
和 <filename>/usr/share/examples/etc/hosts</filename>
以了解更多信息。</para>
<note>
<para>如果计划通过这台机器访问 Internet
您还需要手工配置默认网关和域名解析服务器:</para>
<screen>&prompt.root; <userinput>echo 'defaultrouter="<replaceable>your_default_router</replaceable>"' &gt;&gt; /etc/rc.conf</userinput>
&prompt.root; <userinput>echo 'nameserver <replaceable>your_DNS_server</replaceable>' &gt;&gt; /etc/resolv.conf</userinput></screen>
</note>
</sect2>
<sect2>
@ -1036,9 +1038,20 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlis
<para>对 <filename>/etc/rc.conf</filename>
做了必要的修改之后应该重启系统以应用对接口的修改,
并且确认系统重启后没有任何配置错误。</para>
并且确认系统重启后没有任何配置错误。
另外您也可以重启网络系统:</para>
<para>系统重启后就应该测试网络接口了。</para>
<screen>&prompt.root; <userinput>/etc/rc.d/netif restart</userinput></screen>
<note>
<para>如果在
<filename>/etc/rc.conf</filename> 中配置了默认网关,
还需要运行下面的命令:</para>
<screen>&prompt.root; <userinput>/etc/rc.d/routing restart</userinput></screen>
</note>
<para>网络系统重启之后, 应测试网络接口。</para>
<sect3>
<title>测试以太网卡</title>
@ -1685,12 +1698,12 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
<para><literal>SCSI_DELAY</literal> 内核配置会缩短系统启动时间。
默认值在系统启动过程中有 <literal>15</literal> 秒的迟延时间,
这是一个足够多且可靠的值。把它减少到 <literal>5</literal>
通常也能工作(特别是现代的驱动器)。新一些的 &os;
(5.0 或更高版本) 应该用启动时刻可调整
<varname>kern.cam.scsi_delay</varname>。
这个可调整的和内核配置选项接受的值
<emphasis>毫秒</emphasis> <emphasis>不是
</emphasis> <emphasis>秒</emphasis> 。</para>
通常也能工作(特别是现代的驱动器)。
您可以在系统引导时调整引导加载器变量
<varname>kern.cam.scsi_delay</varname> 来改变它
需要注意的是, 此处使用的单位
<emphasis>毫秒</emphasis> 而 <emphasis>不</emphasis>
<emphasis>秒</emphasis> 。</para>
</sect3>
</sect2>
@ -2478,6 +2491,26 @@ hw.acpi.s4bios: 0</screen>
邮件列表, 尽管不要指望问题一定会很快解决,
因为有许多驱动程序/硬件需要进行更多的测试和改进。</para>
<para>休眠和唤醒操作最常见的问题是某些设备驱动程序不会保存、
恢复或正确地重新初始化其固件、 寄存器或设备内存。
尝试调试这些问题时, 首先可以尝试:</para>
<screen>&prompt.root; <userinput>sysctl debug.bootverbose=1</userinput>
&prompt.root; <userinput>sysctl debug.acpi.suspend_bounce=1</userinput>
&prompt.root; <userinput>acpiconf -s 3</userinput></screen>
<para>这个测试会模拟休眠和恢复过程而不真的进入 <literal>S3</literal>
状态。 有时, 您会用这种方式很容易地抓住问题
(例如, 丢失固件状态、 设备 watchdog 超时, 以及一直重试等)。
注意系统不会真的进入
<literal>S3</literal> 状态, 这意味着这些设备可能不会掉电,
而许多设备在完全不提供休眠和恢复方法时仍可正常工作,
而不像使用真的 <literal>S3</literal>
状态那样。</para>
<para>较难的情况则需要更多的硬件, 例如用于串口控制台的串口/线,
以及用于 &man.dcons.4; 的火线口/线和内核调试技能。</para>
<para>为了帮助隔离问题, 请在内核中删去尽可能多的驱动。
如果这样做能够解决问题, 请尝试逐个加载驱动直到问题再次出现。
通常预编译的驱动程序如

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.247
Original Revision: 1.252
$FreeBSD$
-->
@ -114,12 +114,13 @@
<note>
<para>整个这一章中,<command>cvsup</command>
命令都被用来获取 &os; 源代码的更新。
你需要安装一个像
<filename role="package">net/cvsup-without-gui</filename>
这样的 port 或者二进制包。
如果你使用的是 &os;&nbsp;6.2-RELEASE 或之后的版本,
你可以使用 &man.csup.1; 代替,
现在它已经是基本系统的一部分了。</para>
你需要安装
<filename role="package">net/cvsup</filename> port
或者二进制包(如果你不想要安装图形界面的 <command>cvsup</command>
客户端的话, 则可以安装
<filename role="package">net/cvsup-without-gui</filename> port)。
你也可以使用 &man.csup.1; 代替,
它现在已经是基本系统的一部分了。</para>
</note>
</sect1>
@ -162,10 +163,8 @@
<note>
<para>由安全小组支持的各种体系结构和发行版都可使用二进制更新。
然而有些特性,比如升级 &os; 操作系统需要最近的 &man.freebsd-update.8;
和 &os;&nbsp;6.3 或更高版本。
在升级到一个新的发行版本之前, 应先阅读一下当前发行版的声明,
因为们可能包含有关于你期望升级版本的重要消息。
因为它们可能包含有关于你期望升级版本的重要消息。
这些发行声明可以通过以下链接查阅:
<ulink url="http://www.FreeBSD.org/releases/"></ulink>。</para>
</note>
@ -395,17 +394,17 @@ MergeChanges /etc/ /var/named/etc/</programlisting>
<para>重大和次要的更新可以由
<command>freebsd-update</command> 命令后指定一个发行版本来执行,
举例来说,下面的命令将帮助你升级到 &os;&nbsp;6.4</para>
举例来说,下面的命令将帮助你升级到 &os;&nbsp;8.1</para>
<screen>&prompt.root; <userinput>freebsd-update -r 6.4-RELEASE upgrade</userinput></screen>
<screen>&prompt.root; <userinput>freebsd-update -r 8.1-RELEASE upgrade</userinput></screen>
<para>在这个命令被执行后,<command>freebsd-update</command>
<para>在执行这个命令之后,<command>freebsd-update</command>
将会先解析配置文件和评估当前的系统以获得更新系统所需的必要信息。
然后便会显示出一个包含了已检测到与未检测到的组件列表。
例如:</para>
<screen>Looking up update.FreeBSD.org mirrors... 1 mirrors found.
Fetching metadata signature for 6.3-RELEASE from update1.FreeBSD.org... done.
Fetching metadata signature for 8.0-RELEASE from update1.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
@ -428,7 +427,7 @@ Does this look reasonable (y/n)? y</screen>
<para>当使用定制内核时, 前面的步骤会产生类似下面的警告:</para>
<screen>WARNING: This system is running a "<replaceable>MYKERNEL</replaceable>" kernel, which is not a
kernel configuration distributed as part of FreeBSD 6.3-RELEASE.
kernel configuration distributed as part of FreeBSD 8.0-RELEASE.
This kernel will not be updated: you MUST update the kernel manually
before running "/usr/sbin/freebsd-update install"</screen>
@ -618,7 +617,7 @@ Fetching 133 new ports or files... done.</screen>
<command>fetch</command> 操作之后,
会将校验过的 Ports 套件和后续的补丁保存在本地。
首次执行 <command>portsnap</command> 之后,
需要用 <literal>extract</literal> 来安装这份快照中的文件:</para>
你必须使用 <literal>extract</literal> 安装下载的文件:</para>
<screen>&prompt.root; <userinput>portsnap extract</userinput>
/usr/ports/.cvsignore
@ -634,8 +633,8 @@ Fetching 133 new ports or files... done.</screen>
/usr/ports/Mk/bsd.cmake.mk
<replaceable>...</replaceable></screen>
<para>以后运行 <command>portsnap fetch</command> 之后, 则只需使用
<literal>update</literal> 安装更新即可</para>
<para>使用 <command>portsnap update</command>
命令更新已安装的 Ports</para>
<screen>&prompt.root; <userinput>portsnap update</userinput></screen>
@ -647,6 +646,10 @@ Fetching 133 new ports or files... done.</screen>
如下例所示:</para>
<screen>&prompt.root; <userinput>portsnap fetch update</userinput></screen>
<para>这个命令将会下载最新版本的 Ports 并更新本地位于
<filename class="directory">/usr/ports</filename>
的拷贝。</para>
</sect1>
<sect1 id="updating-upgrading-documentation">
@ -1762,12 +1765,6 @@ DOCSUPFILE?= /usr/share/examples/cvsup/doc-supfile</programlisting>
这个过程一直在演化过程中。 不过幸运的是, 目前推荐的这个升级步骤,
应该能够在很长一段时间内不需要做任何调整。</para>
<note>
<para>从 &os; 3.<replaceable>X</replaceable> 或更早的版本进行升级,
是一件非常麻烦的事情; 请务必仔细阅读 <filename>UPDATING</filename>
之后再开始这类升级。</para>
</note>
<para>总结一下, 目前推荐的从源代码升级 &os;
的方法是:</para>
@ -2159,8 +2156,7 @@ Script done, &hellip;</screen>
<sect2 id="make-installworld">
<title>安装编译好的新系统</title>
<para>如果您正建立一个足以使用 <command>make buildworld</command>
的 &os; 版本,那么您现在应该使用
<para>您现在应使用
<maketarget>installworld</maketarget> 来安装新的系统二进制。</para>
<para>执行</para>
@ -2484,15 +2480,16 @@ Script done, &hellip;</screen>
包含了所有在编译阶段生成的目标文件。通常,
在 <command>make buildworld</command> 过程中第一步之一就是删除这个目录重新开始。
这种情况下,在您完成后,保留 <filename>/usr/obj</filename>
没有多大意义,还可释放一大堆磁盘空间(通常在 340&nbsp;MB 左右)。</para>
没有多大意义,还可释放一大堆磁盘空间(目前是 2&nbsp;GB 左右)。</para>
<para>只是,如果您清楚您在干什么,您可以让
<para>不过, 如果您很了解整个过程, 也可以让
<command>make buildworld</command> 跳过这一步。
这会让后继的 build 执行得更快,因为大部分的源码都不必再进行编译了。
这个的另一面就在于敏感的依赖问题可以潜在,
并以奇怪的方式引起 build 的失败。这在 &os; 邮件列表里经常引起沸腾,
当有人抱怨他们 build 失败时,并没意识到这是因为自已是想抄近路
(意思是说少了些必要的步骤)。</para>
这会让后续的联编过程执行得更快,
因为大部分的源码都不必再进行编译了。
这样做的负面效果是它可能会触发一些由于敏感的依赖关系导致的问题,
这些问题会导致联编以奇怪的方式出错并失败。
这在 &os; 邮件列表里经常引起沸腾,
当有人抱怨他们 build 失败时,并没意识到这是因为自已是想抄近路。</para>
</answer>
</qandaentry>
@ -2645,6 +2642,98 @@ Building everything..
</sect2>
</sect1>
<sect1 id="make-delete-old">
<sect1info>
<authorgroup>
<author>
<firstname>Anton</firstname>
<surname>Shterenlikht</surname>
<contrib>Based on notes provided by </contrib>
</author>
</authorgroup>
</sect1info>
<title>删除过时的文件、 目录和函数库</title>
<indexterm>
<primary>删除过时的文件、 目录和函数库</primary>
</indexterm>
<para>在 &os; 的开发过程中, 随时可能会出现一些文件或其内容过时的情况。
这种情况有可能是由于其功能在其它地方实现了,
函数库的版本号增加, 或完全从基本系统中删去, 等等。
一般的联编和更新过程并不会删去这些旧的文件、 函数库或目录,
在更新系统之后, 应及时予以清理。 清理的好处是这些文件不会再继续占用存储
(以及备份) 空间, 另外, 如果旧的函数库或文件中存在安全或可靠性问题,
您也应更新到新的函数库, 以避免安全隐患或崩溃情形的发生。
过时的文件、 目录和函数库会列在
<filename>/usr/src/ObsoleteFiles.inc</filename> 中。
接下来将介绍在系统更新过程中如何删去这些过时的文件。</para>
<para>我们假定您已经按照 <xref
linkend="canonical-build"> 介绍的步骤完成了更新操作。 在 <command>make
<maketarget>installworld</maketarget></command> 和
<command>mergemaster</command> 命令完成之后,
您应使用下面的命令检查系统中是否存在过时的文件或库:</para>
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make check-old</userinput></screen>
<para>如果有过时的文件, 则可以用下面的命令来删除:</para>
<screen>&prompt.root; <userinput>make delete-old</userinput></screen>
<tip>
<para>参阅 <filename>/usr/src/Makefile</filename>
可以了解其他 target 的功用。</para>
</tip>
<para>在删除文件时, 系统会针对每个文件都给出提示。
您可以跳过这些提示, 并让系统自动完成删除操作,
方法是使用 make 变量 <makevar>BATCH_DELETE_OLD_FILES</makevar>
具体做法如下:<para>
<screen>&prompt.root; <userinput>make -DBATCH_DELETE_OLD_FILES delete-old</userinput></screen>
<para>您也可以用
<command>yes</command> 命令和管道来达到类似的目的:</para>
<screen>&prompt.root; <userinput>yes|make delete-old</userinput></screen>
<warning>
<title>警告</title>
<para>删去过时的文件, 有可能会破坏现有的依赖这些文件的应用程序。
对于旧的函数库来说, 这种问题出现的可能性更大。
绝大多数情况下, 您应重新联编使用旧库的所有的程序、
port 或函数库之后再执行 <command>make
<maketarget>delete-old-libs</maketarget></command>。</para>
</warning>
<para>在 Ports Collection 中提供了一些检测动态连接库依赖关系的工具,
例如 <filename
role="package">sysutils/libchk</filename> 和 <filename
role="package">sysutils/bsdadminscripts</filename>。</para>
<para>过时的动态连接库可能会与新库冲突,
导致类似这样的警告消息:</para>
<screen>/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libtiff.so, may conflict with libz.so.5
/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXext.so, may conflict with librpcsvc.so.5</screen>
<para>要解决这样的问题, 需要确认安装这个库的 port</para>
<screen>&prompt.root; <userinput>pkg_info -W /usr/local/lib/libtiff.so</userinput>
/usr/local/lib/libtiff.so was installed by package tiff-3.9.4
&prompt.root; <userinput>pkg_info -W /usr/local/lib/libXext.so</userinput>
/usr/local/lib/libXext.so was installed by package libXext-1.1.1,1</screen>
<para>接着卸载、 重新联编并安装 port。 您可以使用 <filename
role="package">ports-mgmt/portmaster</filename> 或 <filename
role="package">ports-mgmt/portupgrade</filename> 工具来自动完成这些操作。
在确认所有的 port 都重新联编, 并且不再使用旧库以后,
您就可以用下面的命令来删除它们了:</para>
<screen>&prompt.root; <userinput>make delete-old-libs</userinput></screen>
</sect1>
<sect1 id="small-lan">
<sect1info>
<authorgroup>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.96
Original Revision: 1.98
$FreeBSD$
-->
@ -196,7 +196,7 @@
<title>Firefox 与 &java; 插件</title>
<note>
<para>在这一节和下一节中,
<para>在这一节和接下来的两节中,
我们均假定您已经安装了 <application>Firefox</application>。</para>
<para>目前, &java; 插件还不能够配合
@ -218,6 +218,22 @@
下载 <application>Diablo &jre;</application> 软件包,
并使用 &man.pkg.add.1; 来安装它。</para>
<note>
<para>以上提到的网站并不提供 &os;&nbsp;8.<replaceable>X</replaceable>
的二进制包。 但仍然能够在 &os;&nbsp; 8.<replaceable>X</replaceable>
系统上使用 7.<replaceable>X</replaceable> 的包。
只需要在安装之前装上 <filename role="package">misc/compat7x</filename>
port 就行了。</para>
<para>或者也可以通过 Ports 安装 <application>Diablo &jre;</application>
(以及 <application>Diablo &jdk;</application>
相关的 ports 包括
<filename role="package">java/diablo-jre16</filename> 和
<filename role="package">java/diablo-jdk16</filename>)。
由于许可证的问题, 从 Ports 安装需要手工下载源代码(distfiles)。
当你运行 <command>make <maketarget>install</maketarget></command>
命令时, 会显示出具体有关下载的提示。</para>
</note>
<para>启动浏览器, 并在地址栏中输入
<literal>about:plugins</literal> 然后按
<keycap>Enter</keycap>。 浏览器将给出一个页面,

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.294
Original Revision: 1.302
$FreeBSD$
-->
@ -376,7 +376,7 @@ ad3: 29333MB &lt;WDC WD307AA&gt; [59598/16/63] at ata1-slave UDMA33</programlist
<emphasis>不是</emphasis> 设置 master/slave 硬盘的跳线。查阅文档
信息来确定正确的跳线设置。</para></note>
<para>接下来考虑的是,如何创建文件系统。应该好好研究一下 &man.vinum.8; (<xref
<para>接下来考虑的是,如何创建文件系统。应该好好研究一下 &man.vinum.4; (<xref
linkend="vinum-vinum">)和 &man.ccd.4; 两种方式,在这里我们选择 &man.ccd.4;
</para>
</sect4>
@ -508,10 +508,10 @@ bsdlabel -e ad3</programlisting>
<para>Vinum 卷管理是一个实现虚拟磁盘的块驱动设备工具。它使磁盘从
块设备的接口和数据映射中独立出来。与传统的存储设备相比,增加了
灵活性、性能和可靠性。 &man.vinum.8; 实现了 RAID-0、RAID-1 和
灵活性、性能和可靠性。 &man.vinum.4; 实现了 RAID-0、RAID-1 和
RAID-5 三种模式,它们既可以独立使用,也可组合使用。</para>
<para>参考 <xref linkend="vinum-vinum"> 得到更多 &man.vinum.8;
<para>参考 <xref linkend="vinum-vinum"> 得到更多 &man.vinum.4;
的信息。</para>
</sect3>
</sect2>
@ -1025,7 +1025,7 @@ scsibus1:
<step>
<para>使用 <command>cdda2wav</command> 来解压缩音频。</para>
<screen>&prompt.user; <userinput>cdda2wav -v255 -D2,0 -B -Owav</userinput></screen>
<screen>&prompt.user; <userinput>cdda2wav -vall -D2,0 -B -Owav</userinput></screen>
</step>
<step>
@ -1042,6 +1042,13 @@ scsibus1:
<procedure>
<title>ATAPI 驱动器</title>
<note>
<para>借助于 <link linkend="atapicam">ATAPI/CAM 模块</link>
<command>cdda2wav</command> 同样也能在 ATAPI 设备上使用。
此工具比起下面推荐的方法通常是个更好的选择(抖动修正,
字节序问题, 等等)。
</note>
<step>
<para>ATAPI CD 驱动用
<filename>/dev/acd<replaceable>d</replaceable>t<replaceable>nn</replaceable></filename>表示每个轨道,
@ -2214,21 +2221,11 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<indexterm><primary><command>tar</command></primary></indexterm>
<para>在 FreeBSD 5.3 和更高版本中, 同时提供了 GNU <command>tar</command>
和默认的 <command>bsdtar</command>。
GNU 的版本可以通过 <command>gtar</command> 来使用。 它通过与
<command>rdump</command> 一样的语法来支持远程设备。
要 <command>tar</command> 到连接在名为
<para>要 <command>tar</command> 到连接在名为
<hostid>komodo</hostid> 的 Sun 机器上的
Exabyte 磁带机, 可以使用:</para>
<screen>&prompt.root; <userinput>/usr/bin/gtar cf komodo:/dev/nsa8 . 2>&amp;1</userinput></screen>
<para>您也可以让
<command>bsdtar</command> 通过管道和
<command>rsh</command> 将数据发送到远程的磁带机上。</para>
<screen>&prompt.root; <userinput>tar cf - . | rsh <replaceable>hostname</replaceable> dd of=<replaceable>tape-device</replaceable> obs=20b</userinput></screen>
<screen>&prompt.root; <userinput>tar cf - . | rsh komodo dd of=<replaceable>tape-device</replaceable> obs=20b</userinput></screen>
<para>如果您担心通过网络备份会有安全问题,应当使用 <command>ssh</command>
而不是 <command>rsh</command>。</para>
@ -2334,8 +2331,8 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
及恢复数据。这些怪异之处包括:具有 holes 和一个 nulls block 的文件,
文件名具有有趣字符,无法读写的文件及设备,在备份时改变文件大小,在
备份时建立或删除的文件。她将结果刑在: LISA V in Oct. 1991.
See <ulink
url="http://berdmann.dyndns.org/zwicky/testdump.doc.html">torture-testing
参阅 <ulink
url="http://www.coredumps.de/doc/dump/zwicky/testdump.doc.html ">torture-testing
Backup and Archive Programs</ulink>.</para>
</sect2>
@ -2355,174 +2352,33 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
(<filename>/etc/fstab</filename>) ,以及所有启动信息,
并将其复制两份。</para>
<indexterm><primary>fix-it floppies</primary></indexterm>
<para>第二,确定遇到的情况时,用来启动及修复的软盘
(<filename>boot.flp</filename> 和 <filename>fixit.flp</filename>)
具有您所有的设备代号。最简单的方法是用软盘启动,然后检查启动信息
如果设备都被列出,并且可以正常使用,就可以跳到第三步。</para>
<para>否则,必须建立两张传统的可启动软盘,并包含:
<command>fdisk</command>, <command>bsdlabel</command>,
<command>newfs</command>, <command>mount</command>, 以及所有使用的
备份程序。这些程序必须被静态的连接。如果使用的是 <command>dump</command>
那么这张软盘就必须包含 <command>restore</command>。</para>
<indexterm><primary>livefs CD</primary></indexterm>
<para>第二, 刻录一张 <quote>livefs</quote> CDROM。 这个 CDROM
包含了用于引导进入 &os;
<quote>livefs</quote> 修复模式的支持
这种模式允许用户执行许多任务, 例如执行 &man.dump.8;、
&man.restore.8;、 &man.fdisk.8;、 &man.bsdlabel.8;、
&man.newfs.8;、 &man.mount.8; 等等。 Livefs CD 映像文件随
&os;/&arch.i386;&nbsp;&rel.current;-RELEASE 提供,
可以从 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/&arch.i386;/ISO-IMAGES/&rel.current;/&os;-&rel.current;-RELEASE-&arch.i386;-livefs.iso"></ulink>
获得。</para>
<para>第三,定期将数据备份到磁带。任何在上次备份后的改变都无法恢复。记得将
磁盘写保护。</para>
<para>第四,测试在第二步所建立的软盘及备份的磁带,将过程记录下来,并和这张
可启动的软盘和磁带放在一起。也许您在恢复时会想要,而这份记录将防止您破坏
您的磁带 (怎么说呢?因为您可能将 <command>tar xvf /dev/sa0</command> 打成
<command>tar cvf /dev/sa0</command> 而重写了备份磁带)。</para>
<para>为了安全,您可以每次都做两份备份磁带及一张启动磁盘,并将其中
一份备份磁带存放在其它地方。其它地方不是指同一栋办公大楼的地下室
(世贸中心的一些公司应该学到了一些教训),而是真的要让人的磁带离您
的的计算机远远的。</para>
<example>
<title>一个建立启动磁盘的 shell 脚本例子:</title>
<programlisting><![ CDATA [#!/bin/sh
#
# create a restore floppy
#
# format the floppy
#
PATH=/bin:/sbin:/usr/sbin:/usr/bin
fdformat -q fd0
if [ $? -ne 0 ]
then
echo "Bad floppy, please use a new one"
exit 1
fi
# place boot blocks on the floppy
#
bsdlabel -w -B /dev/fd0c fd1440
#
# newfs the one and only partition
#
newfs -t 2 -u 18 -l 1 -c 40 -i 5120 -m 5 -o space /dev/fd0a
#
# mount the new floppy
#
mount /dev/fd0a /mnt
#
# create required directories
#
mkdir /mnt/dev
mkdir /mnt/bin
mkdir /mnt/sbin
mkdir /mnt/etc
mkdir /mnt/root
mkdir /mnt/mnt # for the root partition
mkdir /mnt/tmp
mkdir /mnt/var
#
# populate the directories
#
if [ ! -x /sys/compile/MINI/kernel ]
then
cat << EOM
The MINI kernel does not exist, please create one.
Here is an example config file:
#
# MINI -- A kernel to get FreeBSD onto a disk.
#
machine "i386"
cpu "I486_CPU"
ident MINI
maxusers 5
options INET # needed for _tcp _icmpstat _ipstat
# _udpstat _tcpstat _udb
options FFS #Berkeley Fast File System
options FAT_CURSOR #block cursor in syscons or pccons
options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device
options NCONS=2 #1 virtual consoles
options USERCONFIG #Allow user configuration with -c XXX
config kernel root on da0 swap on da0 and da1 dumps on da0
device isa0
device pci0
device fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
device fd0 at fdc0 drive 0
device ncr0
device scbus0
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
device da0
device da1
device da2
device sa0
pseudo-device loop # required by INET
pseudo-device gzip # Exec gzipped a.out's
EOM
exit 1
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 /bin/sh > /mnt/bin/sh
gzip -c -best /bin/sync > /mnt/bin/sync
cp /root/.profile /mnt/root
chmod 500 /mnt/sbin/init
chmod 555 /mnt/sbin/fsck /mnt/sbin/mount /mnt/sbin/halt
chmod 555 /mnt/bin/sh /mnt/bin/sync
chmod 6555 /mnt/sbin/restore
#
# create minimum file system table
#
cat > /mnt/etc/fstab <<EOM
/dev/fd0a / ufs rw 1 1
EOM
#
# create minimum passwd file
#
cat > /mnt/etc/passwd <<EOM
root:*:0:0:Charlie &:/root:/bin/sh
EOM
cat > /mnt/etc/master.passwd <<EOM
root::0:0::0:0:Charlie &:/root:/bin/sh
EOM
chmod 600 /mnt/etc/master.passwd
chmod 644 /mnt/etc/passwd
/usr/sbin/pwd_mkdb -d/mnt/etc /mnt/etc/master.passwd
#
# umount the floppy and inform the user
#
/sbin/umount /mnt
echo "The floppy has been unmounted and is now ready."]]></programlisting>
</example>
<para>第四, 测试在第二步所建立的 <quote>livefs</quote> CDROM
及备份的磁带。 写下笔记, 并和这张 CDROM、
打印副本以及磁带放在一起。 您在需要恢复数据时可能正心慌意乱,
而这些记录可能会帮助您避免毁掉备份磁带 (怎么会发生这种情况呢?
举例来说, 本应执行 <command>tar xvf /dev/sa0</command> 命令时,
您可能会不小心输入 <command>tar cvf /dev/sa0</command>
从而覆盖备份磁带)。</para>
<para>保险起见, 您可以制作两份 <quote>livefs</quote> CDROM 和备份磁带。
其中一份应放到其它地方, 这里说的其他地方当然不是指同一栋办公楼的地下室,
世贸中心的一大批公司已经学到了血的教训。
保存这份备份的位置应该与您的计算机和磁盘驱动器越远越好。</para>
</sect3>
<sect3>
@ -2531,25 +2387,17 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
<para>关键问题是: 您的硬件是否幸免于难?
由于已经做好了定期的备份工作, 因此并不需要担心软件的问题。</para>
<para>如果硬件已经损毁, 这些部分应该在尝试使用计算机之前换掉。</para>
<para>如果硬件还能用, 检查一下您的软盘。 如果使用定制的引导软盘,
启动单用户模式 (在 <prompt>boot:</prompt> 提示后输入
<literal>-s</literal>)。 跳过下面一段。</para>
<para>如果您使用 <filename>boot.flp</filename> 和
<filename>fixit.flp</filename> 软盘, 请继续阅读。 将
<filename>boot.flp</filename>
软盘插到计算机的第一个软驱并启动机器。 此时,
最初的安装菜单将显示在屏幕上。
选择 <literal>Fixit--Repair mode with CDROM or floppy.</literal>
选项。 在得到提示后插入
<filename>fixit.flp</filename> 。
<command>restore</command> 以及其他需要的程序,
可以在 <filename class="directory">/mnt2/rescue</filename>
(对于 &os; 5.2 之前的版本, 则是
<filename class="directory">/mnt2/stand</filename>)。</para>
<para>如果硬件已经损坏, 这些部分应该在尝试使用计算机之前换掉。</para>
<para>如果硬件还能用, 将
<quote>livefs</quote> CDROM 插入 CDROM 驱动器并引导系统。
您将看到最初安装系统时的菜单。 选择正确的国家之后, 选择
<guimenuitem>Fixit -- Repair mode with CDROM/DVD/floppy or
start a shell</guimenuitem> 选项, 然后再选择
<guimenuitem>CDROM/DVD -- Use the live filesystem
CDROM/DVD</guimenuitem> 这项。 您可以使用
<command>restore</command> 以及其他位于
<filename class="directory">/mnt2/rescue</filename> 的工具。</para>
<para>分别恢复每一个文件系统</para>
<indexterm>
@ -2562,16 +2410,19 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
<indexterm>
<primary><command>newfs</command></primary>
</indexterm>
<para>试着 <command>mount</command> 上您的第一个磁盘的 root 分区(例如: <command>mount /dev/da0a
/mnt</command>)。假如这个磁盘标签已经损坏,使用 <command>bsdlabel</command>
来重新分割并分配磁盘标签(利用您以前保留下来的数据)。使用 <command>newfs</command>
来建立文件系统,并重新挂上软盘读写的 root 分区 (<command>mount -u -o rw
/mnt</command>)。然后使用备份程序及备份磁带来修复文件系统 (例如: <command>restore vrf
/dev/sa0</command>)。最后 Unmount 这个文件系统 (例如: <command>umount
/mnt</command>)。对于每个损坏的文件系统都重复一次。</para>
<para>试着 <command>mount</command> (例如: <command>mount /dev/da0a
/mnt</command> 第一个磁盘上的 root 分区。
如果 bsdlabel 已经毁坏, 则需要使用 <command>bsdlabel</command>
根据您先前打印存档的记录来重新分区并分配磁盘标签。 接着使用
<command>newfs</command> 重建文件系统。
以读写方式重新挂载磁盘的根分区 (<command>mount -u -o rw
/mnt</command>)。 使用您的备份程序以及备份磁带恢复文件系统数据 (例如 <command>restore vrf
/dev/sa0</command>)。 最后卸下文件系统 (例如 <command>umount
/mnt</command>)。 对于毁掉的其他文件系统, 重复执行前面这些操作。</para>
<para>当您的系统正常启动后,将您的数据备份到新的磁带。任何造成数据丢失的
的灾难都可能再次发生。现在花一些时间,也许可以使您免于下次的灾难。</para>
<para>当您的系统正常启动后, 将您的数据备份到新的磁带。
任何造成数据丢失的的灾难都可能再次发生。 现在花一些时间,
也许可以在下次发生灾难时救您一把。</para>
</sect3>
<![ %not.published; [
@ -3388,7 +3239,7 @@ gbde_lockdir="/etc/gbde"</programlisting>
<title>使用 <command>geli</command> 对磁盘进行加密</title>
<para>从 &os; 6.0 开始提供了一个新的密码学 GEOM class &mdash;
<para>还有另一个可用于加密的 GEOM class &mdash;
<command>geli</command>。 它目前由
&a.pjd; 开发。 <command>Geli</command> 工具与
<command>gbde</command> 不同; 它提供了一些不同的功能,
@ -3436,9 +3287,7 @@ gbde_lockdir="/etc/gbde"</programlisting>
并解释了如何创建新和使用 <command>geli</command>
加密 provider。</para>
<para>要使用 <command>geli</command> 您必须运行
&os; 6.0-RELEASE 或更新版本。 由于需要修改内核,
因此您还需要拥有超级用户权限。</para>
<para>由于需要修改内核, 您需要拥有超级用户权限。</para>
<procedure>
<step>
@ -3584,12 +3433,10 @@ geli_da2_flags="-p -k /root/da2.key"</programlisting>
<secondary>encrypting (加密)</secondary>
</indexterm>
<para>从 &os; 5.3-RELEASE 开始, &os; 提供了易于配置的交换区加密机制。
<para>&os; 提供了易于配置的交换区加密机制。
随所用的 &os; 版本, 可用的配置选项会有所不同,
而配置方法也会有一些差异。 从 &os; 6.0-RELEASE 开始,
已经可以使用 &man.gbde.8; 和 &man.geli.8;
两种加密系统来进行交换区的加密操作了。 在更早的版本中,
则只提供了 &man.gbde.8;。 前面所说的这两种加密系统,
而配置方法也会有一些差异。 可以使用 &man.gbde.8; 和 &man.geli.8;
两种加密系统来进行交换区的加密操作。 前面所说的这两种加密系统,
都用到了 <filename>encswap</filename> 这个
<link linkend="configtuning-rcd">rc.d</link> 脚本。</para>
@ -3625,7 +3472,7 @@ geli_da2_flags="-p -k /root/da2.key"</programlisting>
<sect2>
<title>使用 &man.gbde.8; 来加密交换区</title>
<para>如果使用 &os; 6.0-RELEASE 或更新的版本, 则 <filename>/etc/fstab</filename>
<para><filename>/etc/fstab</filename>
中与交换区对应的行中, 设备名应追加
<literal>.bde</literal> 后缀:</para>
@ -3633,11 +3480,6 @@ geli_da2_flags="-p -k /root/da2.key"</programlisting>
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1b.bde none swap sw 0 0
</programlisting>
<para>对于 &os; 6.0-RELEASE 之前的版本,
还需要在 <filename>/etc/rc.conf</filename> 中加入:</para>
<programlisting>gbde_swap_enable="YES"</programlisting>
</sect2>
<sect2>
@ -3664,10 +3506,6 @@ geli_da2_flags="-p -k /root/da2.key"</programlisting>
<programlisting>geli_swap_flags="-e blowfish -l 128 -s 4096 -d"</programlisting>
<para>For systems prior to &os; 6.2-RELEASE, use the following line:</para>
<programlisting>geli_swap_flags="-a blowfish -l 128 -s 4096 -d"</programlisting>
<para>请参见 &man.geli.8; 联机手册中关于 <command>onetime</command>
命令的说明, 以了解其他可用的选项。</para>
</sect2>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.201
Original Revision: 1.203
$FreeBSD$
-->
@ -498,11 +498,21 @@
<entry>FreeBSD 性能和稳定性测试</entry>
</row>
<row>
<entry>&a.tilera.name;</entry>
<entry>讨论将 FreeBSD 移植到 Tilera 系列 CPU</entry>
</row>
<row>
<entry>&a.tokenring.name;</entry>
<entry>在 FreeBSD 中支持 Token Ring</entry>
</row>
<row>
<entry>&a.toolchain.name;</entry>
<entry>维护在 &os; 中集成的联编工具集</entry>
</row>
<row>
<entry>&a.usb.name;</entry>
<entry>关于 &os; 的 USB 支持的讨论</entry>
@ -1436,6 +1446,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term>&a.toolchain.name;</term>
<listitem>
<para><emphasis>维护 FreeBSD 中集成的联编工具集</emphasis></para>
<para>这是关于维护 &os; 中集成的联编工具集的论坛。
这里有包括 Clang 和 GCC 以及其他类似汇编器、
连接器和调试器等软件的讨论。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>&a.usb.name;</term>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.92
Original Revision: 1.95
$FreeBSD$
-->
@ -240,14 +240,8 @@
<programlisting>pf_rules="<replaceable>/path/to/pf.conf</replaceable>"</programlisting>
<note>
<para>从 &os;&nbsp;7.0 开始,作为例子的存放在
<filename class="directory">/etc/</filename> 的
<filename>pf.conf</filename> 被移动到了<filename
class="directory">/usr/share/examples/pf/</filename>。
&os; 7.0 以前的版本,默认仍有一份
<filename>/etc/pf.conf</filename>。</para>
</note>
<para><filename>pf.conf</filename> 的例子可以在 <filename
class="directory">/usr/share/examples/pf/</filename> 找到。</para>
<para><acronym>PF</acronym> 模块也可以手工从命令行加载:</para>
@ -358,7 +352,7 @@ pflog_flags="" #
<para>在浏览 <ulink
url="http://www.openbsd.org/faq/pf/">PF FAQ</ulink> 时,
请时刻注意不同版本的 &os; 可能会使用不同版本的 PF。 目前,
&os;&nbsp;7.<replaceable>X</replaceable> 和更高版本使用的是与
&os; 使用的是与
OpenBSD&nbsp;4.1 相同的 <acronym>PF</acronym>版本。</para>
</warning>
@ -765,16 +759,16 @@ ipnat_rules="/etc/ipnat.rules" #
<para><application>Syslogd</application> 使用特殊的方法对日志数据进行分类。
它使用称为 <quote>facility</quote> 和 <quote>level</quote> 的组。
以 <option>-Ds</option> 模式运行的 IPMON 采用 <literal>security</literal>
作为 <quote>facility</quote>
名。 所有由 IPMON 记录的数据都会进入 <literal>security</literal>。
如果需要, 可以用下列 levels
以 <option>-Ds</option> 模式运行的 IPMON 采用 <literal>local0</literal>
作为默认的 <quote>facility</quote>
名。 如果需要, 可以用下列 levels
来进一步区分数据:</para>
<screen>LOG_INFO - 使用 "log" 关键字指定的通过或阻止动作
LOG_NOTICE - 同时记录通过的那些数据包
LOG_WARNING - 同时记录阻止的数据包
LOG_ERR - 进一步记录含不完整的包头的数据包</screen>
<!-- XXX: "can be considered short" == "with incomplete header" -->
<para>要设置 IPFILTER 来将所有的数据记录到
@ -790,9 +784,9 @@ LOG_ERR -
<para>您需要将下列语句加到
<filename>/etc/syslog.conf</filename></para>
<programlisting>security.* /var/log/ipfilter.log</programlisting>
<programlisting>local0.* /var/log/ipfilter.log</programlisting>
<para>这里的 <literal>security.*</literal>
<para>这里的 <literal>local0.*</literal>
表示把所有的相关日志信息写到指定的文件中。</para>
<para>要让 <filename>/etc/syslog.conf
@ -862,7 +856,7 @@ LOG_ERR -
<para>对于 <acronym>TCP</acronym> 包, 则还会包括一个附加的字段,
由一个连字号开始, 之后是表示所设置的标志的一个字母。
请参见 &man.ipmon.8; 联机手册, 以了解这些字母所对应的标志。</para>
请参见 &man.ipf.5; 联机手册, 以了解这些字母所对应的标志。</para>
<para>对于 ICMP 包, 则在最后会有两个字段。
前一个总是 <quote>ICMP</quote> 而后一个则是 ICMP

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.48
Original Revision: 1.50
$FreeBSD$
-->
@ -641,8 +641,8 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen>
<primary>日志</primary>
</indexterm>
<para>随着 &os;&nbsp;7.0 的发布, 实现了长期为人们所期待的
<acronym>UFS</acronym> 日志。 这个实现采用了
<para>随着 &os;&nbsp;7.0 的发布,
提供了长期为人们所期待的日志功能的实现。 这个实现采用了
<acronym>GEOM</acronym> 子系统, 可以很容易地使用 &man.gjournal.8; 工具来进行配置。</para>
<para>日志是什么? 日志的作用是保存文件系统事务的记录, 换言之,
@ -661,7 +661,7 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen>
<acronym>GEOM</acronym> 扩展实现。</para>
<para>如果希望启用 <command>gjournal</command>
&os; 内核需要下列选项 - 这是 7.X 系统上的默认配置:</para>
&os; 内核需要下列选项 - 这是 &os; 7.0 以及更高版本系统上的默认配置:</para>
<programlisting>options UFS_GJOURNAL</programlisting>
@ -679,8 +679,8 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen>
<para>现在, 可以为空闲的文件系统创建日志了。 对于新增的 <acronym>SCSI</acronym> 磁盘
<devicename>da4</devicename> 具体的操作步骤为:</para>
<screen>&prompt.root; <userinput>gjournal label /dev/da4</userinput>
&prompt.root; <userinput>gjournal load</userinput></screen>
<screen>&prompt.root; <userinput>gjournal load</userinput>
&prompt.root; <userinput>gjournal label /dev/da4</userinput></screen>
<para>这样, 就会出现一个与
<devicename>/dev/da4</devicename> 设备节点对应的
@ -689,7 +689,7 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen>
<screen>&prompt.root; <userinput>newfs -O 2 -J /dev/da4.journal</userinput></screen>
<para>这个命令将建立一个包含日志的
<para>这个命令将建立一个包含日志设备
<acronym>UFS</acronym>2 文件系统。</para>
<para>然后就可以用 <command>mount</command> 命令来挂接设备了:</para>
@ -702,12 +702,10 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen>
<devicename>ad4s2</devicename> 这两个 slice
则 <command>gjournal</command> 会建立
<devicename>ad4s1.journal</devicename> 和
<devicename>ad4s2.journal</devicename>。
如果连续运行两次这个命令, 则会建立
<quote>多层日志</quote>。</para>
<devicename>ad4s2.journal</devicename>。</para>
</note>
<para>在某些情况下, 可能会希望在其他磁盘上保存日志。 对于这些情形,
<para>出于性能考虑, 可能会希望在其他磁盘上保存日志。 对于这类情形,
日志提供者或存储设备, 应在启用日志的设备后给出。 在暨存的文件系统上,
可以用 <command>tunefs</command> 来启用日志; 不过,
在尝试修改文件系统之前, 您应对其进行备份。 多数情况下,

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.392
Original Revision: 1.414
$FreeBSD$
-->
@ -70,7 +70,7 @@
<note>
<para>一般来说,此安装说明是针对 &i386; (<quote>PC 兼容机</quote>)
体系结构的电脑。如果有其它体系结构(如Alpha)的安装说明,
体系结构的电脑。如果有其它体系结构的安装说明,
我们将一并列出。虽然本文档经常保持更新,
但有可能与您安装版本上所带的说明文档有些许出入。
在这里建议您使用本说明文章作为一般性的安装指导参考手册。</para>
@ -93,7 +93,7 @@
给出了这些信息的一些总结。随您安装 &os; 的方式不同,
可能需要使用软驱或为 &os; 支持的 CDROM 驱动器,
有时候也可能需要的是一块网卡。 这将在 <xref
linkend="install-floppies"> 中进行介绍。</para>
linkend="install-boot-media"> 中进行介绍。</para>
<sect3>
<title>&os;/&arch.i386; 和 &os;/&arch.pc98;</title>
@ -110,34 +110,6 @@
</note>
</sect3>
<sect3>
<title>&os;/&arch.alpha;</title>
<indexterm><primary>Alpha</primary></indexterm>
<para>要安装 &os;/&arch.alpha; 您使用的必须是某种受支持的平台
(参见 <xref linkend="install-hardware-supported">)
而且 &os; 必须独占一个硬盘。目前 &os; 还无法与其它操作系统共享磁盘。
这个磁盘必须接在 SRM 固件支持的 SCSI 控制器上,或者如果您机器上的
SRM 支持从 IDE 硬盘启动,则应装到 IDE 硬盘上。</para>
<indexterm><primary>ARC</primary></indexterm>
<indexterm><primary>Alpha BIOS</primary></indexterm>
<indexterm><primary>SRM</primary></indexterm>
<para>此外您还需要用于您的平台 SRM 控制台固件。有时,可以在
AlphaBIOS (或 ARC) 固件和 SRM 之间切换。如果没有,
则需要从制造商网站上下载并安装新的固件。</para>
<note>
<para>对于 Alpha 的支持, 从
&os;&nbsp;7.0 版本开始已经不再提供。
&os;&nbsp;6.<replaceable>X</replaceable> 系列发行版,
是最后一批支持这种硬件平台的版本。</para>
</note>
</sect3>
<sect3>
<title>&os;/&arch.amd64;</title>
@ -365,23 +337,14 @@
如果您还需要安装其它的第三方厂商的套件,
那么将需要更多的硬盘空间。</para>
<para>您可以使用商业软件,例如
<application>&partitionmagic;</application> (硬盘分区魔术师)
或类似 <application>GParted</application>
这样的免费工具来调整分区尺寸,为 FreeBSD 腾出空间。 FreeBSD 光盘的
<filename>tools</filename> 目录包含两个免费的工具也可以完成这个工作:
<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 系统中使用。
这些工具的说明文件可以在同一个目录下面找到。
<para>您可以使用类似 <application>&partitionmagic;</application>
这样的商业版本工具, 或类似 <application>GParted</application>
这样的自由软件工具来调整分区尺寸, 从而为 FreeBSD 腾出空间。
<application>&partitionmagic;</application> 和
<application>GParted</application>
都能改变 <acronym>NTFS</acronym> 分区的尺寸。
<application>GParted</application> 在许多 Live CD Linux 发行版,
<ulink url="http://www.sysresccd.org/">SystemRescueCD</ulink>
<application>GParted</application> 在许多 Live CD Linux 发行版, 如
<ulink url="http://www.sysresccd.org/">SystemRescueCD</ulink>
中均有提供。</para>
<para>目前已经有报告显示改变 &microsoft; Vista
@ -433,54 +396,6 @@
</example>
</sect3>
<sect3>
<title>Alpha 体系结构的硬盘分配方式</title>
<indexterm><primary>Alpha</primary></indexterm>
<para>在 Alpha 上,您必须使用一整颗硬盘给 FreeBSD
没有办法在同一个硬盘上跟其它操作系统共存。
根据不同的 Alpha 机器,您的硬盘可以是 SCSI 或 IDE 硬盘,
只要您的机器可以从这些硬盘开机就可以。</para>
<para>按照 Digital/Compaq 使用手册书写的惯例,
所有 SRM 输入的部分都用大写表示。
注意SRM 大小写有别。</para>
<para>要想得知您硬盘的名称以及型号,
可以在 SRM console 提示符下使用 <literal>
SHOW DEVICE</literal> 命令:</para>
<screen>&gt;&gt;&gt;<userinput>SHOW DEVICE</userinput>
dka0.0.0.4.0 DKA0 TOSHIBA CD-ROM XM-57 3476
dkc0.0.0.1009.0 DKC0 RZ1BB-BS 0658
dkc100.1.0.1009.0 DKC100 SEAGATE ST34501W 0015
dva0.0.0.0.1 DVA0
ewa0.0.0.3.0 EWA0 00-00-F8-75-6D-01
pkc0.7.0.1009.0 PKC0 SCSI Bus ID 7 5.27
pqa0.0.0.4.0 PQA0 PCI EIDE
pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
<para>此范例使用 Digital Personal Workstation 433au
并且显示出此机器联接有三个硬盘。第一个是 CDROM叫做
<devicename>DKA0</devicename>;另外两个是两个硬盘,分别叫做
<devicename>DKC0</devicename> 及 <devicename>DKC100</devicename>。
</para>
<para>硬盘名称中有 <devicename>DKx</devicename> 字样的是 SCSI 硬盘。
例如 <devicename>DKA100</devicename> 表示是一个 SCSI 设备,
其 SCSI ID 为 1位于第一个 SCSI 接口 (A)。
<devicename>DKC300</devicename> 表示一个 SCSI 硬盘,
SCSI ID 为 3位于第三个 SCSI 接口 (C)。设备名称
<devicename>PKx</devicename> 表示 SCSI 控制卡。由以上
<literal>SHOW DEVICE</literal> 指令的输出结果看来,
SCSI 光盘也被视为是 SCSI 硬盘的一种。</para>
<para>IDE 硬盘的名称类似 <devicename>DQx</devicename>,而
<devicename>PQx</devicename> 则表示相对应的硬盘控制器。</para>
</sect3>
</sect2>
<sect2>
@ -576,6 +491,10 @@ pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
<para>CDROM 或 DVD</para>
</listitem>
<listitem>
<para>USB 记忆棒</para>
</listitem>
<listitem>
<para>在同一计算机上的 DOS 分区</para>
</listitem>
@ -606,22 +525,22 @@ pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
</itemizedlist>
<para>如果您购买了 FreeBSD 的 CD 或 DVD那么您可以直接进入下一节
<xref linkend="install-floppies">。</para>
(<xref linkend="install-boot-media">)。</para>
<para>如果您还没有 FreeBSD 的安装文件,您应该回到
<xref linkend="install-diff-media"> 一节,
它介绍了如何准备所需要的安装介质。之后,您就可以回到这一节,
并从 <xref linkend="install-floppies"> 继续。</para>
<para>如果您还没有 FreeBSD 的安装文件, 则应按照
<xref linkend="install-diff-media"> 来准备。
读完那节之后, 您就可以回到这节并从
<xref linkend="install-boot-media"> 继续了。</para>
</sect2>
<sect2 id="install-floppies">
<sect2 id="install-boot-media">
<title>准备引导介质</title>
<para>FreeBSD 的安装过程开始于将您的电脑开机进入 FreeBSD
安装环境 &mdash; -并非在其它的操作系统上运行一个程序。
计算机通常使用安装在硬盘上的操作系统进行引导,
也可以配置成使用一张<quote>bootable(可引导)</quote>的软盘进行启动。
大多数现代计算机都可以从光驱进行引导系统。</para>
大多数现代计算机也都可以从光驱或 USB 盘来引导系统。</para>
<tip>
<para>如果您有 FreeBSD 的安装光盘或 DVD(或者是您购买的,
@ -631,6 +550,63 @@ pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
因为 FreeBSD 光盘及 DVD 光盘都是可以引导的,
用它们开机您不用做什么特别的准备。</para>
</tip>
<para>要创建引导系统所需的记忆棒,
需按下面的操作进行:</para>
<procedure>
<step>
<title>获取记忆棒映像文件</title>
<para>记忆棒映像文件可以从 <replaceable>arch</replaceable> 对应的
<literal>ISO-IMAGES</literal> 目录, 例如
<literal>ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/<replaceable>arch</replaceable>/ISO-IMAGES/<replaceable>version</replaceable>/&os;-&rel.current;-RELEASE-<replaceable>arch</replaceable>-memstick.img</literal>
获得。 其中, <replaceable>arch</replaceable> 和
<replaceable>version</replaceable> 需要替换为您使用的平台和版本。
例如, &os;/&arch.i386;&nbsp;&rel.current;-RELEASE
的记忆棒映像位于 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/&arch.i386;/ISO-IMAGES/&rel.current;/&os;-&rel.current;-RELEASE-&arch.i386;-memstick.img"></ulink>。</para>
<para>记忆棒的映像文件扩展名是 <filename>.img</filename>。
在 <filename
class="directory">ISO-IMAGES/</filename> 目录中提供了多种不同的映像,
您需要根据使用的 &os; 版本, 有时也包括硬件来选择合适的映像。</para>
<important>
<para>在继续安装之前, 务必 <emphasis>备份</emphasis>
您目前保存在 USB 记忆棒上的数据,
接下来的操作将会 <emphasis>擦除</emphasis> 这些数据。</para>
</important>
</step>
<step>
<title>准备记忆棒</title>
<warning>
<para>下面的例子中, 目标记忆棒对应的设备名是
<filename class="devicefile">/dev/da0</filename>。
请小心地确认这是希望覆盖的设备,
否则可能会损坏您的现有数据。</para>
</warning>
<para>设置 <varname>kern.geom.debugflags</varname> sysctl
为允许写入目标设备的主引导记录。</para>
<screen><userinput>&prompt.root; sysctl kern.geom.debugflags=16</userinput></screen>
</step>
<step>
<title>将映像文件写入记忆棒</title>
<para><filename>.img</filename> 文件
<emphasis>不是</emphasis> 直接复制到记忆棒中的那种普通文件。
这个映像是一份包含启动盘全部内容的映像。
这意味着简单地从一个地方复制到另一个地方是 <emphasis>不能</emphasis>
赋予其引导系统的能力的。 您必须使用 &man.dd.1; 将映像文件直接写入磁盘:</para>
<screen>&prompt.root; <userinput>dd if=&os;-&rel.current;-RELEASE-&arch.i386;-memstick.img of=/dev/<replaceable>da0</replaceable> bs=64k</userinput></screen>
</step>
</procedure>
<para>一般来说,要建立安装盘(软盘)请依照下列步骤:</para>
@ -638,15 +614,21 @@ pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
<step>
<title>获取开机软盘映像文件</title>
<important>
<para>请注意, 从 &os; 8.0 开始,
我们不再提供软盘映像了。 请参阅前面关于如何使用 USB 记忆棒,
或 CDROM 和 DVD 来安装 &os; 的介绍。</para>
</important>
<para>开机软盘映像文件可以在您的安装介质的
<filename>floppies/</filename> 目录下找到,
另外您也可以从下述网站的 floppies 目录下载: <literal>ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/<replaceable>&lt;架构名&gt;</replaceable>/<replaceable>&lt;版本&gt;</replaceable>-RELEASE/floppies/</literal>.
另外您也可以从下述网站的 floppies 目录下载: <literal>ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/<replaceable>架构名</replaceable>/<replaceable>版本</replaceable>-RELEASE/floppies/</literal>。
将 <replaceable>&lt;架构名&gt;</replaceable> 和
<replaceable>&lt;版本&gt;</replaceable>
替换为您使用的计算机体系结构和希望安装的版本号。
例如,用于安装 &i386; 上的
&os;/&arch.i386;&nbsp;&rel.current;-RELEASE 的文件的地址,
应该是 <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/floppies/"></ulink>。</para>
&os;/&arch.i386;&nbsp;&rel2.current;-RELEASE 的文件的地址,
应该是 <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel2.current;-RELEASE/floppies/"></ulink>。</para>
<para>软盘映像文件的扩展名是 <filename>.flp</filename>。
在 <filename>floppies/</filename> 目录中包括了许多不同的映像文件,
@ -782,23 +764,29 @@ We can take no responsibility for lost disk contents!</literallayout>
<literal>CDROM</literal>、<literal>First Hard Disk</literal>
等等。</para>
<para>如果您要用软盘安装,请确定选到 floppy disk
如果您要用光盘安装,请选择 CDROM。为了避免疑惑
请参考您的主板说明手册。</para>
<para>如果您要用光盘安装,请选择 CDROM。 如果使用 USB 盘,
或者软盘来引导系统, 也应类似地确认选择了正确的引导设备。
如有疑问, 请参考您的主板说明手册。</para>
<para>储存设定并离开,系统应该会重新启动。</para>
</step>
<step>
<para>如果您用软盘安装,请将在 <xref linkend="install-floppies">
一节中制作好的第一张引导盘,里面包含<filename>kern.flp</filename>
<filename>boot.flp</filename> 文件的那张盘,
放入软盘驱动器中。</para>
<para>如果您根据
<xref linkend="install-boot-media"> 制作了 <quote>可引导</quote> 的 USB 记忆棒,
在开机前将其插到计算机上。</para>
<para>如果您是从光盘安装, 那么开机后请将
<para>如果您是从光盘安装, 那么开机后请立即
FreeBSD 光盘放入光驱中。</para>
<para>如果您开机后如往常一样并没有从软盘或光盘引导,请检查:</para>
<note>
<para>对于 &os; 7.3 和更早的版本, 可以使用软盘引导,
这些软盘可以根据 <xref linkend="install-boot-media"> 来制作。 其中,
<filename>boot.flp</filename> 是启动盘。
引导系统时应使用这张软盘。</para>
</note>
<para>如果您开机后发现计算机引导了先前已经装好的其他操作系统, 请检查:</para>
<orderedlist>
<listitem>
@ -821,6 +809,7 @@ We can take no responsibility for lost disk contents!</literallayout>
您会见到类似下面的画面:</para>
<screen>Booting from CD-Rom...
645MB medium detected
CD Loader 1.2
Building the boot loader arguments
@ -828,12 +817,12 @@ Looking up /BOOT/LOADER... Found
Relocating the loader and the BTX
Starting the BTX loader
BTX loader 1.00 BTX version is 1.01
Console: internal video/keyboard
BTX loader 1.00 BTX version is 1.02
Consoles: internal video/keyboard
BIOS CD is cd0
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS 639kB/261120kB available memory
BIOS 636kB/261056kB available memory
FreeBSD/i386 bootstrap loader, Revision 1.1
@ -867,7 +856,7 @@ Insert disk labelled "Kernel floppy 1" and press any key...</screen>
</step>
<step>
<para>不论是从软盘或光盘引导, 接下来都会进入 &os;
<para>不论是从光盘、 USB 记忆棒或软盘引导, 接下来都会进入 &os;
引导加载器菜单:</para>
<figure id="boot-loader-menu">
@ -884,61 +873,6 @@ Insert disk labelled "Kernel floppy 1" and press any key...</screen>
</step>
</procedure>
</sect3>
<sect3>
<title>引导 Alpha 系统</title>
<indexterm><primary>Alpha</primary></indexterm>
<procedure>
<step>
<para>从电脑尚未打开电源开始。</para>
</step>
<step>
<para>打开电脑电源并等待屏幕上出现开机提示信息。</para>
</step>
<step>
<para>如您需要制作用于安装的软盘,请参考
<xref linkend="install-floppies">
将其中一张制作为第一片引导盘,其中包含
<filename>boot.flp</filename>。将这张软盘插进软驱,
并输入下列命令,以便从软盘启动
(请视实际情况修改命令中的软驱盘符)</para>
<screen>&gt;&gt;&gt;<userinput>BOOT DVA0 -FLAGS '' -FILE ''</userinput></screen>
<para>如果您要从光盘引导,
请将光盘放入光驱中然后输入下列命令开始安装
(请视情况修改命令中的光驱盘符)</para>
<screen>&gt;&gt;&gt;<userinput>BOOT DKA0 -FLAGS '' -FILE ''</userinput></screen>
</step>
<step>
<para>然后 FreeBSD 就会启动。如果您从软盘引导,
到某个阶段您会看到下面的信息:</para>
<screen>Insert disk labelled "Kernel floppy 1" and press any key...</screen>
<para>此时应按照提示取出
<filename>boot.flp</filename> 软盘, 换上
<filename>kern1.flp</filename> 软盘, 然后按
<keycap>Enter</keycap> 键。</para>
</step>
<step>
<para>不论从软盘或光盘引导,您都会看到下面这段信息:</para>
<screen>Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel] in 9 seconds... _</screen>
<para>您可以等待 10 秒或是按 <keycap>Enter</keycap> 跳过。
之后就会进入内核设定菜单。</para>
</step>
</procedure>
</sect3>
<sect3>
@ -1087,7 +1021,7 @@ Mounting root from ufs:/dev/md0c
<para>在 &os;&nbsp;6.2 和更高版本中, 在探测完系统设备之后,
将显示 <xref linkend="config-country">。
请使用光标键来选择国家或地区。 接着按 <keycap>Enter</keycap>
系统将自动设置地区及键盘映射。 您也可以很容易地退出
系统将自动设置地区。 您也可以很容易地退出
<application>sysinstall</application> 程序并从头来过。</para>
<figure id="config-country">
@ -1100,6 +1034,21 @@ Mounting root from ufs:/dev/md0c
</mediaobject>
</figure>
<para>如果您在国家及地区菜单中选择了 <guimenuitem>United States</guimenuitem> (美国)
则系统会使用标准的美国键盘影射; 如果选择了不同的国家,
则会显示下面的彩蛋。 使用光标键选择正确的键盘映射,
然后按 <keycap>Enter</keycap> 来确认。</para>
<figure id="config-keymap">
<title>选择键盘菜单</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/config-keymap" format="PNG">
</imageobject>
</mediaobject>
</figure>
<figure id="sysinstall-exit">
<title>选择离开 Sysinstall</title>
@ -1116,12 +1065,11 @@ Mounting root from ufs:/dev/md0c
<screen> User Confirmation Requested
Are you sure you wish to exit? The system will reboot
(be sure to remove any floppies/CDs/DVDs from the drives).
[ Yes ] No</screen>
<para>如果 CDROM 还留在光驱里,而且选择了
&gui.yes; 则安装程序将重新启动。</para>
<para>如果此处选择了
&gui.yes; 但 CDROM 还留在光驱里, 则会再次进入安装程序。</para>
<para>如果您是从软盘启动, 则在重启系统之前,
需要将 <filename>boot.flp</filename> 软盘取出。</para>
@ -1645,11 +1593,11 @@ Mounting root from ufs:/dev/md0c
<entry><filename>/</filename></entry>
<entry>512&nbsp;MB</entry>
<entry>1&nbsp;GB</entry>
<entry>这是一个根文件系统root filesystem
任何其它的文件系统都会 挂在根目录(译注:用根目录比较亲切)
下面。 512&nbsp;MB 对于此目录来说是合理的大小,
下面。 1&nbsp;GB 对于此目录来说是合理的大小,
因为您往后并不会在这里存放太多的数据; 在安装 FreeBSD
后会用掉约 128&nbsp;MB 的根目录空间。
剩下的空间是用来存放临时文件用的,同时,
@ -1685,7 +1633,7 @@ Mounting root from ufs:/dev/md0c
<entry><filename>/var</filename></entry>
<entry>256&nbsp;MB 至 1024&nbsp;MB</entry>
<entry>512&nbsp;MB 至 4096&nbsp;MB</entry>
<entry><filename>/var</filename> 目录会存放不同长度的文件、
日志以及其它管理用途的文件。大部分这些文件都是 FreeBSD
@ -1699,7 +1647,7 @@ Mounting root from ufs:/dev/md0c
<entry><filename>/usr</filename></entry>
<entry>剩下的硬盘空间 (至少 2&nbsp;GB</entry>
<entry>剩下的硬盘空间 (至少 8&nbsp;GB</entry>
<entry>您所有的其它的文件通常都会存在<filename>/usr</filename>
目录以及其子目录下面。</entry>
@ -1781,7 +1729,7 @@ Mounting root from ufs:/dev/md0c
<screen> Message
Now, you need to create BSD partitions inside of the fdisk
partition(s) just created. If you have a reasonable amount of disk
space (200MB or more) and don't have any special requirements, simply
space (1GB or more) and don't have any special requirements, simply
use the (A)uto command to allocate space automatically. If you have
more specific needs or just don't care for the layout chosen by
(A)uto, press F1 for more information on manual layout.
@ -1954,14 +1902,9 @@ Mounting root from ufs:/dev/md0c
以及它们都包含了哪些软件,之后,可以按 <keycap>Enter</keycap>
回到软件包选择画面。</para>
<para>如果您想要使用图形界面,
则必须选择软件包名称开头是 <literal>X</literal> 的那些软件包。
对于 X 服务器的配置,
以及选择默认的桌面管理器这样的工作必须在 &os; 安装完成之后才能作。
关于配置 X 服务器的更多资料可以在 <xref linkend="x11"> 找到。</para>
<para>默认安装的 X11 版本是
<application>&xorg;</application>。</para>
<para>如果需要图形用户界面, 则配置 X 服务以及选择默认桌面需要在完成 &os;
之后完成。 关于安装和配置 X 服务的信息,
可以在 <xref linkend="x11"> 找到。</para>
<para>如果需要定制内核, 您还需要选择包含源代码的那个选项。
要了解为什么应该编译和构建新的内核, 请参见
@ -2218,8 +2161,8 @@ installation menus to retry whichever operations have failed.
<link linkend="advanced-networking">Advanced Networking</link>
的相关文章。</para>
<screen> User Confirmation Requested
Would you like to configure any Ethernet or SLIP/PPP network devices?
<screen> User Confirmation Requested
Would you like to configure any Ethernet or PPP network devices?
[ Yes ] No</screen>
@ -2357,8 +2300,8 @@ installation menus to retry whichever operations have failed.
<keycap>Enter</keycap>键。</para>
<screen> User Confirmation Requested
Would you like to Bring Up the ed0 interface right now?
<screen> User Confirmation Requested
Would you like to bring the ed0 interface up right now?
[ Yes ] No</screen>
@ -2827,7 +2770,13 @@ Press [Enter] now to invoke an editor on /etc/exports
<sect2 id="linuxcomp">
<title>Linux 兼容性</title>
<screen> User Confirmation Requested
<note>
<para>这节内容只适用于 &os;&nbsp;7.X 安装过程,
如果您安装的是 &os;&nbsp;8.X 或更高版本,
系统不会给出这个提示。</para>
</note>
<screen> User Confirmation Requested
Would you like to enable Linux binary compatibility?
[ Yes ] No</screen>
@ -3246,13 +3195,22 @@ Retype new password :</screen>
<keycap>Enter</keycap>。您可能需要确认是否真的退出安装:</para>
<screen> User Confirmation Requested
Are you sure you wish to exit? The system will reboot (be sure to
remove any floppies/CDs/DVDs from the drives).
Are you sure you wish to exit? The system will reboot.
[ Yes ] No</screen>
<para>选择 &gui.yes; 取出软盘。CDROM 驱动器将被锁定,
直到机器重新启动。CDROM 解锁后就可以取出光盘了。</para>
<para>选择 &gui.yes;。 如果您是从 CDROM 引导的系统,
则会出现下面的提示信息要求您取出光盘:</para>
<screen> Message
Be sure to remove the media from the drive.
[ OK ]
[ Press enter or space ]</screen>
<para>在系统开始重启之前, CDROM 驱动器是锁住的。
CDROM 解锁后就可以取出光盘了 (动作要快)。
按 &gui.ok; 重启系统。</para>
<para>此后系统将重新启动, 因此请留意是否会出现一些错误信息。
进一步的细节, 请参见 <xref linkend="freebsdboot">。</para>
@ -3642,26 +3600,6 @@ Password:</screen>
就可以在命令行键入 <command>startx</command> 来启动它了。</para>
</sect3>
<sect3>
<title>&os;/&arch.alpha; 的启动过程</title>
<indexterm><primary>Alpha</primary></indexterm>
<para>一旦安装完成您就可以键入下面的命令来启动FreeBSD</para>
<screen>&gt;&gt;&gt;<userinput>BOOT DKC0</userinput></screen>
<para>这是从指定的固定硬件进行引导。如果要使 FreeBSD 下次能够自动启动,
使用下面的命令:</para>
<screen><prompt>&gt;&gt;&gt;</prompt> <userinput>SET BOOT_OSFLAGS A</userinput>
<prompt>&gt;&gt;&gt;</prompt> <userinput>SET BOOT_FILE ''</userinput>
<prompt>&gt;&gt;&gt;</prompt> <userinput>SET BOOTDEF_DEV DKC0</userinput>
<prompt>&gt;&gt;&gt;</prompt> <userinput>SET AUTO_ACTION BOOT</userinput></screen>
<para>启动信息跟启动 &i386;机器时差不多。(但不完全一样)</para>
</sect3>
</sect2>
<sect2 id="shutdown">
@ -3953,10 +3891,19 @@ Please press any key to reboot.</screen>
<author>
<firstname>Valentino</firstname>
<surname>Vaschetto</surname>
<contrib>Contributed by </contrib>
<contrib>原作 </contrib>
</author>
<!-- May 2001 -->
</authorgroup>
<authorgroup>
<author>
<firstname>Marc</firstname>
<surname>Fonvieille</surname>
<contrib>更新 </contrib>
</author>
</authorgroup>
<!-- August 2010 -->
</sect1info>
<title>高级安装指南</title>
@ -3975,67 +3922,104 @@ Please press any key to reboot.</screen>
因您正要安装FreeBSD的机器不是没带显示器就是没有显卡。
您可能会问那怎么安装? 可以使用一个串行控制台。
串行控制台基本上是使用另外一台机器来充当主显示设备和键盘。
要这样做,只要执行下面的步骤:创建安装软件,请看 <xref
linkend="install-floppies">一节说明。</para>
要这样做,只要执行下面的步骤: 创建安装 USB 记忆棒,请看 <xref
linkend="install-boot-media">一节说明; 此外,
也可下载 ISO 映像文件, 具体请参阅 <xref
linkend="install-cdrom">。</para>
<para>按下面的步骤,修改这些软盘用来引导进入一个串行控制台:</para>
<para>要将安装介质改为使用串口控制台, 需要按下面这些步骤来操作
(如果使用 CDROM 则可跳过第一步)</para>
<procedure>
<step>
<title>通过启动软盘来引导进入一个串行控制台</title>
<indexterm>
<primary><command>mount</command></primary>
</indexterm>
<title>令安装 USB 记忆棒引导并进入串口控制台</title>
<indexterm>
<primary><command>mount</command></primary>
</indexterm>
<para>如果使用刚刚制作的 USB 记忆棒引导系统,
则 FreeBSD 会进入正常的安装模式。
我们希望引导到串口控制台来完成安装。
为了做到这一点, 需要在 &os; 中使用 &man.mount.8; 挂载
USB 盘。</para>
<para>如果您想用软盘FreeBSD将进入它通常的安装模式。
我们要把 FreeBSD 引导进入串行控制台,需要这样做,
您必须使用 &man.mount.8;命令在FreeBSD系统上挂接
<filename>boot.flp</filename> 的那个软盘。</para>
<screen>&prompt.root; <userinput>mount /dev/<replaceable>da0a</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
<screen>&prompt.root; <userinput>mount /dev/fd0 /mnt</userinput></screen>
<note>
<para>您需要根据实际情况修改挂点的名称。</para>
</note>
<para>现在您已经挂上了软盘,
需要进入 <filename class="directory">/mnt</filename>
目录</para>
<para>现在挂好了记忆棒, 您需要对其进行配置令其进入串口控制台。
为此, 需要在 USB 记忆棒中的 <filename>loader.conf</filename>
文件中加入下面的这行配置</para>
<screen>&prompt.root; <userinput>cd /mnt</userinput></screen>
<screen>&prompt.root; <userinput>echo 'console="comconsole"' &gt;&gt; <replaceable>/mnt</replaceable>/boot/loader.conf</userinput></screen>
<para>这儿是您必须设置软盘引导进入串行控制台的地方。
您必须制作一个包含
<literal>/boot/loader -h</literal> 这行的叫做
<filename>boot.config</filename> 的文件。
所有这些是为了给引导程序一个标记以引导进入串行控制台。</para>
<para>这样就完成了对 USB 记忆棒的配置, 您应使用 &man.umount.8;
命令将其卸下:</para>
<screen>&prompt.root; <userinput>echo "/boot/loader -h" &gt; boot.config</userinput></screen>
<screen>&prompt.root; <userinput>umount <replaceable>/mnt</replaceable></userinput></screen>
<para>现在您已经正确配置好了软盘,您必须使用 &man.umount.8;
命令卸下软盘。</para>
<screen>&prompt.root; <userinput>cd /</userinput>
&prompt.root; <userinput>umount /mnt</userinput></screen>
<para>现在您可以从软盘驱动器中取出软盘了。</para>
</step>
<para>现在就可以拔下 USB 记忆棒并进入这一过程的第三步了。</para>
</step>
<step>
<title>连接您的 Null-modem 线</title>
<title>令安装 CD 引导并进入串口控制台</title>
<indexterm>
<primary><command>mount</command></primary>
</indexterm>
<para>如果您直接使用 ISO 映像 (see <xref
linkend="install-cdrom">) 制作的 CD 引导,
则 &os; 会引导进入正常的安装模式。
我们希望引导到串口控制台来完成安装。
为了做到这一点, 您需要展开、 修改并重新生成 ISO
文件, 然后再刻录光盘。</para>
<indexterm><primary>null modem cable</primary></indexterm>
<para>在保存例如
<filename>&os;-<replaceable>8.1</replaceable>-RELEASE-<replaceable>i386</replaceable>-disc1.iso</filename>
ISO 的 &os; 系统上用 &man.tar.1; 工具提取全部文件:</para>
<para>您现在需要一根
<link linkend="term-cables-null">null modem线</link>
来连接两台机器。只要连接两台机器的串口。
<emphasis>普通的串行线是不行的</emphasis>
您需要使用一根null modem的线
因为它在一些十字交叉口有金属线。</para>
</step>
<screen>&prompt.root; <userinput>mkdir <replaceable>/path/to/headless-iso</replaceable></userinput>
&prompt.root; <userinput>tar -C <replaceable>/path/to/headless-iso</replaceable> -pxvf &os;-<replaceable>8.1</replaceable>-RELEASE-<replaceable>i386</replaceable>-disc1.iso</userinput></screen>
<step>
<title>开始启动安装</title>
<para>接下来需要对其进行配置令其进入串口控制台。
为此, 需要在从 ISO 映像中提取的 <filename>loader.conf</filename>
文件中加入下面的这行配置:</para>
<para>现在开始启动安装。把 <filename>boot.flp</filename>
的那张软盘插入软盘驱动器,然后开启电源。</para>
</step>
<screen>&prompt.root; <userinput>echo 'console="comconsole"' &gt;&gt; <replaceable>/path/to/headless-iso</replaceable>/boot/loader.conf</userinput></screen>
<para>最后, 从修改好的目录树中创建新的 ISO 映像。
这里我们使用通过 <filename
role="package">sysutils/cdrtools</filename> port 安装的
&man.mkisofs.8; 工具来完成:</para>
<screen>&prompt.root; <userinput>mkisofs -v -b boot/cdboot -no-emul-boot -r -J -V "<replaceable>Headless_install</replaceable>" \
-o <replaceable>Headless-</replaceable>&os;-<replaceable>8.1</replaceable>-RELEASE-<replaceable>i386</replaceable>-disc1.iso <replaceable>/path/to/headless-iso</replaceable></userinput></screen>
<para>这样就完成了对 ISO 映像的配置,
您可以使用您熟悉的工具将其刻录到 CD-R 上了。</para>
</step>
<step>
<title>连接 Null-modem 线</title>
<indexterm><primary>null-modem 线</primary></indexterm>
<para>现在需要一根
<link linkend="term-cables-null">null-modem 线</link>
来连接两台机器。 只要连接两台机器的串口。
<emphasis>这里不能使用普通的串口线</emphasis>
而必须使用 null-modem
线, 因为它需要一些内部交叉的连线。</para>
</step>
<step>
<title>开始启动安装</title>
<para>现在可以开始安装了。
将 USB 记忆棒插到您准备进行 headless 安装的机器上,
然后开机。 如果您使用的是 CDROM
则在开机之后立即将光盘放进光驱。</para>
</step>
<step>
<title>连接您的无头机器</title>
@ -4045,16 +4029,18 @@ Please press any key to reboot.</screen>
<para>现在您已经通过&man.cu.1;连接到了那台机器。</para>
<screen>&prompt.root; <userinput>cu -l /dev/cuad0</userinput></screen>
<screen>&prompt.root; <userinput>cu -l /dev/cuau0</userinput></screen>
<para>在 &os; 7.X 上应使用下面的命令:</para>
<screen>&prompt.root; <userinput>cu -l /dev/cuad0</userinput></screen>
</step>
</procedure>
<para>就这样! 您已经能够通过您的 <command>cu</command> session
对话来控制那台 <quote>无头</quote>机器了。
它将要求您把 <filename>kern1.flp</filename>
的那张软盘插入驱动器, 然后它将提示选择使用哪种终端。
只要选择 FreeBSD 的彩色控制台, 然后继续您的安装。</para>
<para>这样就可以了! 您现在可以通过 <command>cu</command>
会话来控制那台 headless 的机器了。 接着系统会提示选择终端类型。 选择
FreeBSD 彩色控制台并继续安装!</para>
</sect2>
</sect1>
@ -4118,7 +4104,8 @@ Please press any key to reboot.</screen>
<para>目录中包含下面一些映像文件:</para>
<table frame="none">
<title>FreeBSD 6.<replaceable>X</replaceable> 和 7.<replaceable>X</replaceable> ISO 映像文件名和含意</title>
<title>FreeBSD 7.<replaceable>X</replaceable> 和 8.<replaceable>X</replaceable>
ISO 映像文件名和含义</title>
<tgroup cols="2">
<thead>
@ -4131,49 +4118,97 @@ Please press any key to reboot.</screen>
<tbody>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-bootonly.iso</filename></entry>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-bootonly.iso</filename></entry>
<entry>引导 FreeBSD 内核并启动安装界面所需的全部数据。
安装文件可以从 FTP 或其他安装源获得。</entry>
<entry>这个 CD 映像可以让您从光驱启动并进入安装过程,
但它并不提供用于支持从 CD 直接安装 &os; 所需的文件。
在从 CD 引导之后, 您需要通过网络
(例如从 FTP 服务器) 来完成安装。</entry>
</row>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架构名</replaceable>-disc1.iso</filename></entry>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-dvd1.iso.gz</filename></entry>
<entry>安装 FreeBSD 所需的全部文件,
以及一份用于与 <application>sysinstall</application> 中的
<quote>Repair</quote>(修复) 机制联用的
<quote>现场文件系统</quote>。</entry>
<entry>这个 DVD 映像包括用于安装 FreeBSD
操作系统基本组件、 预编译包和文档所需的全部文件。
它也支持引导进入基于
<quote>livefs</quote> 的修复模式。</entry>
</row>
<row>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-memstick.img</filename></entry>
<entry>这个映像可以写进 USB 记忆棒,
用于引导系统并完成安装。 它也支持引导进入基于
<quote>livefs</quote> 的修复模式。
这个版本的映像中包含了文档所需要的全部文件,
但不提供其他包。 &os;&nbsp;7.3
和更早版本中没有这个文件。</entry>
</row>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架构名</replaceable>-disc2.iso</filename></entry>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-disc1.iso</filename></entry>
<entry>尽可能多的第三方软件包。</entry>
<entry>这个 CD 映像包含了 &os; 操作系统的基本组件和文档包,
但不包括其它包。</entry>
</row>
<row>
<entry><filename><replaceable>version</replaceable>-RELEASE-<replaceable>arch</replaceable>-docs.iso</filename></entry>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-disc2.iso</filename></entry>
<entry>这个 CD 映像包含了能填满光盘的尽可能多的第三方软件包。
在 &os;&nbsp;8.0 和更高版本中不提供这个映像。</entry>
</row>
<row>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-disc3.iso</filename></entry>
<entry>另一个包含了能填满光盘的尽可能多的第三方软件包的 CD 映像。
在 &os;&nbsp;8.0 和更高版本中不提供这个映像。</entry>
</row>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-docs.iso</filename></entry>
<entry>&os; 文档。</entry>
</row>
<row>
<entry><filename>&os;-<replaceable>版本</replaceable>-RELEASE-<replaceable>架构</replaceable>-livefs.iso</filename></entry>
<entry>这个 CD 映像包含了用以支持引导进入基于
<quote>livefs</quote> 的修复模式,
但不包括直接从 CD 安装所需的文件。</entry>
</row>
</tbody>
</tgroup>
</table>
<para>您 <emphasis>必须</emphasis> 下载 bootonly
ISO 镜像 (如果有的话) 或第一张光盘的镜像之一。 不需要两个都下载,
因为第一张光盘包括了 bootonly ISO 的全部内容。</para>
<note>
<para>&os;&nbsp;7.X 系列在 &os;&nbsp;7.3 之前的版本, 以及
&os;&nbsp;8.X 系列在 &os;&nbsp;8.1
之前的版本使用不同的命名习惯。 它们的 ISO
文件名不使用
<literal>&os;-</literal> 前缀。</para>
</note>
<para>如果访问 Internet 的价格便宜, 建议使用 bootonly ISO。
这样您可以安装 &os; 并从网上通过 ports/packages 系统 (参见
<xref linkend="ports">) 根据需要下载和安装第三方软件包。</para>
<para>您 <emphasis>必须</emphasis> 下载
<literal>bootonly</literal> ISO 映像 (如果有)
或 <literal>disc1</literal> 的映像其中的一个。
没有必要都下载, 因为 <literal>disc1</literal>
映像包含了 <literal>bootonly</literal>
ISO 映像中的全部内容。</para>
<para>如果您正打算安装 &os;
并同时选择一些第三方软件包,
则可以下载第一张光盘的镜像文件。</para>
<para>如果您的 Internet 带宽很廉价,
则应使用 <literal>bootonly</literal> ISO。
它能安装 &os; 而您可以根据需要使用 ports/packages
系统来下载并安装第三方软件 (参见
<xref linkend="ports">)。</para>
<para>其它的映像盘也是很有用的,但不是必须的,
<para>如果打算安装 &os; 并安装常用的软件包,
则应使用 <literal>dvd1</literal>。</para>
<para>其它的映像盘也很有用, 但不是必须的,
尤其是在您有高速的网络连接时。</para>
</step>
@ -4381,7 +4416,7 @@ Please press any key to reboot.</screen>
<indexterm>
<primary>installation (安装)</primary>
<secondary>network (网络)</secondary>
<tertiary>serial (串口, SLIP 或 PPP)</tertiary>
<tertiary>serial (串口, PPP)</tertiary>
</indexterm>
<indexterm>
<primary>installation (安装)</primary>
@ -4395,7 +4430,7 @@ Please press any key to reboot.</screen>
</indexterm>
<para>可用的网络安装类型有三种。
以太网 (标准的以太网控制器)、 串口
(SLIP 或 PPP) 以及 并口 (PLIP (laplink 线缆))。</para>
(PPP) 以及 并口 (PLIP (laplink 线缆))。</para>
<para>如果希望以最迅速的方式完成网络安装,
那么以太网适配器当然就是首选! FreeBSD 支持绝大多数常见 PC
@ -4416,11 +4451,6 @@ Please press any key to reboot.</screen>
如果您不知道这些信息, 则应在进行这种安装 <emphasis>之前</emphasis>
向系统管理员或 ISP 询问。</para>
<para> SLIP 支持是相当原始的并且被限制在主要对hard-wired 的连接,
就像一台膝上型计算机与另一台计算机间的串行线。
现在的SLIP的安装还没有提供拨号功能这个连接应该是 hard-wired
用PPP工具提供的这种便利性应该首先尽可能被用于 SLIP 设备。</para>
<para>如果您使用一个 MODEM那您就只有 PPP
这一种选择了。在您安装的过程中,
要确定您能很容易地获得完整且快速的关于您服务提供商的信息。</para>
@ -4437,8 +4467,8 @@ Please press any key to reboot.</screen>
如果您有一些问题,可以使用 <command>set log local ...</command>
命令将日志显示在屏幕上。</para>
<para>您也可以通过并口电缆连接到另外一台FreeBSD
2.0或以后的版本)机器上进行安装,您可以考虑使用
<para>您也可以通过并口电缆连接到另外一台
FreeBSD 机器上进行安装,您可以考虑使用
<quote>laplink</quote> 并口电缆进行安装。通过并口安装要比通过串口
(最高 50&nbsp;kbytes/sec安装快得多。</para>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.137
Original Revision: 1.139
$FreeBSD$
-->
@ -54,7 +54,7 @@
<indexterm><primary>4.4BSD-Lite</primary></indexterm>
<para>&os; 是一个支持
Intel (x86 和 &itanium;)AMD64<trademark>Alpha</trademark>Sun
Intel (x86 和 &itanium;)AMD64 Sun
&ultrasparc; 计算机的基于 4.4BSD-Lite 的操作系统。
到其他体系结构的移植也在进行中。
您也可以阅读 <link linkend="history">&os; 的历史</link>
@ -105,14 +105,13 @@
<listitem>
<para>&os; 是一个 <emphasis>32 位</emphasis>操作系统
(在 Alpha&itanium;AMD64和 &ultrasparc; 上是<emphasis>64 位</emphasis>)
(在 &itanium;AMD64和 &ultrasparc; 上是<emphasis>64 位</emphasis>)
并且从开始就是如此设计的。</para>
</listitem>
<indexterm>
<primary>X Window 系统</primary>
<seealso>XFree86</seealso>
</indexterm>
<primary>X Window 系统</primary>
</indexterm>
<listitem>
<para>业界标准的 <emphasis>X Window 系统</emphasis>
@ -324,7 +323,6 @@
<indexterm>
<primary>X Window 系统</primary>
<secondary>XFree86</secondary>
</indexterm>
<indexterm>
<primary>X Window 系统</primary>
@ -608,7 +606,8 @@
<para>其后在 2005 年 7 月又建立了 RELENG_6 分支。 而 6.X 分支上的第一个版本,
即 6.0-RELEASE 则是在 2005 年 11 月发布的。 这个分支的最后一个版本,
6.4-RELEASE 是在
2008 年 11 月 发布的。 RELENG_6 分支上不再会有发布版本了。</para>
2008 年 11 月 发布的。 RELENG_6 分支上不再会有发布版本了。 这是最后一个支持
Alpha 硬件架构的版本。</para>
<para>RELENG_7 分支于 2007 年 10 月创建。
第一个这个分支的发行版是 7.0-RELEASE 这个版本是 2008 年 2 月发布的。
@ -616,8 +615,9 @@
RELENG_7 还将会有其它后续的发布版本。</para>
<para>其后在 2009 年 8 月又建立了 RELENG_8 分支。
8.X 分支的第一个版本, 8.0-RELEASE 是在 &rel.current.date;
发布的。</para>
8.X 分支的第一个版本, 8.0-RELEASE 是在 2009 年 11 月发布的。
最新的 &rel.current;-RELEASE 于 &rel.current.date; 发布。
RELENG_8 还将会有其它后续的发布版本。</para>
<para>目前, 中长期的开发项目继续在
9.X-CURRENT (主干, trunk) 分支中进行, 而 9.X 的
@ -857,7 +857,7 @@
&pentium;&nbsp;II、
&pentium;&nbsp;III、
&pentium;&nbsp;4(或者兼容系统)、
&xeon;、DEC <trademark>Alpha</trademark>
&xeon;、
和 Sun &ultrasparc; 的计算机系统上。
它主要以 加州大学伯克利分校 的
CSRG 研究小组的软件为基础,并加入了 NetBSD、OpenBSD、386BSD

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.20
Original Revision: 1.21
$FreeBSD$
-->
<chapter id="jails">
@ -271,6 +271,11 @@
<programlisting>jail_enable="YES" # 如果设为 NO 则表示不自动启动 jail
jail_list="<replaceable>www</replaceable>" # 以空格分隔的 jail 名字列表</programlisting>
<note>
<para>在 <varname>jail_list</varname> 中的名字中,
可以使用字母和数字, 而不应使用其他字符。</para>
</note>
</step>
<step>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
Original Revision: 1.194
Original Revision: 1.195
$FreeBSD$
-->
@ -245,7 +245,7 @@ following line in &man.loader.conf.5:
您将在这里编辑定制的内核配置; 以及
<filename>compile</filename> 编译过程中的文件将放置在这里。
<replaceable>arch</replaceable> 表示
<filename>i386</filename>、 <filename>alpha</filename>、
<filename>i386</filename>、
<filename>amd64</filename>、 <filename>ia64</filename>、
<filename>powerpc</filename>、 <filename>sparc64</filename>
<filename>pc98</filename> (在日本比较流行的另一种
@ -423,7 +423,7 @@ following line in &man.loader.conf.5:
<author>
<firstname>Joel</firstname>
<surname>Dahl</surname>
<contrib>Updated for &os; 6.X by </contrib>
<contrib>Updated by </contrib>
</author>
</authorgroup>
</sect1info>
@ -451,7 +451,7 @@ following line in &man.loader.conf.5:
<filename>/usr/src/sys/conf/NOTES</filename>
找到。</para>
<para>从 &os; 5.0 开始, 配置文件中新增了 <literal>include</literal> 语句。
<para>配置文件中还可以使用 <literal>include</literal> 语句。
这个语句能够在内核配置文件中直接引用其他配置文件的内容,
使得您能够使用较小的、 仅包含相对于现存配置的变动而减少维护所需的工作。
例如, 如果您只需对 <filename>GENERIC</filename> 内核进行少量定制,
@ -501,8 +501,8 @@ options IPDIVERT
<programlisting>machine i386</programlisting>
<para>这是机器的架构, 只能是
<literal>alpha</literal>, <literal>amd64</literal>,
<para>这是机器的架构, 只能是
<literal>amd64</literal>,
<literal>i386</literal>, <literal>ia64</literal>,
<literal>pc98</literal>, <literal>powerpc</literal>, 或
<literal>sparc64</literal> 中的一种。</para>
@ -655,8 +655,7 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
<programlisting>options PSEUDOFS # Pseudo-filesystem framework</programlisting>
<para>在 6.X 内核中,
如果希望使用 <literal>PROCFS</literal>
<para>如果希望使用 <literal>PROCFS</literal>
就必须加入 <literal>PSEUDOFS</literal> 的支持。</para>
<programlisting>options GEOM_GPT # GUID Partition Tables.</programlisting>
@ -670,14 +669,27 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
<programlisting>options COMPAT_FREEBSD4 # Compatible with &os;4</programlisting>
<para>为了支持在旧版本的&os;下编译的程序,该选项在&os;&nbsp;5.X &i386;和Alpha systems下需要打开。
最好在所有的&i386;和Alpha systems下打开这个选项因为可能要运行老应用程序。
在5.X才开始支持的平台比如ia64和&sparc64;,就不需要这个选项。</para>
<para>如果希望支持在旧版 &os; 上编译的使用旧式接口的应用程序,
就需要加入这一选项。 一般来说, 推荐在所有的 &i386;
系统上启用这个选项, 因为难免可能会用到一些旧的应用;
到 5.X 才开始支持的平台, 如 ia64 和 &sparc64;
则不需要这个选项。</para>
<programlisting>options COMPAT_FREEBSD5 # Compatible with &os;5</programlisting>
<para>对于 &os;&nbsp;6.X 和更高版本而言, 如果希望在其上运行为 &os;&nbsp;5.X
版本联编的、 用到 &os;&nbsp;5.X 系统调用接口的程序, 则需要使用这个选项。</para>
<para>如果希望支持在 &os;&nbsp;5.X 版本上编译, 且使用
&os;&nbsp;5.X 系统调用接口的应用程序, 则应加上这个选项。</para>
<programlisting>options COMPAT_FREEBSD6 # Compatible with &os;6</programlisting>
<para>如果希望支持在 &os;&nbsp;6.X 版本上编译, 且使用
&os;&nbsp;6.X 系统调用接口的应用程序, 则应加上这个选项。</para>
<programlisting>options COMPAT_FREEBSD7 # Compatible with &os;7</programlisting>
<para>如果希望支持在 &os;&nbsp;8 以上版本的操作系统中运行在
&os;&nbsp;7.X 版本上编译, 且使用
&os;&nbsp;7.X 系统调用接口的应用程序, 则应加上这个选项。</para>
<programlisting>options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI</programlisting>
@ -733,7 +745,7 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
如果您不确定是否应该这样做的话, 一般应该打开它。</para>
<note>
<para>请注意在 &os; 8.0-CURRENT 及以后的版本,所有的互斥体默认都是自适应的,
<para>请注意在 &os; 8.0-RELEASE 及以后的版本,所有的互斥体默认都是自适应的,
除非在编译时使用 <literal>NO_ADAPTIVE_MUTEXES</literal> 选项,
明确的指定为非自适应。因此内核全局锁Giant目前默认也是自适应的,
而且 <literal>ADAPTIVE_GIANT</literal> 选项已经从内核配置文件中移出。</para>
@ -750,9 +762,7 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
要支持多处理器, 还需要加上 <literal>options SMP</literal>。</para>
<note>
<para>The apic device exists only on the i386 architecture, this
configuration line should not be used on other
architectures.</para>
<para>只有在 i386 和 amd64 平台上才存在 apic 设备, 在其他硬件平台上不应使用它。</para>
</note>
<programlisting>device eisa</programlisting>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
Original Revision: 1.133
Original Revision: 1.134
$FreeBSD$
-->
@ -545,9 +545,7 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<title>显示字体</title>
<indexterm><primary>X11 True Type 字体服务器</primary></indexterm>
<para>安装 <application>&xorg;</application> 服务器
(<filename role="package">x11-servers/xorg-server</filename>)
或 <application>&xfree86;</application> 服务器
(<filename role="package">x11-servers/XFree86-4-Server</filename>)
(<filename role="package">x11-servers/xorg-server</filename>)£¬
然后安装对应语言的 &truetype; 字体。 请设置正确的地区信息,
这将让您能够在菜单和其它地方看到所选择的语言。</para>
</sect3>

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
Original Revision: 1.138
Original Revision: 1.140
$FreeBSD$
-->
@ -132,7 +132,7 @@
<para>这包括一些基于命令行的程序,例如
<application>mutt</application>、
<application>pine</application>、<application>elm</application>
<application>alpine</application>、<application>elm</application>
和 <command>mail</command>,以及类似 <application>balsa</application>、
<application>xfmail</application> 这样的 <acronym>GUI</acronym> 程序。
此外,还有我们更<quote>熟悉的</quote>WWW 浏览器这样的程序。
@ -1542,7 +1542,7 @@ define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl</programlis
<application>evolution</application> 以及
<application>balsa</application> 这样的图形界面程序,
也可以选择类似
<application>mutt</application>、 <application>pine</application>
<application>mutt</application>、 <application>alpine</application>
或 <command>mail</command> 这样的控制台程序,
或者某些大型机构使用的 web 界面。</para>
@ -1758,34 +1758,34 @@ EOT</screen>
</sect2>
<sect2 id="pine-command">
<title>pine</title>
<sect2 id="alpine-command">
<title>alpine</title>
<para><application>pine</application> 主要是针对初学者设计的,
<para><application>alpine</application> 主要是针对初学者设计的,
但也提供了一些高级功能。</para>
<warning>
<para>过去, <application>pine</application> 软件被发现有许多远程漏洞,
<para>过去, <application>alpine</application> 软件被发现有许多远程漏洞,
这些漏洞会允许远程的攻击者在用户的本地系统上,
通过发送精心炮制的邮件来执行任意的代码。 所有的
<emphasis>已知</emphasis> 问题都已经被修正了, 但
<application>pine</application> 的代码是以很不安全的风格编写的,
<application>alpine</application> 的代码是以很不安全的风格编写的,
并且 &os; 安全官相信仍然有一些尚未被发现的安全漏洞。
您应当考虑并承担安装
<application>pine</application> 可能带来的风险。</para>
<application>alpine</application> 可能带来的风险。</para>
</warning>
<para>最新版本的 <application>pine</application>
<para>最新版本的 <application>alpine</application>
可以通过使用 <filename
role="package">mail/pine4</filename> port 来安装。
装好之后, <application>pine</application>
role="package">mail/alpine</filename> port 来安装。
装好之后, <application>alpine</application>
可以通过下面的命令启动:</para>
<screen>&prompt.user; <userinput>pine</userinput></screen>
<screen>&prompt.user; <userinput>alpine</userinput></screen>
<para>第一次启动 <application>pine</application> 时,
<para>第一次启动 <application>alpine</application> 时,
它会显示出一个欢迎页, 并给出简要的介绍,
以及 <application>pine</application> 开发小组要求用户匿名发送一封邮件,
以及 <application>alpine</application> 开发小组要求用户匿名发送一封邮件,
以便帮助他们了解有多少用户在使用他们开发的客户程序的请求。
要发送这封匿名的邮件, 请按 <keycap>Enter</keycap>
您也可以按 <keycap>E</keycap> 退出,
@ -1803,7 +1803,7 @@ EOT</screen>
甚至管理地址簿等等的快捷方式。
主菜单下面是完成各种功能的快捷键说明。</para>
<para>由 <application>pine</application>
<para>由 <application>alpine</application>
打开的默认目录是 <filename class="directory">inbox</filename>。
要查看邮件索引, 应按
<keycap>I</keycap> 或选择下面所示的 <guimenuitem>MESSAGE INDEX</guimenuitem>
@ -1826,7 +1826,7 @@ EOT</screen>
</mediaobject>
<para>在上面的截屏中, 使用
<application>pine</application> 显示了一封示例邮件。
<application>alpine</application> 显示了一封示例邮件。
在屏幕底部也显示了快捷键供参考。 其中的一个例子是 <keycap>r</keycap> 键,
它告诉 <acronym>MUA</acronym> 回复正显示的邮件。</para>
@ -1836,14 +1836,14 @@ EOT</screen>
</imageobject>
</mediaobject>
<para>在 <application>pine</application> 中回复邮件,
<para>在 <application>alpine</application> 中回复邮件,
是通过 <application>pico</application> 编辑器完成的,
后者默认情况下会随 <application>pine</application> 一起安装。
后者默认情况下会随 <application>alpine</application> 一起安装。
而 <application>pico</application> 工具使得浏览邮件变得更加简单,
并且要比 &man.vi.1; 或 &man.mail.1; 更能容忍误操作。
回复写好之后, 可以用
<keycombo action="simul"><keycap>Ctrl</keycap><keycap>X</keycap>
</keycombo> 来发出它。 此前, <application>pine</application>
</keycombo> 来发出它。 此前, <application>alpine</application>
程序会要求确认。</para>
<mediaobject>
@ -1852,9 +1852,9 @@ EOT</screen>
</imageobject>
</mediaobject>
<para><application>pine</application> 程序可以通过使用主菜单中的
<para><application>alpine</application> 程序可以通过使用主菜单中的
<guimenuitem>SETUP</guimenuitem> 选项来进行定制。
请参考 <ulink url="http://www.washington.edu/pine/"></ulink>
请参考 <ulink url="http://www.washington.edu/alpine/"></ulink>
来了解更多信息。</para>
</sect2>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
Original Revision: 1.485
Original Revision: 1.490
$FreeBSD$
-->
@ -411,20 +411,20 @@ SSH2 HostKey: 1024 e8:3b:29:7b:ca:9f:ac:e9:45:cb:c8:17:ae:9b:eb:55 /etc/ssh/ssh_
<example>
<title>通过 SSH 检出整个 <filename>src/</filename>
代码树:</title>
<screen>&prompt.user; <userinput>cvs -d freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs co src</userinput>
The authenticity of host 'anoncvs.freebsd.org (128.46.156.46)' can't be established.
DSA key fingerprint is 52:02:38:1a:2f:a8:71:d3:f5:83:93:8d:aa:00:6f:65.
<screen>&prompt.user; <userinput>cvs -d anoncvs@anoncvs1.FreeBSD.org:/home/ncvs co src</userinput>
The authenticity of host 'anoncvs1.freebsd.org (216.87.78.137)' can't be established.
DSA key fingerprint is 53:1f:15:a3:72:5c:43:f6:44:0e:6a:e9:bb:f8:01:62.
Are you sure you want to continue connecting (yes/no)? <userinput>yes</userinput>
Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known hosts.</screen>
Warning: Permanently added 'anoncvs1.freebsd.org' (DSA) to the list of known hosts.</screen>
</example>
<example>
<title>检出 6-STABLE 分支中的 &man.ls.1; 版本:</title>
<title>检出 8-STABLE 分支中的 &man.ls.1; 版本:</title>
<screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.tw.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput>
<emphasis>在提示符处,输入任意密码</emphasis> <quote>password</quote>。
&prompt.user; <userinput>cvs co -rRELENG_6 ls</userinput>
&prompt.user; <userinput>cvs co -rRELENG_8 ls</userinput>
</screen>
</example>
@ -434,7 +434,7 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
<screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.tw.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput>
<emphasis>在提示符处,输入任意密码</emphasis> <quote>password</quote>。
&prompt.user; <userinput>cvs rdiff -u -rRELENG_5_3_0_RELEASE -rRELENG_5_4_0_RELEASE ls</userinput>
&prompt.user; <userinput>cvs rdiff -u -rRELENG_8_0_0_RELEASE -rRELENG_8_1_0_RELEASE ls</userinput>
</screen>
</example>
@ -542,7 +542,7 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
<application>CTM</application> 分发列表。
&a.ctm-cvs-cur.name; 支持完整的 CVS 树。
&a.ctm-src-cur.name; 支持最新的开发分支。
&a.ctm-src-4.name; 支持 4.X 发行分支,
&a.ctm-src-7.name; 支持 7.X 发行分支,
等等。。(如果您不知道如何订阅邮件列表,
点击上面的列表名或者到
&a.mailman.lists.link; 点击您希望订阅的列表。
@ -818,10 +818,8 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
<para><application>csup</application> 是用 C 语言对
<application>CVSup</application> 软件的重写。 它最大的好处是,
这个程序更快一些, 并且也不需要依赖于
Modula-3 语言, 因此也就不需要安装后者。 另外, 如果您使用 &os; 6.2
或更新版本, 就可以直接使用, 因为它成为了基本系统的一部分。
较早的 &os; 版本的基本系统中并不包含 &man.csup.1; 但可以通过
<filename role="package">net/csup</filename> port 或预编译包来安装。
Modula-3 语言, 因此也就不需要安装后者。 另外,
您可以直接使用它, 因为它是基本系统的一部分。
假如您决定使用
<application>csup</application> 则可以跳过安装 <application>CVSup</application>
这一步, 并在文章中余下部分提到的 <application>CVSup</application> 改为
@ -842,19 +840,12 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
系统,会花费相当的时间和磁盘空间来下载编译。</para>
<note>
<para>如果想在没有安装 <application>&xfree86;</application>
或 <application>&xorg;</application> 的计算机, 例如服务器上使用
<para>如果想在没有安装 <application>&xorg;</application> 的计算机,
例如服务器上使用
<application>CVSup</application> 则只能使用不包含
<application>CVSup</application> <acronym>GUI</acronym>
的 <filename role="package">net/cvsup-without-gui</filename>。</para>
</note>
<para>如果希望在 &os; 6.1 或更早版本中安装 <application>csup</application>
则可以从 &os; 的 <link linkend="ports">packages collection</link> 中安装预编译的
<filename role="package">net/csup</filename> 包; 如果希望自行从源代码编译
<application>csup</application>
也可以用 <filename role="package">net/csup</filename>
port 来安装。</para>
</sect2>
<sect2 id="cvsup-config">
@ -992,8 +983,8 @@ Warning: Permanently added 'anoncvs.freebsd.org' (DSA) to the list of known host
<para><xref linkend="cvs-tags"> 包含了用户可能感兴趣的分支标签。
当在 <application>CVSup</application> 的配置文件中指定标签的时候,必须用
<literal>tag=</literal> 开头
(<literal>RELENG_4</literal> 会变成
<literal>tag=RELENG_4</literal>)。
(<literal>RELENG_8</literal> 会变成
<literal>tag=RELENG_8</literal>)。
记住只有 <literal>tag=.</literal> 可以用于
Ports Collection。</para>
@ -2315,6 +2306,7 @@ doc/zh_*</screen>
<para>&os;-8.1 的发行版分支, 只用于安全公告,
以及其他重要更新。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RELENG_8_0</term>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Documentation Project
Original Revision: 1.135
Original Revision: 1.139
$FreeBSD$
-->
@ -122,7 +122,7 @@
<author>
<firstname>Marc</firstname>
<surname>Fonvieille</surname>
<contrib>Enhanced for &os;&nbsp;5.X by </contrib>
<contrib>Enhanced by </contrib>
<!-- 13 September 2004 -->
</author>
</authorgroup>
@ -341,15 +341,15 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
</sect2info>
<title>利用多个声源</title>
<para>同时有多个声源的声音在播放, 这是完全可能的, 例如当
<para>通常而言, 会希望多个音源能够同时播放, 例如,
<application>esound</application> 或者 <application>artsd</application>
不支持与其它程序共享音频设备。</para>
就可能不支持与其它程序共享音频设备。</para>
<para>FreeBSD 可以通过 <emphasis>虚拟声道(Virtual Sound
Channels)</emphasis> 来达到这样的效果, 它可以用 &man.sysctl.8; 来启用。
虚拟的声道可以能过在内核里混合声音来混合声卡里播放的声道。</para>
<para>使用条sysctl命令来设置虚拟声道的数目。 如果您是
<para>使用条sysctl命令来设置虚拟声道的数目。 如果您是
<username>root</username> 用户, 执行下面的操作:</para>
<screen>&prompt.root; <userinput>sysctl dev.pcm.0.play.vchans=4</userinput>
&prompt.root; <userinput>sysctl dev.pcm.0.rec.vchans=4</userinput>
@ -371,12 +371,9 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
首先需要关闭所有使用该设备的程序, 如音乐播放器或声音服务。</para>
</note>
<para>如果不使用 &man.devfs.5; 就必须把应用程序指向
<filename>/dev/dsp0</filename>.<replaceable>x</replaceable>
其中 <replaceable>x</replaceable> 为0到3 因为在上面的例子里
<varname>dev.pcm.0.rec.vchans</varname> 被设为了4。
在使用 &man.devfs.5; 的系统中, 当应用程序请求 <filename>/dev/dsp0</filename>
时, 系统会自动为其分配一个而无需额外干预。</para>
<para>当应用程序请求 <filename>/dev/dsp0</filename>
时, 系统会自动为其分配正确的 <devicename>pcm</devicename>
设备。</para>
</sect2>
<sect2>
@ -629,7 +626,6 @@ MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
<para>在开始之前,您要了解显卡的类型以及它所用的芯片的类型。
尽管 <application>&xorg;</application>
和 <application>&xfree86;</application>
支持大量的显卡, 但能达到好的回放效果的却寥寥无几。
在X11运行时您可以使用命令 &man.xdpyinfo.1;
获得使用您的显卡的X服务器所支持的扩展列表。</para>
@ -668,8 +664,7 @@ kern.ipc.shmall=32768</programlisting>
到底哪个能工作很大程度上依赖于硬件。 首先,
下边描述的每一种方法在不同的硬件上都会有不同的品质。
其次, 在X11里的图像显示近来引起普遍的关注
随着 <application>&xorg;</application>
或 <application>&xfree86;</application> 的每一个版本,
随着 <application>&xorg;</application> 的每一个版本,
都会有很大的突破。</para>
<para>常见图像接口列表:</para>
@ -695,7 +690,7 @@ kern.ipc.shmall=32768</programlisting>
<sect3 id="video-interface-xvideo">
<title>XVideo</title>
<para><application>&xorg;</application> 和 <application>&xfree86; 4.X</application>
<para><application>&xorg;</application>
有种扩展叫做 <emphasis>XVideo</emphasis>
(或称Xvideo, Xv, xv)
它可以通过一个特殊的加速器直接把图像显示在可拖拉的对象里。

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.122
Original Revision: 1.126
$FreeBSD$
-->
@ -104,7 +104,7 @@
</authorgroup>
<authorgroup>
<author>
<contrib>为 &os; 6.1-RELEASE 进行了更新, 由 </contrib>
<contrib>更新 </contrib>
<othername>The &os; Documentation Project</othername>
</author>
</authorgroup>
@ -180,10 +180,10 @@
<application>inetd</application> 的服务启用 TCP wrapping
并阻止来自同一 IP 每分钟超过 60 次的请求。</para>
<para>初学的用户可能会很高兴地发现这些选项通常并不需要进行修改
前面提到的速率限制选项在您的服务器收到过量请求的连接时,
则会有效地发挥作用。 完整的参数列表,
可以在 &man.inetd.8; 联机手册中找到。</para>
<para>虽然我们会在下面介绍关于限制连接频率的选项
但初学的用户可能会很高兴地发现这些参数通常并不需要进行修改。
在收到超大量的连接请求时, 这些选项则有可能会发挥作用。
完整的参数列表, 可以在 &man.inetd.8; 联机手册中找到。</para>
<variablelist>
<varlistentry>
@ -1514,9 +1514,10 @@ Don't forget to update map ypservers on ellington.</screen>
<para>这两行将强制从服务器将映射与主服务器同步。
由于主服务器会尝试确保所有其 NIS 映射的变动都知会从服务器,
因此这些项并不是绝对必需的, 尽管如此,
强制更新能够保证这些对依赖于服务器的系统至关重要的口令信息及时地同步。
同时, 在繁忙的网络上, 有时也会出现映射同步更新不完全的情况。</para>
因此这些项并不是绝对必需的。 不过,
由于保持其他客户端的口令信息正确性十分重要, 而这则依赖于从服务器,
强烈推荐明确指定让系统时常强制更新口令映射。 对于繁忙的网络而言,
这一点尤其重要, 因为有时可能出现映射更新不完全的情况。</para>
<para>现在, 在从服务器上执行 <command>/etc/netstart</command>
就可以启动 NIS 服务了。</para>
@ -2248,10 +2249,7 @@ nis_client_flags="-S <replaceable>NIS domain</replaceable>,<replaceable>server</
</indexterm>
<para>DHCP 动态主机配置协议, 是一种让系统得以连接到网络上,
并获取所需要的配置参数手段。 FreeBSD 6.0 之前的版本,
采用的是 ISC (Internet Systems
Consortium) 的 DHCP 客户端 (&man.dhclient.8;) 实现。
更高版本使用的则是来自 OpenBSD&nbsp;3.7
并获取所需要的配置参数手段。 FreeBSD 使用来自 OpenBSD&nbsp;3.7
的 OpenBSD <command>dhclient</command>。
这里提供的所有关于 <command>dhclient</command> 的信息,
都是以 ISC 或 OpenBSD DHCP 客户端程序为准的。 DHCP
@ -2293,12 +2291,10 @@ nis_client_flags="-S <replaceable>NIS domain</replaceable>,<replaceable>server</
<sect2>
<title>FreeBSD 集成</title>
<para>FreeBSD 完全地集成了 ISC 或 OpenBSD 的 DHCP 客户端,
<command>dhclient</command> (取决于您运行的 &os; 版本)。
DHCP 客户端被安装程序直接支持,
并且是基本系统的一部分。
这使得您不再需要去了解那些已经运行了 DHCP 服务器的网络的具体配置参数。
从 FreeBSD 3.2 开始, 每一个发行版中均包含 <command>dhclient</command>。</para>
<para>&os; 完全地集成了 OpenBSD 的 DHCP 客户端,
<command>dhclient</command>。
DHCP 客户端支持在安装程序和基本系统中均有提供,
这使得您不再需要去了解那些已经运行了 DHCP 服务器的网络的具体配置参数。</para>
<indexterm>
<primary><application>sysinstall</application></primary>
</indexterm>
@ -3973,9 +3969,12 @@ DocumentRoot /www/someotherdomain.tld
<para>例如, 要将对于
<application>MySQL</application> 数据库服务器的支持加入
<acronym>PHP</acronym>5 只需简单地安装
<filename role="package">databases/php5-mysql</filename>
<filename>databases/php5-mysql</filename>。</para>
<!-- deactivate the filename link as there is no pkg-descr file for this port -->
<!--
<filename role="package">databases/php5-mysql</filename>
port。</para>
-->
<para>安装完扩展之后, 必须重新启动
<application>Apache</application> 服务器,
来令其适应新的配置变更:</para>
@ -4142,7 +4141,7 @@ DocumentRoot /www/someotherdomain.tld
<para><application>Samba</application> 软件包可以在您的 FreeBSD
安装盘上找到。 如果您没有在初次安装 FreeBSD
时安装 <application>Samba</application> 则可以通过 <filename
role="package">net/samba3</filename> port 或 package 来安装。</para>
role="package">net/samba34</filename> port 或 package 来安装。</para>
<!-- mention LDAP, Active Directory, WinBIND, ACL, Quotas, PAM, .. -->
@ -4152,7 +4151,7 @@ DocumentRoot /www/someotherdomain.tld
<title>配置</title>
<para>默认的 <application>Samba</application> 配置文件会以
<filename>/usr/local/share/examples/samba/smb.conf.default</filename>
<filename>/usr/local/share/examples/samba34/smb.conf.default</filename>
的名字安装。这个文件必须复制为
<filename>/usr/local/etc/smb.conf</filename> 并进行定制,
才能开始使用 <application>Samba</application>。</para>
@ -4280,18 +4279,14 @@ DocumentRoot /www/someotherdomain.tld
<para>假设您使用的是默认的 <literal>smbpasswd</literal>
后端, 则必须首先创建一个
<filename>/usr/local/private/smbpasswd</filename> 文件,
<filename>/usr/local/etc/samba/smbpasswd</filename> 文件,
来允许 <application>Samba</application> 对客户进行身份验证。
如果您打算让 &unix; 用户帐号能够从 &windows;
客户机上登录, 可以使用下面的命令:</para>
<screen>&prompt.root; <userinput>smbpasswd -a username</userinput></screen>
<note>
<para>从 <application>Samba</application> 3.0.23c 开始,
用于存在验证文件的实际目录变成了
<filename class="directory">/usr/local/etc/samba</filename>。
目前推荐使用的后端是 <literal>tdbsam</literal>
<para>目前推荐使用的后端是 <literal>tdbsam</literal>
您应使用下面的命令来添加用户帐号:</para>
<screen>&prompt.root; <userinput><command>pdbedit <option>-a</option> <option>-u</option> <replaceable>username</replaceable></command></userinput></screen>
@ -4309,7 +4304,7 @@ DocumentRoot /www/someotherdomain.tld
<sect2>
<title>启动 <application>Samba</application></title>
<para><filename role="package">net/samba3</filename> port
<para><filename role="package">net/samba34</filename> port
会增加一个新的用于控制
<application>Samba</application> 的启动脚本。 要启用这个脚本,
以便用它来完成启动、 停止或重启

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Documentation Project
Original Revision: 1.290
Original Revision: 1.291
$FreeBSD$
-->
@ -378,13 +378,13 @@ local: lsof-4.56.4.tgz remote: lsof-4.56.4.tgz
将下载您的应用软件的最新版本。 如果您使用 -RELEASE 版本的
FreeBSD, 它将会获得与您的版本相应的软件包版本。
您可以通过修改环境变量 <envar>PACKAGESITE</envar>
来改变这一行为。 例如, 如果您运行 &os;&nbsp;5.4-RELEASE
来改变这一行为。 例如, 如果您运行 &os;&nbsp;8.1-RELEASE
系统, 默认情况下 &man.pkg.add.1; 将尝试从
<literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5.4-release/Latest/</literal>
<literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.1-release/Latest/</literal>
下载预编译的软件包。 如果您希望强制 &man.pkg.add.1; 下载
&os;&nbsp;5-STABLE 的软件包, 则可以将 <envar>PACKAGESITE</envar>
&os;&nbsp;8-STABLE 的软件包, 则可以将 <envar>PACKAGESITE</envar>
设置为
<literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/</literal>。
<literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/</literal>。
</para>
</note>
@ -533,10 +533,7 @@ docbook =
<note>
<para>在 &os; 系统里对 <application>CVSup</application>
的实现叫作 <application>csup</application>。
它首次出现在 &os; 6.2中。 对于旧版本的 &os;
用户而言可以通过 port/package 安装
<filename role="package">net/csup</filename>。</para>
的实现叫作 <application>csup</application>。</para>
</note>
<para>在首次运行 <application>csup</application> 之前,
@ -706,7 +703,7 @@ docbook =
<listitem>
<para>一个 <filename>distinfo</filename> 文件。这个文件包括这些信息:
这些文件用来对下载后的文件校验和进行检查
(使用 &man.md5.1; 和 &man.sha256.1;)
(使用 &man.sha256.1;)
来确保在下载过程中文件没有被破坏。
</para>
</listitem>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.192
Original Revision: 1.195
$FreeBSD$
-->
@ -42,7 +42,7 @@
<para>如何设置用户级 PPP。</para>
</listitem>
<listitem>
<para>如何设置内核级 PPP。</para>
<para>如何设置内核级 PPP。 (仅限 &os; 7.X)。</para>
</listitem>
<listitem>
<para>如何设置 <acronym>PPPoE</acronym> (PPP over
@ -53,7 +53,7 @@
ATM)。</para>
</listitem>
<listitem>
<para>如何配置和安装 SLIP 客户端和服务器。</para>
<para>如何配置和安装 SLIP 客户端和服务器。 (仅限 &os; 7.X)。</para>
</listitem>
</itemizedlist>
@ -90,11 +90,12 @@
<devicename>ppp</devicename> 设备。</para>
<note>
<para>除非需要与其它 PPP 软件 (比如 <application>pppd</application>)
相区别, 在这一章中,
用户级 PPP 就简称为 <application>ppp</application>。
另外, 若没有额外的注明, 本章所介绍的所有命令都需要
<username>root</username> 权限。</para>
<para>在这章中, 如果没有特殊说明,
则 <application>ppp</application> 指的是用户态 PPP
除非需要和其它 PPP 软件, 例如
<application>pppd</application> (仅限 &os;&nbsp;7.X) 加以区分。
另外, 若没有额外的注明, 本章所介绍的所有命令都需要以
<username>root</username> 身份来运行权限。</para>
</note>
</sect1>
@ -133,6 +134,17 @@
<title>使用用户级 PPP</title>
<warning>
<para>从 &os; 8.0 开始, &man.uart.4; 驱动取代了
&man.sio.4; 驱动。 用以表示串口的设备节点由分别
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
并从
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户在升级时需要因应之对配置文件进行必要的更改。</para>
</warning>
<sect2>
<title>用户级 PPP</title>
@ -238,7 +250,7 @@
<secondary>configuration (配置)</secondary>
</indexterm>
<para> <command>ppp</command>和<command>pppd</command>(PPP的内核级实现)
<para> <command>ppp</command>和<command>pppd</command>(PPP的内核级实现 仅限 &os;&nbsp;7.X)
都使用 <filename class="directory">/etc/ppp</filename> 目录中的配置文件。 用户级 PPP
的例子可以在
<filename class="directory">/usr/share/examples/ppp/</filename> 中找到。</para>
@ -266,7 +278,7 @@
<programlisting>1 default:
2 set log Phase Chat LCP IPCP CCP tun command
3 ident user-ppp VERSION (built COMPILATIONDATE)
4 set device /dev/cuad0
4 set device /dev/cuau0
5 set speed 115200
6 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
7 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
@ -317,10 +329,10 @@
<listitem>
<para>标明modem要连接的端口号。
<devicename>COM1</devicename> 对应的设备是
<filename class="devicefile">/dev/cuad0</filename>
<filename class="devicefile">/dev/cuau0</filename>
而 <devicename>COM2</devicename>
对应的则是
<filename class="devicefile">/dev/cuad1</filename>。</para>
<filename class="devicefile">/dev/cuau1</filename>。</para>
</listitem>
</varlistentry>
@ -591,7 +603,9 @@ protocol: ppp</screen>
描述了如何用 &man.getty.8; 来启动拨号服务。</para>
<para>除了 <command>getty</command> 之外还有 <ulink
url="http://www.leo.org/~doering/mgetty/index.html">mgetty</ulink>
url="http://mgetty.greenie.net/">mgetty</ulink> (可通过
<filename role="package">comms/mgetty+sendfax</filename> port
来安装)
它是 <command>getty</command> 的智能版本, 是按照拨号线的思想设计的。</para>
<para>使用 <command>mgetty</command> 的好处是它能积极地与 modem 进行
@ -702,11 +716,11 @@ exec /usr/sbin/ppp -direct $IDENT</programlisting>
set debug phase lcp chat
set timeout 0
ttyd0:
ttyu0:
set ifaddr 203.14.100.1 203.14.100.20 255.255.255.255
enable proxy
ttyd1:
ttyu1:
set ifaddr 203.14.100.1 203.14.100.21 255.255.255.255
enable proxy</programlisting>
@ -716,7 +730,7 @@ ttyd1:
<para> <literal>default:</literal>项在每次会话时都会加载。 每个在
<filename>/etc/ttys</filename> 中启用的行都必须为其创建一个相似于
<literal>ttyd0:</literal> 的项。 每一行应该从动态 IP
<literal>ttyu0:</literal> 的项。 每一行应该从动态 IP
地址池中取得唯一的IP地址。</para>
</sect4>
@ -767,16 +781,20 @@ mary:
<primary>LCP</primary>
</indexterm>
<para>在配置和编译<command>mgetty</command>
时启用 <literal>AUTO_PPP</literal>选项
使<command>mgetty</command>能够探测PPP连接的的LCP状态
并自动产生PPP Shell。 但如果默认的login/password队列没有出现
那就必须使用PAP或CHAP来验证用户。</para>
<para>默认情况下, <filename
role="package">comms/mgetty+sendfax</filename> port
在编译时启用了 <literal>AUTO_PPP</literal> 选项,
它使 <command>mgetty</command> 能够检测 PPP 连接的 LCP 状态,
并自动产生 PPP shell。 不过, 由于在默认配置中的
login/password 序列并不出现, 因此,
就必须使用 PAP 或 CHAP 来严重用户身份。</para>
<para>这节假定您已经为用户成功地配置, 编译了带有<literal>AUTO_PPP</literal>选项的
<command>mgetty</command>。</para>
<para>确认文件 <filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
包含以下内容:</para>
<para>这节假定用户已经在系统中成功地编译并安装了 <filename
role="package">comms/mgetty+sendfax</filename>。</para>
<para>确认您的
<filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
文件中包含以下内容:</para>
<programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
@ -1148,6 +1166,11 @@ ifconfig_tun0=</programlisting>
<title>使用内核级PPP</title>
<warning>
<para>这节内容只在
&os;&nbsp;7.X 上可用。</para>
</warning>
<sect2>
<title>设立内核级PPP</title>
@ -1616,6 +1639,17 @@ exit 1
<secondary>troubleshooting</secondary>
</indexterm>
<warning>
<para>从 &os; 8.0 开始, &man.uart.4; 驱动取代了
&man.sio.4; 驱动。 用以表示串口的设备节点由分别
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
并从
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户在升级时需要因应之对配置文件进行必要的更改。</para>
</warning>
<para>本节将讲述通过modem连接使用PPP时可能出现的问题。
例如, 您可能需要确切地知道您拨入的系统会出现一个怎样的命令行提示符。
有些 <acronym>ISP</acronym> 会提供 <literal>ssword</literal>提示符,
@ -1629,21 +1663,21 @@ exit 1
<para>如果使用的是定制内核, 确认在其编译配置中包含下列配置:</para>
<programlisting>device sio</programlisting>
<programlisting>device uart</programlisting>
<para>默认的 <literal>GENERIC</literal> 内核中包含了
<devicename>sio</devicename> 设备, 因此如果您使用的是它的话,
<devicename>uart</devicename> 设备, 因此如果您使用的是它的话,
就不需要担心了。 只要查看 <command>dmesg</command> 输出中是否有 modem
设备:</para>
<screen>&prompt.root; <userinput>dmesg | grep sio</userinput></screen>
<screen>&prompt.root; <userinput>dmesg | grep uart</userinput></screen>
<para>您应该找到与 <devicename>sio</devicename> 设备有关的输出。
<para>您应该找到与 <devicename>uart</devicename> 设备有关的输出。
这些就是我们需要的 COM 端口。 如果您的 modem 按照标准串行端口工作,
您就会在 <devicename>sio1</devicename> 或 <devicename>COM2</devicename>
上找到它。 如果 modem 设备连接在 <devicename>sio1</devicename>
您就会在 <devicename>uart1</devicename> 或 <devicename>COM2</devicename>
上找到它。 如果 modem 设备连接在 <devicename>uart1</devicename>
接口 (在 DOS 中称为<devicename>COM2</devicename>)
那么您的 modem 将会是 <filename class="devicefile">/dev/cuad1</filename>。</para>
那么您的 modem 将会是 <filename class="devicefile">/dev/cuau1</filename>。</para>
</sect2>
<sect2>
@ -1660,10 +1694,10 @@ exit 1
<para>现在我们已经打开了<command>ppp</command>。</para>
<screen>ppp ON example&gt; <userinput>set device <filename class="devicefile">/dev/cuad1</filename></userinput></screen>
<screen>ppp ON example&gt; <userinput>set device <filename class="devicefile">/dev/cuau1</filename></userinput></screen>
<para>设置modem设备 在本例子中是
<devicename>cuad1</devicename>。</para>
<devicename>cuau1</devicename>。</para>
<screen>ppp ON example&gt; <userinput>set speed 115200</userinput></screen>
@ -1679,7 +1713,7 @@ exit 1
<para>切换到 <quote>终端</quote>样我们就能手动地控制这台 modem 的模式。</para>
<programlisting>deflink: Entering terminal mode on <filename class="devicefile">/dev/cuad1</filename>
<programlisting>deflink: Entering terminal mode on <filename class="devicefile">/dev/cuau1</filename>
type '~h' for help</programlisting>
<screen><userinput>at</userinput>
@ -2225,6 +2259,11 @@ tun0: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1500
<title>使用SLIP</title>
<indexterm><primary>SLIP</primary></indexterm>
<warning>
<para>这节内容只在
&os;&nbsp;7.X 上可用。</para>
</warning>
<sect2 id="slipc">
<title>设置 SLIP 客户端</title>

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Chinese Documentation Project
Original Revision: 1.46
Original Revision: 1.48
$FreeBSD$
-->
@ -10,11 +10,11 @@
<bridgehead id="preface-audience" renderas=sect1>预期的读者</bridgehead>
<para>作为 FreeBSD 的新用户,您将会在本手册第一部分找到 FreeBSD
<para>作为 &os; 的新用户,您将会在本手册第一部分找到 &os;
的安装方法,同时逐渐引入概念和习俗来加强 &unix; 基础。
阅读这部分只需要您有探索的精神和接受新概念的能力。</para>
<para>读完这些之后,手册中很漫长的第二部分是 FreeBSD
<para>读完这些之后,手册中很漫长的第二部分是 &os;
中系统管理员感兴趣的所有主题的全面参考。
在阅读这些章节的内容时所需要的背景知识都注释在每一章节的大纲里面,
如果需要,可在阅读前进行预习。</para>
@ -51,7 +51,7 @@
<bridgehead id="preface-changes-from2" renderas=sect1>相对于第二版的改动 (2004)</bridgehead>
<para>您目前看到的这本手册的第三版是 FreeBSD 文档计划的成员历时两年完成的顶峰之作。
<para>您目前看到的这本手册的第三版是 &os; 文档计划的成员历时两年完成的顶峰之作。
这一版的内容已经增长到需要分成两卷才能印刷出版。
第三版包含了如下的的主要变动:</para>
@ -68,7 +68,7 @@
<listitem>
<para><xref linkend="mac"> 强制访问控制 (MAC) 是这一版新增的章节。
它解释了什么是 MAC 以及这一机制如何使您的 FreeBSD 系统更安全。</para>
它解释了什么是 MAC 以及这一机制如何使您的 &os; 系统更安全。</para>
</listitem>
<listitem>
@ -103,7 +103,7 @@
<listitem>
<para><xref linkend="advanced-networking">,进阶网络应用 一章增加了关于在
FreeBSD 中使用 &bluetooth; 设备, 安装无线网络, 以及使用异步传输模式 (ATM)
&os; 中使用 &bluetooth; 设备, 安装无线网络, 以及使用异步传输模式 (ATM)
网络的内容。</para>
</listitem>
@ -120,7 +120,7 @@
相对于第一版的改变 (2001)</bridgehead>
<para>
本手册的第二版是 FreeBSD 文档计划的成员历时两年完成的顶峰之作。
本手册的第二版是 &os; 文档计划的成员历时两年完成的顶峰之作。
第二版包含了如下的的主要变动:</para>
<!-- Talk a little about justification and other stylesheet changes? -->
@ -143,7 +143,7 @@
</listitem>
<listitem>
<para><xref linkend="install"> (<quote>安装
FreeBSD</quote>) 新版本中使用了抓屏图片,使新用户更容易的领会正文。</para>
&os;</quote>) 新版本中使用了抓屏图片,使新用户更容易的领会正文。</para>
</listitem>
<listitem>
<para><xref linkend="basics"> (<quote>&unix;
@ -159,8 +159,8 @@
<application>KDE</application> 和 <application>GNOME</application></para>
</listitem>
<listitem>
<para><xref linkend="boot"> (<quote>FreeBSD
启动过程</quote>)对第一版内容进行扩充。</para>
<para><xref linkend="boot"> (<quote>&os;
启动过程</quote>) 对第一版内容进行扩充。</para>
</listitem>
<listitem>
<para><xref linkend="disks"> (<quote>存储</quote>)
@ -170,7 +170,7 @@
</listitem>
<listitem>
<para><xref linkend="serialcomms"> (<quote>串口通信</quote>)
对第一版进行完善,并为 FreeBSD 4.x/5.x 做了更新。</para>
对第一版进行完善,并为 &os; 4.x/5.x 做了更新。</para>
</listitem>
<listitem>
<para><xref linkend="ppp-and-slip"> (<quote>PPP 和
@ -206,13 +206,13 @@
<bridgehead id="preface-overview" renderas=sect1>本手册的组织</bridgehead>
<para>这本手册分成了五个逻辑清晰的部分。第一部分
<emphasis>起步</emphasis> 涵盖了 FreeBSD 的安装和基本使用方法。
<emphasis>起步</emphasis> 涵盖了 &os; 的安装和基本使用方法。
读者可根据自己的情况按顺序或者跳过一些熟悉的主题来阅读。第二部分
<emphasis>常用操作</emphasis> 涵盖了 FreeBSD 常用的功能,
<emphasis>常用操作</emphasis> 涵盖了 &os; 常用的功能,
这部分可以不按顺序阅读。每个部分由一个简明的大纲开始,
这个大纲描述本章节涵盖的内容和读者应该已经知道的知识。
这主要是让读者可以更好的选择感兴趣的章节阅读。第三部分
<emphasis>系统管理</emphasis> 涵盖了 FreeBSD 高级用户所感兴趣的广泛的话题。
<emphasis>系统管理</emphasis> 涵盖了 &os; 高级用户所感兴趣的广泛的话题。
第四部分 <emphasis>网络通讯</emphasis> 包括了网络和服务的话题,
而第五部分则是资源信息的附录。</para>
@ -223,7 +223,7 @@
<varlistentry>
<term><emphasis><xref linkend="introduction"> 介绍</emphasis></term>
<listitem>
<para>向新用户介绍 FreeBSD。它描述了 FreeBSD 计划的历史、目标和开发模式。</para>
<para>向新用户介绍 &os;。它描述了 &os; 计划的历史、目标和开发模式。</para>
</listitem>
</varlistentry>
<varlistentry>
@ -237,7 +237,7 @@
<varlistentry>
<term><emphasis><xref linkend="basics"> &unix; 基础</emphasis></term>
<listitem>
<para>本章涵盖了 FreeBSD 操作系统基础命令和功能。
<para>本章涵盖了 &os; 操作系统基础命令和功能。
如果熟悉 &linux; 或者其他类 &unix; 操作系统,则可以跳过这章。</para>
</listitem>
</varlistentry>
@ -245,7 +245,7 @@
<term><emphasis><xref linkend="ports"> 安装应用程序</emphasis></term>
<listitem>
<para>
本章涵盖如何用 FreeBSD 的 <quote>Ports Collection</quote>
本章涵盖如何用 &os; 的 <quote>Ports Collection</quote>
和标准二进制软件包来安装第三方软件。</para>
</listitem>
</varlistentry>
@ -253,7 +253,7 @@
<term><emphasis><xref linkend="x11"> X Window 系统</emphasis></term>
<listitem>
<para>本章概要地描述了 X Window System 系统并详细地介绍了如何在
FreeBSD 上使用它。 此外他也描述了常用的桌面环境,
&os; 上使用它。 此外他也描述了常用的桌面环境,
例如 <application>KDE</application> 和 <application>GNOME</application>。</para>
</listitem>
</varlistentry>
@ -264,7 +264,7 @@
<term><emphasis><xref linkend="desktop"> 桌面应用</emphasis></term>
<listitem>
<para>列出了一些常用的桌面应用程序,比如 web 浏览器和办公套件,
描述了在 FreeBSD 上如何安装它们。</para>
描述了在 &os; 上如何安装它们。</para>
</listitem>
</varlistentry>
<varlistentry>
@ -275,7 +275,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="kernelconfig"> 配置 FreeBSD
<term><emphasis><xref linkend="kernelconfig"> 配置 &os;
内核</emphasis></term>
<listitem>
<para>解释了为什么需要配置一个新内核并提供了配置、
@ -285,16 +285,16 @@
<varlistentry>
<term><emphasis><xref linkend="printing"> 打印</emphasis></term>
<listitem>
<para>描绘了 FreeBSD 上打印机管理,
<para>描绘了 &os; 上打印机管理,
包括横幅页、打印统计,还有初始的设置。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="linuxemu"> &linux; 二进制兼容</emphasis></term>
<listitem>
<para>描述了 FreeBSD 的 &linux; 兼容特性。
<para>描述了 &os; 的 &linux; 兼容特性。
也提供了许多流行的 &linux; 应用程序的详细的安装说明,
比如 <application>&oracle;</application>、<application>&sap.r3;</application>,还有
比如 <application>&oracle;</application>
<application>&mathematica;</application>。</para>
</listitem>
</varlistentry>
@ -304,14 +304,14 @@
<varlistentry>
<term><emphasis><xref linkend="config-tuning"> 配置和调整</emphasis></term>
<listitem>
<para>本章描述了管理员调整 FreeBSD 系统以优化性能时可能用到的一些参数。
也描述了 FreeBSD 中的各种配置文件以及它们所在的位置。</para>
<para>本章描述了管理员调整 &os; 系统以优化性能时可能用到的一些参数。
也描述了 &os; 中的各种配置文件以及它们所在的位置。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="boot"> 启动过程</emphasis></term>
<listitem>
<para>本章描述 FreeBSD 的启动过程并且解释了如何用配置选项来控制这个过程。</para>
<para>本章描述 &os; 的启动过程并且解释了如何用配置选项来控制这个过程。</para>
</listitem>
</varlistentry>
<varlistentry>
@ -324,7 +324,7 @@
<varlistentry>
<term><emphasis><xref linkend="security"> 安全</emphasis></term>
<listitem>
<para>描述了保证 FreeBSD 系统安全可以使用的许多工具, 这包括
<para>描述了保证 &os; 系统安全可以使用的许多工具, 这包括
Kerberos IPsec 以及 OpenSSH。</para>
</listitem>
</varlistentry>
@ -339,7 +339,7 @@
<term><emphasis><xref linkend="mac"> 强制访问控制</emphasis></term>
<listitem>
<para>解释了何谓强制访问控制 (MAC) 以及如何利用这一机制来加强
FreeBSD 系统的安全。</para>
&os; 系统的安全。</para>
</listitem>
</varlistentry>
<varlistentry>
@ -353,14 +353,14 @@
<varlistentry>
<term><emphasis><xref linkend="disks"> 存储</emphasis></term>
<listitem>
<para>本章描述了怎样用 FreeBSD 来管理存储介质和文件系统包括物理磁盘、RAID
<para>本章描述了怎样用 &os; 来管理存储介质和文件系统包括物理磁盘、RAID
阵列、光学和磁带媒体、后备存储磁盘以及网络文件系统。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="geom"> GEOM</emphasis></term>
<listitem>
<para>介绍了 FreeBSD 中的 GEOM 框架是什么,
<para>介绍了 &os; 中的 GEOM 框架是什么,
以及如何配置它所支持的各级 RAID。</para>
</listitem>
</varlistentry>
@ -387,14 +387,14 @@
<varlistentry>
<term><emphasis><xref linkend="l10n"> 本地化</emphasis></term>
<listitem>
<para>本章描述了如何在 FreeBSD 上使用非英语语言。它涵盖了系统和应用程序级的本地化。</para>
<para>本章描述了如何在 &os; 上使用非英语语言。它涵盖了系统和应用程序级的本地化。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="updating-upgrading"> 更新与升级 &os;</emphasis></term>
<listitem>
<para>介绍了 FreeBSD-STABLE、
FreeBSD-CURRENT 以及 FreeBSD 发行版本之间的差异。
<para>介绍了 &os;-STABLE、
&os;-CURRENT 以及 &os; 发行版本之间的差异。
描述了一般用户如何紧跟开发过程并从中受益。
涵盖了如何更新用户的系统至发行版最新安全修正的方法。</para>
</listitem>
@ -412,14 +412,14 @@
<varlistentry>
<term><emphasis><xref linkend="serialcomms"> 串行通信</emphasis></term>
<listitem>
<para>本章解释了如何连接终端和调制解调器到 FreeBSD 系统,包括拨入和拨出连接。</para>
<para>本章解释了如何连接终端和调制解调器到 &os; 系统,包括拨入和拨出连接。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="ppp-and-slip"> PPP 和 SLIP</emphasis></term>
<listitem>
<para>本章描述了如何用 FreeBSD 通过使用 PPPSLIP 或者基于以太网的
PPP(PPPoE)来连接远程系统。</para>
<para>本章描述了如何用 &os; 通过使用 PPPSLIP 或者基于以太网的
PPP (PPPoE) 来连接远程系统。</para>
</listitem>
</varlistentry>
<varlistentry>
@ -432,14 +432,14 @@
<varlistentry>
<term><emphasis><xref linkend="network-servers"> 网络服务</emphasis></term>
<listitem>
<para>提供了详细的指引和示范配置文件以说明如何将一台 FreeBSD 机器作为网络文件系统服务器,
<para>提供了详细的指引和示范配置文件以说明如何将一台 &os; 机器作为网络文件系统服务器,
域名服务器, 网络信息服务器或时间同步服务器来使用的方法。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="firewalls"> 防火墙</emphasis></term>
<listitem>
<para>解释了基于软件的防火墙的原理, 并提供了关于配置 FreeBSD
<para>解释了基于软件的防火墙的原理, 并提供了关于配置 &os;
上的几种防火墙的详细说明。</para>
</listitem>
</varlistentry>
@ -454,10 +454,10 @@
<!-- Part V - Appendices -->
<varlistentry>
<term><emphasis><xref linkend="mirrors"> 获取 FreeBSD </emphasis></term>
<term><emphasis><xref linkend="mirrors"> 获取 &os; </emphasis></term>
<listitem>
<para>列出了获得 FreeBSD 安装 CDROM 或 DVDROM 的不同资源,也提供了允许您自由下载
FreeBSD 的不同 Internet 站点。</para>
<para>列出了获得 &os; 安装 CDROM 或 DVDROM 的不同资源,也提供了允许您自由下载
&os; 的不同 Internet 站点。</para>
</listitem>
</varlistentry>
<varlistentry>
@ -470,14 +470,14 @@
<varlistentry>
<term><emphasis><xref linkend="eresources"> Internet 上的资源</emphasis></term>
<listitem>
<para>讲述了很多对 FreeBSD 用户有用的能够提出问题并进行技术交流的关于
FreeBSD 的论坛。</para>
<para>讲述了很多对 &os; 用户有用的能够提出问题并进行技术交流的关于
&os; 的论坛。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis><xref linkend="pgpkeys"> PGP 公钥</emphasis></term>
<listitem>
<para>列出了一些 FreeBSD 开发者的 PGP 签名公钥。</para>
<para>列出了一些 &os; 开发者的 PGP 签名公钥。</para>
</listitem>
</varlistentry>
</variablelist>
@ -557,7 +557,7 @@
<screen><prompt>E:\&gt;</prompt> <userinput>tools\fdimage floppies\kern.flp A:</userinput></screen>
<para>以 &prompt.root; 开头的例子代表必须以 FreeBSD
<para>以 &prompt.root; 开头的例子代表必须以 &os;
超级用户身份执行的命令。您可以用 <username>root</username>
身份登录来输入这些命令,或者以普通账号登录然后用 &man.su.1;
来获得超级用户权限。</para>
@ -575,14 +575,14 @@
<para>您所看到的这本书是全球几百人努力的结果。
无论他们只是纠正一些错误或提交完整的章节,所有的贡献都是非常有用的。</para>
<para>
一些公司通过提供资金让作者专注于文档开发、提供出版资金等等方式来支持文档开发。
其中BSDi (后并入<ulink url="http://www.windriver.com">Wind River Systems</ulink>)
资助 FreeBSD 文档计划成员来专职改善这本书直到 2000 年三月第一个印刷版
(ISBN 1-57176-241-8) 的出版。Wind River Systems
<para>一些公司通过提供资金让作者专注于文档开发、
提供出版资金等等方式来支持文档开发。 其中, BSDi
(后并入<ulink url="http://www.windriver.com">Wind River Systems</ulink>)
资助 &os; 文档计划成员来专职改善这本书直到 2000 年三月第一个印刷版
(ISBN 1-57176-241-8) 的出版。 Wind River Systems
同时资助其他作者来对输出结构做很多改进和给文章添加一些附加章节。
这项工作结束于 2001 年 11 月印刷第二版 (ISBN 1-57176-303-1)。在 2003-2004 两年中,<ulink
url="http://www.freebsdmall.com">FreeBSD Mall</ulink>
url="http://www.freebsdmall.com">&os; Mall</ulink>
向为改进这本手册以使其第三版印刷版本能够出版的志愿者支付了报酬。</para>
</preface>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.122
Original Revision: 1.123
$FreeBSD$
-->
@ -180,6 +180,13 @@
<sect1 id="printing-intro-setup">
<title>基本设置</title>
<warning>
<para>从 &os; 8.0 起, 串口对应的设备名由
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 变为
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户应将这篇文档的示例中的设备名改为原先的样子。</para>
</warning>
<para>要想在 <application>LPD</application>后台打印系统上使用打印机,
您需要设置打印机硬件和
<application>LPD</application>软件。 这个
@ -733,8 +740,8 @@ showpage</programlisting>
<indexterm><primary>serial port</primary></indexterm>
<indexterm><primary>parity</primary></indexterm>
<para>其中 <replaceable>port</replaceable>
是串口的设备节点 (<literal>ttyd0</literal>、
<literal>ttyd1</literal> 等等)
是串口的设备节点 (<literal>ttyu0</literal>、
<literal>ttyu1</literal> 等等)
<replaceable>bps-rate</replaceable>
是与打印机通讯时使用的速率, 而
<replaceable>parity</replaceable>
@ -746,7 +753,7 @@ showpage</programlisting>
它连接在第三个串口上, 速度为 19200 &nbsp; 波特,
不进行校验:</para>
<programlisting>printer:dv=<filename class="devicefile">/dev/ttyd2</filename>:br#19200:pa=none</programlisting>
<programlisting>printer:dv=<filename class="devicefile">/dev/ttyu2</filename>:br#19200:pa=none</programlisting>
</step>
<step>
@ -1077,7 +1084,7 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:</programlisting>
:lp=<filename class="devicefile">/dev/ttyu5</filename>:</programlisting>
<para>如果您没在您的 <filename>/etc/printcap</filename> 文件中
用 <literal>lp</literal> 标记指定设备节点,
@ -1170,7 +1177,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:</programlisting>
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:</programlisting>
</sect4>
<sect4 id="printing-textfilter">
@ -1242,7 +1249,7 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:\
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:\
:if=<filename>/usr/local/libexec/if-simple</filename>:</programlisting>
<note>
@ -1329,6 +1336,13 @@ $%&amp;'()*+,-./01234567
<sect1 id="printing-advanced">
<title>高级设置</title>
<warning>
<para>从 &os; 8.0 起, 串口对应的设备名由
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 变为
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户应将这篇文档的示例中的设备名改为原先的样子。</para>
</warning>
<para>这部分将描述用来打印特别格式文件,
页眉, 通过网络打印, 以及对打印机使用限制和
记帐。</para>
@ -1998,7 +2012,7 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:if=<filename>/usr/local/libexec/psif</filename>:\
:df=<filename>/usr/local/libexec/psdf</filename>:</programlisting>
@ -3071,7 +3085,7 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:sc:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:if=<filename>/usr/local/libexec/psif</filename>:\
:df=<filename>/usr/local/libexec/psdf</filename>:</programlisting>
@ -3143,7 +3157,7 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:sc:rg=artists:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:if=<filename>/usr/local/libexec/psif</filename>:\
:df=<filename>/usr/local/libexec/psdf</filename>:</programlisting>
@ -3214,7 +3228,7 @@ rattan|line|diablo|lp|Diablo 630 Line Printer:\
#
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:sc:rg=artists:mx#5000:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:rw:\
:if=<filename>/usr/local/libexec/psif</filename>:\
:df=<filename>/usr/local/libexec/psdf</filename>:</programlisting>
@ -3295,7 +3309,7 @@ madrigal.fishbaum.de</programlisting>
<programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
:sh:sd=<filename class="directory">/var/spool/lpd/bamboo</filename>:sc:rg=artists:mx#5000:\
:lp=<filename class="devicefile">/dev/ttyd5</filename>:ms#-parenb cs8 clocal crtscts:rw:mx#5000:\
:lp=<filename class="devicefile">/dev/ttyu5</filename>:ms#-parenb cs8 clocal crtscts:rw:mx#5000:\
:if=<filename>/usr/local/libexec/psif</filename>:\
:df=<filename>/usr/local/libexec/psdf</filename>:</programlisting>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.336
Original Revision: 1.337
$FreeBSD$
-->
@ -53,11 +53,6 @@
<application>inetd</application> 配合使用。</para>
</listitem>
<listitem>
<para>如何在 &os;&nbsp;5.0 以前的版本上设置
<application>KerberosIV</application>。</para>
</listitem>
<listitem>
<para>如何在 &os; 上设置
<application>Kerberos5</application>。</para>
@ -357,7 +352,6 @@
那么他就有能力破坏任何安全设施,这确实是我们需要考虑的一个问题,但同样地,
真正能够物理接触您的工作站或服务器并实施攻击的人在现实生活中并不常见,
绝大多数攻击来自于网络, 而攻击者往往无法物理地接触服务器或工作站。</para>
<indexterm><primary>KerberosIV</primary></indexterm>
<para>使用类似 Kerberos 这样的工具,也为我们提供了使用一个工具来禁用某个用户,
或修改他们的口令, 并在所有机器上立即生效的方法。 如果员工的帐号被窃取,
@ -782,7 +776,6 @@
<sect2>
<title>Kerberos 和 SSH 的访问问题</title>
<indexterm><primary><command>ssh</command></primary></indexterm>
<indexterm><primary>KerberosIV</primary></indexterm>
<para>如果您打算使用, 那么 Kerberos 和 ssh 都有一些需要解决的问题。
Kerberos 5 是一个很棒的验证协议, 但使用了它的
@ -1313,471 +1306,6 @@ sendmail : PARANOID : deny</programlisting>
</sect2>
</sect1>
<sect1 id="kerberosIV">
<sect1info>
<authorgroup>
<author>
<firstname>Mark</firstname>
<surname>Murray</surname>
<contrib>撰写者 </contrib>
</author>
</authorgroup>
<authorgroup>
<author>
<firstname>Mark</firstname>
<surname>Dapoz</surname>
<contrib>初稿 </contrib>
</author>
</authorgroup>
</sect1info>
<title><application>KerberosIV</application></title>
<para>Kerberos 是一个网络附加系统/协议, 它使得用户能够通过一个安全服务器的服务来验证身份。
象远程登录, 远程复制,
系统间的相互文件复制和其他完成高风险任务的服务将被变得相当安全和可控制。</para>
<para>下面将具体介绍如何配置随 &os; 发行的
Kerberos。 不过, 您还是应该阅读相应的联机手册以获得完整的说明。</para>
<sect2>
<title>安装 <application>KerberosIV</application></title>
<indexterm><primary>MIT</primary></indexterm>
<indexterm>
<primary>KerberosIV</primary>
<secondary>安装</secondary>
</indexterm>
<para>Kerberos 是 &os; 的一项可选组件。 安装该软件最简单的办法就是
在使用 <application>sysinstall</application> 安装 &os; 时选择
<literal>krb4</literal> 或
<literal>krb5</literal>。 这样将会安装
<quote>eBones</quote> (KerberosIV) 或 <quote>Heimdal</quote> (Kerberos5)
的 Kerberos 实现。 采用实现的原因是它们在美国/加拿大 以外的地区开发,
以便允许在这些国家之外的人使用, 而不必受美国的加密代码出口管制的限制。</para>
<para>此外, 您可以从
<filename role="package">security/krb5</filename> 得到 Kerberos 的 MIT 实现。</para>
</sect2>
<sect2>
<title>创建最初的数据库</title>
<para>这项工作只需要在 Kerberos 服务器上完成。 首先确认没有旧的
Kerberos 数据库存在。 您应该进入到
<filename class="directory">/etc/kerberosIV</filename> 目录中并检查下述文件是否已经存在:</para>
<screen>&prompt.root; <userinput>cd /etc/kerberosIV</userinput>
&prompt.root; <userinput>ls</userinput>
README krb.conf krb.realms</screen>
<para>如果您发现了除此之外的其它文件 (例如 <filename>principal.*</filename>
或 <filename>master_key</filename>) 已经存在, 请使用
<command>kdb_destroy</command> 命令来销毁旧的数据库,
或者, 如果 Kerberos 没有在运行,简单地删除掉那些多余的文件。</para>
<para>现在必须编辑 <filename>krb.conf</filename> 和
<filename>krb.realms</filename> 文件来定义您的 Kerberos 领域。
在本例中, 这个领域将是 <literal>EXAMPLE.COM</literal> 而其服务器是
<hostid role="fqdn">grunt.example.com</hostid>。 我们编辑或创建如下的
<filename>krb.conf</filename> 文件:</para>
<screen>&prompt.root; <userinput>cat krb.conf</userinput>
EXAMPLE.COM
EXAMPLE.COM grunt.example.com admin server
CS.BERKELEY.EDU okeeffe.berkeley.edu
ATHENA.MIT.EDU kerberos.mit.edu
ATHENA.MIT.EDU kerberos-1.mit.edu
ATHENA.MIT.EDU kerberos-2.mit.edu
ATHENA.MIT.EDU kerberos-3.mit.edu
LCS.MIT.EDU kerberos.lcs.mit.edu
TELECOM.MIT.EDU bitsy.mit.edu
ARC.NASA.GOV trident.arc.nasa.gov</screen>
<para>在这个例子中, 除此之外的其它领域并不是必需的。
把他们在这里一并展示是为了演示如何让机器了解多个领域的存在。
简单起见, 在实际的配置中可以省略它们。</para>
<para>第一行命名了这个系统工作的领域。
其它行包含了领域/主机的记录。
每行的第一项是一个领域, 其后是在这个领域中充当
<quote>密钥分发中心</quote> 的主机名。 其后的 <literal>admin
server</literal> 表示该主机同时还提供管理数据库服务。进一步的详细说明请参考
Kerberos 联机手册。</para>
<para>现在应该添加 <hostid role="fqdn">grunt.example.com</hostid>
到 <literal>EXAMPLE.COM</literal> 领域, 同时追加一项以便将出现在
<literal>EXAMPLE.COM</literal> 领域中
<hostid role="domainname">.example.com</hostid> 域的所有主机也加入进来。
<filename>krb.realms</filename> 这个文件需要按照下面的方法修改:</para>
<screen>&prompt.root; <userinput>cat krb.realms</userinput>
grunt.example.com EXAMPLE.COM
.example.com EXAMPLE.COM
.berkeley.edu CS.BERKELEY.EDU
.MIT.EDU ATHENA.MIT.EDU
.mit.edu ATHENA.MIT.EDU</screen>
<para>再次强调, 其它领域并不是必需的。 在这里只是要展示如何使用多个领域。
可以删掉它们以简化配置。</para>
<para>第一行将 <emphasis>指定的</emphasis> 系统置于所指名字的领域内。
这一行的其它部分则指明了特定子域内的主机应该默认属于哪个领域。</para>
<para>接下来我们就可以创建数据库了。 只有在
Kerberos 服务器上 (或密钥分发中心上) 才需要它。 可以通过
<command>kdb_init</command> 命令来完成这一步:</para>
<screen>&prompt.root; <userinput>kdb_init</userinput>
<prompt>Realm name [default ATHENA.MIT.EDU ]:</prompt> <userinput>EXAMPLE.COM</userinput>
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
<prompt>Enter Kerberos master key:</prompt> </screen>
<para>现在我们应该保存密钥, 这样本机上运行的其他服务就能够了解这一变化。
用 <command>kstash</command> 命令来完成这一步:</para>
<screen>&prompt.root; <userinput>kstash</userinput>
<prompt>Enter Kerberos master key:</prompt>
Current Kerberos master key version is 1.
Master key entered. BEWARE!</screen>
<para>这一操作将把主口令保存到
<filename>/etc/kerberosIV/master_key</filename>。</para>
</sect2>
<sect2>
<title>让一切运转起来</title>
<indexterm>
<primary>KerberosIV</primary>
<secondary>初始配置</secondary>
</indexterm>
<para>有两个主要的东西需要被添加到要用 Kerberos 来确保安全的
<emphasis>每一个</emphasis> 系统上。
它们的名字是 <literal>kpasswd</literal> 和 <literal>rcmd</literal>。
这些程序允许另外系统改变 Kerberos 的密码, 在不同的系统上可能有不同的名字。</para>
<para>服务程序 <application>kpasswd</application> 和
<application>rcmd</application> 使得其他系统能够修改 Kerberos
口令, 以及执行类似 &man.rcp.1;,
&man.rlogin.1; 和 &man.rsh.1; 这样的命令。</para>
<para>我们添加下面这些记录:</para>
<screen>&prompt.root; <userinput>kdb_edit</userinput>
Opening database...
<prompt>Enter Kerberos master key:</prompt>
Current Kerberos master key version is 1.
Master key entered. BEWARE!
Previous or default values are in [brackets] ,
enter return to leave the same, or new value.
<prompt>Principal name:</prompt> <userinput>passwd</userinput>
<prompt>Instance:</prompt> <userinput>grunt</userinput>
&lt;Not found&gt;, <prompt>Create [y] ?</prompt> <userinput>y</userinput>
Principal: passwd, Instance: grunt, kdc_key_ver: 1
<prompt>New Password:</prompt> &lt;---- enter RANDOM here
Verifying password
<prompt>New Password:</prompt> &lt;---- enter RANDOM here
<prompt>Random password [y] ?</prompt> <userinput>y</userinput>
Principal's new key version = 1
<prompt>Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ?</prompt>
<prompt>Max ticket lifetime (*5 minutes) [ 255 ] ?</prompt>
<prompt>Attributes [ 0 ] ?</prompt>
Edit O.K.
<prompt>Principal name:</prompt> <userinput>rcmd</userinput>
<prompt>Instance:</prompt> <userinput>grunt</userinput>
&lt;Not found&gt;, <prompt>Create [y] ?</prompt>
Principal: rcmd, Instance: grunt, kdc_key_ver: 1
<prompt>New Password:</prompt> &lt;---- enter RANDOM here
Verifying password
<prompt>New Password:</prompt> &lt;---- enter RANDOM here
<prompt>Random password [y] ?</prompt>
Principal's new key version = 1
<prompt>Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ?</prompt>
<prompt>Max ticket lifetime (*5 minutes) [ 255 ] ?</prompt>
<prompt>Attributes [ 0 ] ?</prompt>
Edit O.K.
<prompt>Principal name:</prompt> &lt;---- null entry here will cause an exit</screen>
</sect2>
<sect2>
<title>创建服务器文件</title>
<para>现在需要分析在每台机器上定义的服务的所有情况。
为了做到这一点, 可以使用
<command>ext_srvtab</command> 命令。 这将创建一个文件,
它需要被 <emphasis>通过安全的途径</emphasis> 复制或移动到每一个
Kerberos 客户端的
<filename class="directory">/etc</filename> 目录中。
在每一台服务器上都必须存在这个文件,
它对 Kerberos 的运行至关重要。</para>
<screen>&prompt.root; <userinput>ext_srvtab grunt</userinput>
<prompt>Enter Kerberos master key:</prompt>
Current Kerberos master key version is 1.
Master key entered. BEWARE!
Generating 'grunt-new-srvtab'....</screen>
<para>现在,这个命令只产生一个临时文件,必须被重命名为 <filename>srvtab</filename>
以便所有的服务可以识别它。 用 &man.mv.1; 命令把它挪到原系统的这个位置:</para>
<screen>&prompt.root; <userinput>mv grunt-new-srvtab srvtab</userinput></screen>
<para>如果文件是针对客户系统的, 并且网络的安全性存疑, 则应把
<filename><replaceable>client</replaceable>-new-srvtab</filename>
复制到可移动介质上, 并以安全的实物交付方法拿走。 把文件复制到客户机的 <filename
class="directory">/etc</filename> 目录中,
并将其改名为 <filename>srvtab</filename> 并赋予
mode 600:</para>
<screen>&prompt.root; <userinput>mv grumble-new-srvtab srvtab</userinput>
&prompt.root; <userinput>chmod 600 srvtab</userinput></screen>
</sect2>
<sect2>
<title>复制数据库</title>
<para>现在添加一些用户记录到数据库。 首先为用户
<username>jane</username> 创建其对应的项。 使用
<command>kdb_edit</command> 命令来完成此项工作:</para>
<screen>&prompt.root; <userinput>kdb_edit</userinput>
Opening database...
<prompt>Enter Kerberos master key:</prompt>
Current Kerberos master key version is 1.
Master key entered. BEWARE!
Previous or default values are in [brackets] ,
enter return to leave the same, or new value.
<prompt>Principal name:</prompt> <userinput>jane</userinput>
<prompt>Instance:</prompt>
&lt;Not found&gt;, <prompt>Create [y] ?</prompt> <userinput>y</userinput>
Principal: jane, Instance: , kdc_key_ver: 1
<prompt>New Password:</prompt> &lt;---- enter a secure password here
Verifying password
<prompt>New Password:</prompt> &lt;---- re-enter the password here
Principal's new key version = 1
<prompt>Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ?</prompt>
<prompt>Max ticket lifetime (*5 minutes) [ 255 ] ?</prompt>
<prompt>Attributes [ 0 ] ?</prompt>
Edit O.K.
<prompt>Principal name:</prompt> &lt;---- null entry here will cause an exit</screen>
</sect2>
<sect2>
<title>测试全部相关信息</title>
<para>首先必须启动 Kerberos 的服务程序。 这里需要指出,
如果您正确地修改了 <filename>/etc/rc.conf</filename> 则系统在启动时会自动完成这个工作。
只有在 Kerberos 服务器上才需要这么做。 Kerberos 客户程序将自动地从 <filename
class="directory">/etc/kerberosIV</filename> 目录中的文件获取所需要的信息。</para>
<screen>&prompt.root; <userinput>kerberos &amp;</userinput>
Kerberos server starting
Sleep forever on error
Log file is /var/log/kerberos.log
Current Kerberos master key version is 1.
Master key entered. BEWARE!
Current Kerberos master key version is 1
Local realm: EXAMPLE.COM
&prompt.root; <userinput>kadmind -n &amp;</userinput>
KADM Server KADM0.0A initializing
Please do not use 'kill -9' to kill this job, use a
regular kill instead
Current Kerberos master key version is 1.
Master key entered. BEWARE!</screen>
<para>接下来应使用 <command>kinit</command> 命令来获取与我们刚刚创建的
ID <username>jane</username> 对应的 ticket</para>
<screen>&prompt.user; <userinput>kinit jane</userinput>
MIT Project Athena (grunt.example.com)
Kerberos Initialization for "jane"
<prompt>Password:</prompt> </screen>
<para>尝试使用 <command>klist</command> 列出句柄以了解是否真的拥有它们:</para>
<screen>&prompt.user; <userinput>klist</userinput>
Ticket file: /tmp/tkt245
Principal: jane@EXAMPLE.COM
Issued Expires Principal
Apr 30 11:23:22 Apr 30 19:23:22 krbtgt.EXAMPLE.COM@EXAMPLE.COM</screen>
<para>现在可以试试看用 &man.passwd.1; 来修改口令,
以验证 <application>kpasswd</application> 服务程序是否能够从
Kerberos 数据库中获得需要的授权:</para>
<screen>&prompt.user; <userinput>passwd</userinput>
realm EXAMPLE.COM
<prompt>Old password for jane:</prompt>
<prompt>New Password for jane:</prompt>
Verifying password
<prompt>New Password for jane:</prompt>
Password changed.</screen>
</sect2>
<sect2>
<title>授予 <command>su</command> 特权</title>
<para>Kerberos 使我们能够给予 <emphasis>每一个</emphasis> 需要使用
<username>root</username> 特权的用户使用他们自己
<emphasis>单独的</emphasis> &man.su.1; 口令。
现在我们追加一个被授予 &man.su.1; 到 <username>root</username>
权限的 ID。 这件事是由与 <username>root</username> 相关联的一个
principal 实例来控制的。使用 <command>kdb_edit</command>
可以在 Kerberos 数据库中建立一个 <literal>jane.root</literal> 条目:</para>
<screen>&prompt.root; <userinput>kdb_edit</userinput>
Opening database...
<prompt>Enter Kerberos master key:</prompt>
Current Kerberos master key version is 1.
Master key entered. BEWARE!
Previous or default values are in [brackets] ,
enter return to leave the same, or new value.
<prompt>Principal name:</prompt> <userinput>jane</userinput>
<prompt>Instance:</prompt> <userinput>root</userinput>
&lt;Not found&gt;, Create [y] ? y
Principal: jane, Instance: root, kdc_key_ver: 1
<prompt>New Password:</prompt> &lt;---- enter a SECURE password here
Verifying password
<prompt>New Password:</prompt> &lt;---- re-enter the password here
Principal's new key version = 1
<prompt>Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ?</prompt>
<prompt>Max ticket lifetime (*5 minutes) [ 255 ] ?</prompt> <userinput>12</userinput> &lt;--- Keep this short!
<prompt>Attributes [ 0 ] ?</prompt>
Edit O.K.
<prompt>Principal name:</prompt> &lt;---- null entry here will cause an exit</screen>
<para>现在试试看获得相应的句柄, 以确认它已经正常工作了:</para>
<screen>&prompt.root; <userinput>kinit jane.root</userinput>
MIT Project Athena (grunt.example.com)
Kerberos Initialization for "jane.root"
<prompt>Password:</prompt></screen>
<para>接下来我们需要把用户添加到 <username>root</username>的
<filename>.klogin</filename> 文件里:</para>
<screen>&prompt.root; <userinput>cat /root/.klogin</userinput>
jane.root@EXAMPLE.COM</screen>
<para>试试看 &man.su.1;</para>
<screen>&prompt.user; <userinput>su</userinput>
<prompt>Password:</prompt></screen>
<para>然后看看我们拥有哪些句柄:</para>
<screen>&prompt.root; <userinput>klist</userinput>
Ticket file: /tmp/tkt_root_245
Principal: jane.root@EXAMPLE.COM
Issued Expires Principal
May 2 20:43:12 May 3 04:43:12 krbtgt.EXAMPLE.COM@EXAMPLE.COM</screen>
</sect2>
<sect2>
<title>使用其它命令</title>
<para>在前文给出的例子中, 我们创建了一个称为
<literal>jane</literal> 的用户, 以及一个 <literal>root</literal> 实例。
此处的用户名和它的 principal 相同, 这是
Kerberos 默认的; 一个形如 <literal>&lt;username&gt;.</literal><username>root</username>
<literal>&lt;principal&gt;.&lt;instance&gt;</literal> 将允许
<literal>&lt;username&gt;</literal> 使用 &man.su.1; 成为
<username>root</username> 只要所需的那些条目在 <username>root</username>
home 目录中的
<filename>.klogin</filename> 中存在的话:</para>
<screen>&prompt.root; <userinput>cat /root/.klogin</userinput>
jane.root@EXAMPLE.COM</screen>
<para>类似地, 如果用户的 home 目录中有这样的设置:</para>
<screen>&prompt.user; <userinput>cat ~/.klogin</userinput>
jane@EXAMPLE.COM
jack@EXAMPLE.COM</screen>
<para>则表明在 <literal>EXAMPLE.COM</literal> 领域的经过身份验证的
<username>jane</username> 或者
<username>jack</username> (通过 <command>kinit</command> 详情见前文)
能够使用 <username>jane</username> 的身份或系统 (<hostid>grunt</hostid>)
中的文件, 无论通过 &man.rlogin.1;, &man.rsh.1; 或是
&man.rcp.1;。</para>
<para>举例来说, <username>jane</username> 现在通过
Kerberos 登入了其它系统:</para>
<screen>&prompt.user; <userinput>kinit</userinput>
MIT Project Athena (grunt.example.com)
<prompt>Password:</prompt>
&prompt.user; <userinput>rlogin grunt</userinput>
Last login: Mon May 1 21:14:47 from grumble
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995</screen>
<para>或者, 当 <username>jack</username> 登录到 <username>jane</username>
在同一台机器上的账号
(<username>jane</username> 按照前面所介绍的那样配置了
<filename>.klogin</filename> 文件, 而负责 Kerberos 的管理员, 则为
<emphasis>jack</emphasis> 的 principal 配置了一个空的 instance)</para>
<screen>&prompt.user; <userinput>kinit</userinput>
&prompt.user; <userinput>rlogin grunt -l jane</userinput>
MIT Project Athena (grunt.example.com)
<prompt>Password:</prompt>
Last login: Mon May 1 21:16:55 from grumble
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995</screen>
</sect2>
</sect1>
<sect1 id="kerberos5">
<sect1info>
<authorgroup>
@ -1798,17 +1326,6 @@ FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995</screen>
<title><application>Kerberos5</application></title>
<para>在 &os;-5.1 之后的每一个 &os; 版本都只包含
<application>Kerberos5</application> 支持了, 因而,
<application>Kerberos5</application> 是它们所包含的唯一的
Kerberos 版本, 其配置在绝大多数方面和
<application>KerberosIV</application> 非常类似。
下述信息只适用于 &os;-5.0 之后版本中的
<application>Kerberos5</application>。
希望使用
<application>KerberosIV</application> 的用户可以安装
<filename role="package">security/krb4</filename> port。</para>
<para><application>Kerberos</application> 是一组附加的网络系统/协议,
用以让用户通过一台安全服务器提供的服务来验证身份。
包括远程登录、远程复制、在系统间安全地复制文件,
@ -2518,7 +2035,7 @@ kadmind5_server_enable="YES"</programlisting>
<para>对 <application>OpenSSL</application> 的一些常见用法包括加密邮件客户的身份验证过程,
基于 Web 的交易如信用卡等等。 许多 ports 如
<filename role="package">www/apache13-ssl</filename> 以及
<filename role="package">mail/sylpheed-claws</filename>
<filename role="package">mail/claws-mail</filename>
等等都提供了编译进
<application>OpenSSL</application> 支持的方法。</para>
@ -3569,8 +3086,8 @@ user@unfirewalled-system.example.org's password: <userinput>*******</userinput><
</indexterm>
<title>文件系统访问控制表</title>
<para>与文件系统在其他方面的加强, 如快照等一道, &os;&nbsp;5.0
及更高版本提供了通过文件系统访问控制表
<para>与文件系统在其他方面的加强, 如快照等一道, FreeBSD
提供了通过文件系统访问控制表
(<acronym>ACL</acronym>) 实现的安全机制。</para>
<para>访问控制表以高度兼容 (&posix;.1e) 的方式扩展了标准的 &unix;

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.133
Original Revision: 1.135
$FreeBSD$
-->
@ -58,6 +58,15 @@
<sect1 id="serial">
<title>介绍</title>
<warning>
<para>从 &os; 8.0 开始, 用于串口的设备节点从
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户需要根据实际情况对这份文档中的例子进行必要的调整。</para>
</warning>
<!-- XXX Write me! -->
<sect2 id="serial-terminology">
@ -462,25 +471,28 @@
<itemizedlist>
<listitem>
<para>呼入端口被命名为<filename>/dev/ttyd<replaceable>N</replaceable></filename>
这里 <replaceable>N</replaceable> 是端口号,从零开始。
通常,您使用呼入端口作为终端。呼入端口要求数据线使用载波检测
<para>呼入端口的名字是
<filename>/dev/ttyu<replaceable>N</replaceable></filename>
其中 <replaceable>N</replaceable> 是端口的编号,
从零开始计数。 一般来说,
您使用呼入端口作为终端。 呼入端口要求数据线使用载波检测
(DCD) 信号来工作。</para>
</listitem>
<listitem>
<para>呼出端口被命名为 <filename>/dev/cuad<replaceable>N</replaceable></filename>。
您通常不使用呼出端口作为终端, 只使用modem。
如果串口线或终端不支持载波检测数据传输,
您可以使用呼出端口。</para>
<para>呼出端口的名字是
<filename>/dev/cuau<replaceable>N</replaceable></filename>。
通常并不使用呼出端口作为终端, 而只用于调制解调器。
如果串口线或终端不支持载波检测信号,
则可能必须要使用呼出端口。</para>
</listitem>
</itemizedlist>
<para>如果您已经连接一个终端到第一个串口 (在 &ms-dos;
上是<devicename>COM1</devicename>)
则可以使用 <filename>/dev/ttyd0</filename> 来作为终端。
则可以使用 <filename>/dev/ttyu0</filename> 来作为终端。
如果它是在第二个串口 (<devicename>COM2</devicename>)
那就是 <filename>/dev/ttyd1</filename>,等等。</para>
那就是 <filename>/dev/ttyu1</filename>,等等。</para>
</sect4>
</sect3>
@ -548,14 +560,14 @@ sio3: type 16550A</screen>
<para>在内核中, 大多数设备都是通过 <quote>设备特殊文件</quote> 来访问的,
这些文件一般位于 <filename>/dev</filename> 目录中。
<devicename>sio</devicename> 是通过
<filename>/dev/ttyd<replaceable>N</replaceable></filename> (呼入)
和 <filename>/dev/cuad<replaceable>N</replaceable></filename>
<filename>/dev/ttyu<replaceable>N</replaceable></filename> (呼入)
和 <filename>/dev/cuau<replaceable>N</replaceable></filename>
(呼出) 设备来访问的。 此外, FreeBSD 也提供了初始化设备
<filename>/dev/ttyd<replaceable>N</replaceable>.init</filename> 和
<filename>/dev/cuad<replaceable>N</replaceable>.init</filename>
<filename>/dev/ttyu<replaceable>N</replaceable>.init</filename> 和
<filename>/dev/cuau<replaceable>N</replaceable>.init</filename>
以及锁设备
<filename>/dev/ttyd<replaceable>N</replaceable>.lock</filename> 和
<filename>/dev/cuad<replaceable>N</replaceable>.lock</filename>)。
<filename>/dev/ttyu<replaceable>N</replaceable>.lock</filename> 和
<filename>/dev/cuau<replaceable>N</replaceable>.lock</filename>)。
初始化设备用于在打开端口时初始化其通讯参数, 例如使用
<literal>RTS/CTS</literal> 信号进行流控制的调制解调器的
<literal>crtscts</literal>。 锁设备则用于在端口上提供一个锁标志,
@ -568,24 +580,24 @@ sio3: type 16550A</screen>
<sect2 id="serial-hw-config">
<title>串口配置</title>
<indexterm><primary><devicename>ttyd</devicename></primary></indexterm>
<indexterm><primary><devicename>cuad</devicename></primary></indexterm>
<indexterm><primary><devicename>ttyu</devicename></primary></indexterm>
<indexterm><primary><devicename>cuau</devicename></primary></indexterm>
<para><devicename>ttyd<replaceable>N</replaceable></devicename> (或
<devicename>cuad<replaceable>N</replaceable></devicename>)
<para><devicename>ttyu<replaceable>N</replaceable></devicename> (或
<devicename>cuau<replaceable>N</replaceable></devicename>)
设备是您将要打开的应用程序的一般设备。 当进程打开某个设备时,
它将有一个终端 I/O 设置的默认配置。 您可以在命令行看看这些设置:</para>
<screen>&prompt.root; <userinput>stty -a -f /dev/ttyd1</userinput></screen>
<screen>&prompt.root; <userinput>stty -a -f /dev/ttyu1</userinput></screen>
<para>当您修改了这个设备的设置,这个设置会生效,除非设备被关闭。
当它被重新打开时,它将回到默认设置。 要修改默认设置,您可以打开和调整
<quote>初始状态</quote> 设备的设置。例如,
要为<devicename>ttyd5</devicename> 打开
要为<devicename>ttyu5</devicename> 打开
<option>CLOCAL</option> 模式8位通讯和默认的 <option>XON/XOFF</option> 流控制,
输入:</para>
<screen>&prompt.root; <userinput>stty -f /dev/ttyd5.init clocal cs8 ixon ixoff</userinput></screen>
<screen>&prompt.root; <userinput>stty -f /dev/ttyu5.init clocal cs8 ixon ixoff</userinput></screen>
<indexterm>
<primary>rc files</primary>
@ -598,11 +610,11 @@ sio3: type 16550A</screen>
<para>为了防止应用程序修改某些设置,
应修改 <quote>lock state</quote>(锁状态) 设备。 例如, 要把
<devicename>ttyd5</devicename> 的速率锁定为 57600&nbsp;bps 输入:</para>
<devicename>ttyu5</devicename> 的速率锁定为 57600&nbsp;bps 输入:</para>
<screen>&prompt.root; <userinput>stty -f /dev/ttyd5.lock 57600</userinput></screen>
<screen>&prompt.root; <userinput>stty -f /dev/ttyu5.lock 57600</userinput></screen>
<para>现在,一个打开<devicename>ttyd5</devicename>
<para>现在,一个打开<devicename>ttyu5</devicename>
和设法改变端口速度的应用程序将被固定在57600bit/s。很自然地
您需要确定初始状态然后用root帐户锁定状态设备的写入功能。</para>
@ -624,6 +636,16 @@ sio3: type 16550A</screen>
</sect1info>
<title>终端</title>
<warning>
<para>从 &os; 8.0 开始, 用于串口的设备节点从
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户需要根据实际情况对这份文档中的例子进行必要的调整。</para>
</warning>
<indexterm><primary>终端</primary></indexterm>
<para>当您在计算机控制台或是在一个连接的网络上时,
@ -704,7 +726,7 @@ sio3: type 16550A</screen>
<screen>&prompt.root; <userinput>cu -l <replaceable>串口设备</replaceable></userinput></screen>
<para>此处 <quote>串口设备</quote> 表示您计算机上某个串口对应的设备名。
<devicename>/dev/cuad<replaceable>N</replaceable></devicename>。</para>
<devicename>/dev/cuau<replaceable>N</replaceable></devicename>。</para>
<para>此处的 <quote>N</quote> 表示串口的编号。</para>
@ -713,7 +735,7 @@ sio3: type 16550A</screen>
(这一点与另一些系统, 如基于 &ms-dos; 的系统不同)。
因此, 在基于 &ms-dos; 系统中的
<devicename>COM1</devicename> 在 &os;
中通常叫做 <filename>/dev/cuad0</filename>。</para>
中通常叫做 <filename>/dev/cuau0</filename>。</para>
</note>
<note>
@ -805,7 +827,7 @@ sio3: type 16550A</screen>
<devicename>ttyv0</devicename>)。</para>
<para>默认的 FreeBSD 安装包括一个支持最初四个串口
<devicename>ttyd0</devicename> 到 <devicename>ttyd3</devicename>
<devicename>ttyu0</devicename> 到 <devicename>ttyu3</devicename>
的<filename>/etc/ttys</filename> 文件。
如果您从那些端口中某一个使用终端,您不需要添加另一个记录。</para>
@ -818,13 +840,13 @@ sio3: type 16550A</screen>
VT-100 终端的286IBM PC。 在 <filename>/etc/ttys</filename>
文件中的相应的记录是这样的:</para>
<programlisting>ttyd1<co
<programlisting>ttyu1<co
id="co-ttys-line1col1"> "/usr/libexec/getty std.38400"<co
id="co-ttys-line1col2"> wy50<co
id="co-ttys-line1col3"> on<co
id="co-ttys-line1col4"> insecure<co
id="co-ttys-line1col5">
ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
ttyu5 "/usr/libexec/getty std.19200" vt100 on insecure
</programlisting>
<calloutlist>
@ -934,11 +956,11 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
<screen>&prompt.root; <userinput>ps -axww|grep getty</userinput></screen>
<para>您将看到一个终端的记录。例如,下面的显示表明一个<command>getty</command>
正在第二个串口 <devicename>ttyd1</devicename> 运行,
正在第二个串口 <devicename>ttyu1</devicename> 运行,
正在 <filename>/etc/gettytab</filename> 中使用 <literal>std.38400</literal>
的记录:</para>
<screen>22189 d1 Is+ 0:00.03 /usr/libexec/getty std.38400 ttyd1</screen>
<screen>22189 d1 Is+ 0:00.03 /usr/libexec/getty std.38400 ttyu1</screen>
<para>如果没有 <command>getty</command> 进程运行,
确信您已经在<filename>/etc/ttys</filename>中启用了端口。
@ -1000,6 +1022,17 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
</authorgroup>
</sect1info>
<title>拨入服务</title>
<warning>
<para>从 &os; 8.0 开始, 用于串口的设备节点从
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户需要根据实际情况对这份文档中的例子进行必要的调整。</para>
</warning>
<indexterm><primary>拨入服务</primary></indexterm>
<para>为拨入服务配置FreeBSD系统与连接到终端是非常相似的除非您正在使用
@ -1111,10 +1144,10 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure
<indexterm><primary>getty</primary></indexterm>
<para>对于终端, <command>init</command>
会在每个配置串口上为每个拨入连接产生一个 <command>getty</command>
进程。 例如, 如果一个 modem 被附带在 <filename>/dev/ttyd0</filename>
进程。 例如, 如果一个 modem 被附带在 <filename>/dev/ttyu0</filename>
中,用命令<command>ps ax</command>可以显示下面这些:</para>
<screen> 4850 ?? I 0:00.09 /usr/libexec/getty V19200 ttyd0</screen>
<screen> 4850 ?? I 0:00.09 /usr/libexec/getty V19200 ttyu0</screen>
<para>当用户拨上modem 并使用它进行连接时, <acronym>CD</acronym>
线就会被 modem 认出。 内核注意到载波信号已经被检测到,
@ -1277,11 +1310,11 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
但我们必须指定一个不同的终端类型。
锁定速度和匹配速度配置的通用格式是:</para>
<programlisting>ttyd0 "/usr/libexec/getty <replaceable>xxx</replaceable>" dialup on</programlisting>
<programlisting>ttyu0 "/usr/libexec/getty <replaceable>xxx</replaceable>" dialup on</programlisting>
<para>上面的第一条是这个记录的设备特定文件 &mdash;
<devicename>ttyd0</devicename> 表示
<filename>/dev/ttyd0</filename>
<devicename>ttyu0</devicename> 表示
<filename>/dev/ttyu0</filename>
是这个 <command>getty</command> 将被监视的文件。 第二条
<literal>"/usr/libexec/getty
<replaceable>xxx</replaceable>"</literal>
@ -1317,7 +1350,7 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
对于一个速度被锁定在 19.2kbit/s 的 modem
<filename>ttys</filename> 记录是这样的:</para>
<programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
<programlisting>ttyu0 "/usr/libexec/getty std.19200" dialup on</programlisting>
<para>如果您的 modem 被锁定在一个不同的数据速度,
为 std.speed 使用适当的速度来代替 std.19200。
@ -1334,7 +1367,7 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
Kbit/s 开始的可匹配速度的 modem 添加上面建议的记录, 您的
<filename>ttys</filename> 记录可能是这样的:</para>
<programlisting>ttyd0 "/usr/libexec/getty V19200" dialup on</programlisting>
<programlisting>ttyu0 "/usr/libexec/getty V19200" dialup on</programlisting>
</sect4>
</sect3>
@ -1357,8 +1390,8 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
<varname>crtscts</varname> 可以通过在
<filename>/etc/rc.d/serial</filename> 增加下面的设置来实现:</para>
<programlisting># Serial port initial configuration
stty -f /dev/ttyd1.init crtscts
stty -f /dev/cuad1.init crtscts</programlisting>
stty -f /dev/ttyu1.init crtscts
stty -f /dev/cuau1.init crtscts</programlisting>
</sect3>
</sect2>
@ -1518,26 +1551,26 @@ AT&amp;B2&amp;W</programlisting>
<command>getty</command>进程。
您将在进程显示中看到像这样的一行:</para>
<screen> 114 ?? I 0:00.10 /usr/libexec/getty V19200 ttyd0
115 ?? I 0:00.10 /usr/libexec/getty V19200 ttyd1</screen>
<screen> 114 ?? I 0:00.10 /usr/libexec/getty V19200 ttyu0
115 ?? I 0:00.10 /usr/libexec/getty V19200 ttyu1</screen>
<para>如果您看到是这样的:</para>
<screen> 114 d0 I 0:00.10 /usr/libexec/getty V19200 ttyd0</screen>
<screen> 114 d0 I 0:00.10 /usr/libexec/getty V19200 ttyu0</screen>
<para>modem 不接收呼叫, 这意味着 <command>getty</command>
已经在通讯端口打开了。 这可以指出线缆有问题或 modem 错误配置,
因为 <command>getty</command> 无法打开通讯端口。</para>
<para>如果您没有看到任何 <command>getty</command> 进程等待打开想要的
<devicename>ttyd<replaceable>N</replaceable></devicename> 端口,
<devicename>ttyu<replaceable>N</replaceable></devicename> 端口,
在 <filename>/etc/ttys</filename> 中双击您的记录看看那儿是否有错误。
另外,检查日志文件 <filename>/var/log/messages</filename>
看看是否有一些来自 <command>init</command> 或
<command>getty</command> 的问题日志。 如果有任何信息,
仔细检查配置文件 <filename>/etc/ttys</filename> 和
<filename>/etc/gettytab</filename>,还有相应的设备文件
<devicename>/dev/ttyd<replaceable>N</replaceable></devicename>
<devicename>/dev/ttyu<replaceable>N</replaceable></devicename>
是否有错误,丢失记录,或丢失了设备指定文件。</para>
</sect3>
@ -1584,7 +1617,18 @@ AT&amp;B2&amp;W</programlisting>
<sect1 id="dialout">
<title>拨出设备</title>
<indexterm><primary>dial-out service</primary></indexterm>
<warning>
<para>从 &os; 8.0 开始, 用于串口的设备节点从
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户需要根据实际情况对这份文档中的例子进行必要的调整。</para>
</warning>
<indexterm><primary>拨出服务</primary></indexterm>
<para>下面将让您的主机通过 modem 连接到另一台计算机上。
这只要适当地建立一个终端作为远程主机就可以。</para>
@ -1621,13 +1665,13 @@ AT&amp;B2&amp;W</programlisting>
</indexterm>
<para>在
<filename>/etc/remote</filename> 文件中增加一个 <quote>direct</quote> 项。
举例而言, 如果您的调制解调器挂在第一个串口, 即 <filename>/dev/cuad0</filename> 上,
举例而言, 如果您的调制解调器挂在第一个串口, 即 <filename>/dev/cuau0</filename> 上,
则应添加下面这行:</para>
<programlisting>cuad0:dv=/dev/cuad0:br#19200:pa=none</programlisting>
<programlisting>cuau0:dv=/dev/cuau0:br#19200:pa=none</programlisting>
<para>此处应使用您的 modem 所支持的最高 br bps 速率。
接下来, 输入 <command>tip cuad0</command> 就可以连到 modem 上了。</para>
接下来, 输入 <command>tip cuau0</command> 就可以连到 modem 上了。</para>
<para>此外, 也可以 <username>root</username> 身份执行 <command>cu</command>
命令:</para>
@ -1635,7 +1679,7 @@ AT&amp;B2&amp;W</programlisting>
<screen>&prompt.root; <userinput>cu -l<replaceable>line</replaceable> -s<replaceable>speed</replaceable></userinput></screen>
<para><replaceable>line</replaceable> 是串口
(例如 <filename>/dev/cuad0</filename>) 而
(例如 <filename>/dev/cuau0</filename>) 而
<replaceable>speed</replaceable> 则是速率
(如 <literal>57600</literal>)。 当您输入完 AT
之后, 按 <command>~.</command> 即可退出。</para>
@ -1659,9 +1703,9 @@ AT&amp;B2&amp;W</programlisting>
<quote>generic</quote> 的记录。 例如:</para>
<programlisting>tip115200|Dial any phone number at 115200 bps:\
:dv=/dev/cuad0:br#115200:at=hayes:pa=none:du:
:dv=/dev/cuau0:br#115200:at=hayes:pa=none:du:
tip57600|Dial any phone number at 57600 bps:\
:dv=/dev/cuad0:br#57600:at=hayes:pa=none:du:</programlisting>
:dv=/dev/cuau0:br#57600:at=hayes:pa=none:du:</programlisting>
<para>然后, 可以执行:</para>
@ -1670,7 +1714,7 @@ tip57600|Dial any phone number at 57600 bps:\
<para>如果您更喜欢<command>cu</command>而不是<command>tip</command>,使用一个通用的<literal>cu</literal>记录:</para>
<programlisting>cu115200|Use cu to dial any number at 115200bps:\
:dv=/dev/cuad1:br#57600:at=hayes:pa=none:du:</programlisting>
:dv=/dev/cuau1:br#57600:at=hayes:pa=none:du:</programlisting>
<para>然后键入:</para>
@ -1700,7 +1744,7 @@ 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/cuad2:br#38400:at=hayes:du:pa=none:pn=5551234:</programlisting>
:dv=/dev/cuau2:br#38400:at=hayes:du:pa=none:pn=5551234:</programlisting>
<para>将让您键入 <command>tip pain</command> 或 <command>tip
muffin</command> 连接到主机 <hostid>pain</hostid> 或
@ -1719,7 +1763,7 @@ deep13:Gizmonics Institute terminal server:\
<programlisting>big-university:\
:pn=\@:tc=dialout
dialout:\
:dv=/dev/cuad3:br#9600:at=courier:du:pa=none:</programlisting>
:dv=/dev/cuau3:br#9600:at=courier:du:pa=none:</programlisting>
<para>接着, 在 <filename>/etc/phones</filename>
中列出大学的电话号码:</para>
@ -1861,6 +1905,17 @@ raisechar=^^</programlisting>
</authorgroup>
</sect1info>
<title>设置串口控制台</title>
<warning>
<para>从 &os; 8.0 开始, 用于串口的设备节点从
<filename>/dev/cuad<replaceable>N</replaceable></filename> 改为了
<filename>/dev/cuau<replaceable>N</replaceable></filename>
<filename>/dev/ttyd<replaceable>N</replaceable></filename> 改为了
<filename>/dev/ttyu<replaceable>N</replaceable></filename>。
&os;&nbsp;7.X 用户需要根据实际情况对这份文档中的例子进行必要的调整。</para>
</warning>
<indexterm><primary>serial console</primary></indexterm>
<sect2 id="serialconsole-intro">
@ -1899,7 +1954,7 @@ raisechar=^^</programlisting>
<step>
<para>编辑 <filename>/etc/ttys</filename> 并把
<devicename>ttyd0</devicename> 的
<devicename>ttyu0</devicename> 的
<literal>off</literal> 改为 <literal>on</literal>
<literal>dialup</literal> 改为 <literal>vt100</literal>。
否则通过串口控制台上将不会提示输入口令,
@ -2023,7 +2078,7 @@ raisechar=^^</programlisting>
<para>例如:</para>
<programlisting>device sio0 at isa? port IO_COM1 flags 0x10 irq 4</programlisting>
<programlisting>device sio0 flags 0x10</programlisting>
<para>看看 &man.sio.4; 的联机手册了解更多信息。</para>
@ -2191,7 +2246,7 @@ boot:</screen>
<sect3>
<title>例1 您为 <devicename>sio0</devicename> 设置标记 0x10</title>
<programlisting>device sio0 at isa? port IO_COM1 flags 0x10 irq 4</programlisting>
<programlisting>device sio0 flags 0x10</programlisting>
<informaltable frame="none" pgwide="1">
<tgroup cols="4">
@ -2254,7 +2309,7 @@ boot:</screen>
<sect3>
<title>例2您为 <devicename>sio0</devicename> 设置标记为 0x30</title>
<programlisting>device sio0 at isa? port IO_COM1 flags 0x30 irq 4</programlisting>
<programlisting>device sio0 flags 0x30</programlisting>
<informaltable frame="none" pgwide="1">
<tgroup cols="4">
@ -2391,11 +2446,11 @@ console="comconsole,vidconsole"</programlisting>
例如, 如果要将 <devicename>sio1</devicename>
(<devicename>COM2</devicename>) 作为控制台:</para>
<programlisting>device sio1 at isa? port IO_COM2 flags 0x10 irq 3</programlisting>
<programlisting>device sio1 flags 0x10</programlisting>
<para>或</para>
<programlisting>device sio1 at isa? port port IO_COM2 flags 0x30 irq 3</programlisting>
<programlisting>device sio1 flags 0x30</programlisting>
<para>其他端口的控制台标记也不要设。</para>
</step>
@ -2436,13 +2491,13 @@ options DDB</programlisting>
<para>用一个编辑器打开 <filename>/etc/ttys</filename> 文件,
然后找到下面的行:</para>
<programlisting>ttyd0 "/usr/libexec/getty std.9600" unknown off secure
ttyd1 "/usr/libexec/getty std.9600" unknown off secure
ttyd2 "/usr/libexec/getty std.9600" unknown off secure
ttyd3 "/usr/libexec/getty std.9600" unknown off secure</programlisting>
<programlisting>ttyu0 "/usr/libexec/getty std.9600" unknown off secure
ttyu1 "/usr/libexec/getty std.9600" unknown off secure
ttyu2 "/usr/libexec/getty std.9600" unknown off secure
ttyu3 "/usr/libexec/getty std.9600" unknown off secure</programlisting>
<para><devicename>ttyd0</devicename> 到
<devicename>ttyd3</devicename> 相当于
<para><devicename>ttyu0</devicename> 到
<devicename>ttyu3</devicename> 相当于
<devicename>COM1</devicename> 到 <devicename>COM4</devicename>。
可以打开或关闭某个端口。 如果您已经改变了串口的速度,
还必须改掉标准的 <literal>9600</literal>

View file

@ -1,18 +0,0 @@
#
# Build the Handbook with just the content from this chapter.
#
# The FreeBSD Simplified Chinese Project
# Original Revision: 1.1
#
# $FreeBSD$
#
CHAPTERS= updating/chapter.sgml
VPATH= ..
MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX}
DOC_PREFIX?= ${.CURDIR}/../../../..
.include "../Makefile"

View file

@ -1,477 +0,0 @@
<!--
Original Revision: 1.2
$FreeBSD$
-->
<chapter id="updating">
<chapterinfo>
<authorgroup>
<author>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
<contrib>Written by </contrib>
</author>
</authorgroup>
<authorgroup>
<author>
<firstname>Colin</firstname>
<surname>Percival</surname>
<contrib>Based on notes provided by </contrib>
</author>
</authorgroup>
</chapterinfo>
<title>更新 &os;</title>
<sect1 id="updating-synopsis">
<title>概述</title>
<indexterm><primary>Updating FreeBSD</primary></indexterm>
<indexterm>
<primary>freebsd-update</primary>
<see>Updating</see>
</indexterm>
<para>长久以来,&os 操作系统的一个主要方面始终没有改变,
那就是使用应用程序和工具去获得系统各种大大小小的更新。</para>
<para>多年来用户升级他们的系统,收集安全补丁,
无损 Ports Collection 更新 ports 和 package
唯一的选择是使用 <application>CVSup</application>
工具。</para>
<para>当然原来的 <application>CVSup</application> 仍被支持,
现在有一个 C 语言的版本加入了 &os;
并且有些新的方法能用来获得系统更新。</para>
<para>类似像 &man.portsnap.8; 和 &man.freebsd-update.8;
这样的工具使得升级过程变得更加简便有效。
这些新的方法在提高效率的同时也给用户提供一个简洁的接口。
一些新的工具能通过 &man.cron.8; 执行,
从而减少系统管理员的人为介入,这会有益于那些管理着成百上千台 &os;
的人。<para>
<para>这一章节将会介绍这些新的方法,
以及用户跟系统管理如何从这些新方法的实用和易用中获益。</para>
<para>在阅读了这章以后,你将了解:</para>
<itemizedlist>
<listitem>
<para>哪些工具能被用来更新系统和 Ports Collection。<para>
</listitem>
<listitem>
<para>如何使用 <command>freebsd-update</command>
打安全补丁和完成主要及次要的 &os; 升级。</para>
</listitem>
<listitem>
<para>如何比较已安装的系统与原来已知拷贝的状态。</para>
</listitem>
</itemizedlist>
<para>在阅读这章之前,你应该:</para>
<itemizedlist>
<listitem>
<para>了解一些 &unix; 和 &os; 的基础知识
(<xref linkend="basics">)。</para>
</listitem>
<listitem>
<para>熟悉基本的内核配置/编译方法
(<xref linkend="kernelconfig">)。</para>
</listitem>
<listitem>
<para>熟悉使用 Ports Collection 在 &os;
上安装第三方的应用程序
(<xref linkend="ports">)。</para>
</listitem>
<listitem>
<para>熟悉组成 &os; 的各个部分以及使用
&man.mergemaster.8; 工具
(<xref linkend="cutting-edge">)。</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="updating-freebsdupdate">
<title>FreeBSD 更新</title>
<para>打安全补丁是对于维护计算机软件的一个重要部分,
特别是对于操作系统。对于 &os; 来说,
很长的一段时间以来这都不是一件容易的事情。
补丁打在源代码上,代码需要被重新编译为二进制,
然后再重新安装编译后的程序。</para>
<para>&os; 引入了 <command>freebsd-update</command>
工具之后这便不再是问题了。这个工具提供了 2 种功能。
第一,它可以把二进制的安全和勘误更新直接应用于 &os;
的基本系统,而不需要重新编译和安装。第二,
这个工具还支持主要跟次要的发行版的升级。</para>
<note>
<para>由安全小组支持的各种体系结构和发行版都可使用二进制更新。
然而有些特性,比如升级 &os; 操作系统需要最近的 &man.freebsd-update.8;
和 &os; 6.3。在升级到一个新的发行版本之前,
应先阅读一下当前发行版的声明,
因为他们可能包含有关于你期望升级版本的重要消息。
这些发行声明可以通过以下链接查阅:
<ulink url="http://www.FreeBSD.org/releases/"></ulink>。</para>
</note>
<para>如果 <command>crontab</command> 中存在有用到
<command>freebsd-update</command> 特性的部分,
那么这些在开始以下操作前必须先被禁止。最新版本的
<command>freebsd-update</command> 可以通过上面的
<acronym>URL</acronym> 下载用 <command>tar</command>
和 <command>gzip</command> 打包的版本,
并按照下面的命令安装:</para>
<screen>&prompt.root; <userinput>gunzip -c freebsd-update-upgrade.tgz | tar xvf -</userinput>
&prompt.root; <userinput>mv freebsd-update.sh /usr/sbin/freebsd-update</userinput>
&prompt.root; <userinput>mv freebsd-update.conf /etc</userinput></screen>
<para>对于所有当前流行的发行版本来说,
并不需要下载最新版。</para>
<sect2>
<title>配置文件</title>
<para>有些用户可能希望调整配置文件来更好的控制升级过程。
可用参数的文档非常齐全,
但下面的这些可能需要进一步的解释:</para>
<programlisting># Components of the base system which should be kept updated.
Components src world kernel</programlisting>
<para>这个参数是控制 &os; 的哪一部分将被保持更新。
默认的是更新源代码,整个基本系统还有内核。
这些部件跟安装时的那些相同,举例来说,
在这里加入 “world/games” 就会允许打入游戏相关的补丁。
使用 “src/bin” 则是允许更新
<filename class="directory">src/bin</filename>
目录中的源代码。</para>
<para>最好的选择是把这个选项保留为默认值,
因为如果要修改它去包含一些指定的选项,
就需要用户列出每一个想要更新的项目。
这可能会引起可怕的后果,
因为部分的源代码和二进制程序得不到同步。</para>
<programlisting># Paths which start with anything matching an entry in an IgnorePaths
# statement will be ignored.
IgnorePaths</programlisting>
<para>添加路径,比如
<filename class="directory">/bin</filename> 或者
<filename class="directory">/sbin</filename>
让这些指定的目录在更新过程中不被修改。
这个选项能够防止本地的修改被
<command>freebsd-update</command> 覆盖。</para>
<programlisting># Paths which start with anything matching an entry in an UpdateIfUnmodified
# statement will only be updated if the contents of the file have not been
# modified by the user (unless changes are merged; see below).
UpdateIfUnmodified /etc/ /var/ /root/ /.cshrc /.profile</programlisting>
<para>更新指定目录中的未被修改的配置文件。
用户的任何修改都会使这些文件的自动更新失效。
还有另外一个选项,
<literal>KeepModifiedMetadata</literal>
这个能让 <command>freebsd-update</command>
在合并时保存修改。</para>
<programlisting># When upgrading to a new &os; release, files which match MergeChanges
# will have any local changes merged into the version from the new release.
MergeChanges /etc/ /var/named/etc/</programlisting>
<para>一个 <command>freebsd-update</command>
应该尝试合并的配置文件的列表。文件合并的过程是
一系列的 &man.diff.1; 补丁类似于更少选项的 &man.mergemaster.8;
合并的选项是接受,打开一个文本编辑器,或者
<command>freebsd-update</command> 会被中止。
在不能确定的时候,请先备份 <filename class="directory">/etc</filename>
然后接受合并。更多关于 <command>mergemaster</command>
的信息请参阅 <xref linkend="cutting-edge">。</para>
<programlisting># Directory in which to store downloaded updates and temporary
# files used by &os; Update.
# WorkDir /var/db/freebsd-update</programlisting>
<para>这个目录是放置所有补丁和临时文件的。
用户做一个版本升级的话,请确认此处至少有 1 GB
的可用磁盘空间。</para>
<programlisting># When upgrading between releases, should the list of Components be
# read strictly (StrictComponents yes) or merely as a list of components
# which *might* be installed of which &os; Update should figure out
# which actually are installed and upgrade those (StrictComponents no)?
# StrictComponents no</programlisting>
<para>当设置成 <literal>yes</literal> 时,
<command>freebsd-udpate</command> 将假设这个
<literal>Components</literal> 列表时完整的,
并且对此列表以外的项目不会修改。实际上就是
<command>freebsd-update</command> 会尝试更新
<literal>Componets</literal>
列表里的每一个文件。</para>
</sect2>
<sect2>
<title>安全补丁</title>
<para>安全补丁存储在远程的机器上,
可以使用如下的命令下载并安装:</para>
<screen>&prompt.root; <userinput>freebsd-update fetch</userinput>
&prompt.root; <userinput>freebsd-update install</userinput></screen>
<para>如果给内核打了补丁,那么系统需要重新启动。
如果一切都进展顺利,系统就应该被打好了补丁而且
<command>freebsd-update</command> 可由夜间
&man.cron.8; 执行。在 <filename>/etc/crontab</filename>
中加入以下条目足以完成这项任务:</para>
<programlisting>@daily root freebsd-update cron</programlisting>
<para>这条记录是说明每天运行一次
<command>freebsd-update</command>。用这种方法,
使用了 <option>cron</option> 参数,
<command>freebsd-update</command> 仅检查是否存在更新。
如果有了新的补丁,就会自动下载到本地的磁盘,
但不会自动给系统打上。<username>root</username>
会收到一封电子邮件告知需手动安装补丁。</para>
<para>如果出现了错误,可以使用下面的
<command>freebsd-update</command>
命令回退到上一次的修改:</para>
<screen>&prompt.root; <userinput>freebsd-update rollback</userinput></screen>
<para>完成以后如果内核或任何的内核模块被修改的话,
就需要重新启动系统。这将使 &os;
装载新的二进制程序进内存。</para>
<note>
<para><command>freebsd-update</command> 只能应用于
<filename>GENERIC</filename> 内核。如果对
<filename>GENERIC</filename>
做了任何修改或者安装了一个自行编译的内核,
<command>freebsd-update</command>
就无法完成升级&nbsp;&mdash; 如前一个范例那样失败后
产生一条错误信息。</para>
</note>
</sect2>
<sect2>
<title>重大和次要的更新</title>
<para>这个过程会删除旧的目标文件和库,
这将使大部分的第三方应用程序无法删除。
建议将所有安装的 ports 先删除然后重新安装,或者稍后使用
<filename role="package">ports-mgmt/portupgrade</filename>
工具升级。 大多数用户将会使用如下命令尝试编译:</para>
<screen>&prompt.root; <userinput>portupgrade -af</userinput></screen>
<para>这将确保所有的东西都会被正确的重新安装。
请注意环境变量 <makevar>BATCH</makevar> 设置成
<literal>yes</literal> 的话将在整个过程中对所有询问回答
<literal>yes</literal>,这会帮助在编译过程中免去人工的介入。</para>
<para>重大和次要的更新可以由
<command>freebsd-update</command> 命令后指定一个发行版本来执行,
举例来说,下面的命令将帮助你升级到 &os;&nbsp;6.3</para>
<screen>&prompt.root; <userinput>freebsd-update -r 6.3-RELEASE upgrade</userinput></screen>
<para>在这个命令被执行后,<command>freebsd-update</command>
将会先解析配置文件和评估当前的系统以获得更新系统所需的必要信息。
然后便会显示出一个包含了已检测到与未检测到的组件列表。
例如:</para>
<screen>Looking up update.FreeBSD.org mirrors... 1 mirrors found.
Fetching metadata signature for 6.3-BETA1 from update1.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
The following components of FreeBSD seem to be installed:
kernel/smp src/base src/bin src/contrib src/crypto src/etc src/games
src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue
src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin
world/base world/info world/lib32 world/manpages
The following components of FreeBSD do not seem to be installed:
kernel/generic world/catpages world/dict world/doc world/games
world/proflibs
Does this look reasonable (y/n)? y</screen>
<para>此时,<command>freebsd-update</command>
将会尝试下载所有升级所需的文件。在某些情况下,
用户可能被问及需安装些什么和如何进行之类的问题。<para>
<para>下载完所有的补丁之后,它们很快就会被打上。
这个过程可能会持续一段时间,取决与机器的速度和当前的负载情况。
配置文件将会被合并&nbsp;&mdash; 这一部分需要用户的参与,
因为文件可能被合并或者屏幕上弹出了一个文本编辑器用来手工合并。
在处理过程中,每一个成功的合并都会给用户显示出来。
失败或者被忽略的合并则会引起合并程序的中止。
用户可能想要备份一下 <filename class="directory">/etc</filename>
之后手工合并重要的文件,比如
<filename>master.passwd</filename> 或
<filename>group</filename>。</para>
<note>
<para>系统至此还没有被修改,所有的补丁和合并都在另外一个目录中进行。
当所有的补丁都被成功的打上了以后,所有的配置文件都被合并后,
我们就已经完成了整个升级过程中最困难的部分,
下面就需要用户来安装这些变更了。</para>
</note>
<para>一旦这个步骤完成后,使用如下的命令将升级后的文件安装到磁盘上。</para>
<screen>&prompt.root; <userinput>freebsd-update install</userinput></screen>
<para>内核与内核模块会先被打上补丁。此时机器必须要重新启动。
使用下面的命令重启机器,这样新的内核将载入内存:</para>
<screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
<para>在系统重新上线后,需要再次运行 <command>freebsd-update</command>。
升级的状态被保存着,这样 <command>freebsd-update</command>
就无需重头开始,但是会删除所有旧的共享库和目标文件。
执行如下命令继续这个阶段的升级:</para>
<screen>&prompt.root; <userinput>freebsd-update install</userinput></screen>
<note>
<para>取决与是否有库的版本更新,通常只有 2 个而不是
3 个安装阶段。</para>
</note>
<para>现在需要重新编译和安装第三方软件。
这么做的原因是某些已安装的软件可能依赖于在升级过程中已删除的库。
可使用 <filename role="package">ports-mgmt/portupgrade</filename>
自动化这个步骤,以如下的命令开始:</para>
<screen>&prompt.root; <userinput>portupgrade -f ruby</userinput>
&prompt.root; <userinput>rm /var/db/pkg/pkgdb.db</userinput>
&prompt.root; <userinput>portupgrade -f ruby18-bdb</userinput>
&prompt.root; <userinput>rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db</userinput>
&prompt.root; <userinput>portupgrade -af</userinput></screen>
<para>一旦这个完成了以后,再最后一次运行
<command>freebsd-update</command> 来结束升级过程。
执行如下命令处理升级中的所有细节:</para>
<screen>&prompt.root; <userinput>freebsd-update install</userinput></screen>
<para>重新启动机器进入新版本的 &os; 升级过程至此就完成了。</para>
</sect2>
<sect2>
<title>系统状态对照</title>
<para><command>freebsd-update</command>
工具也可被用来对着一个已知完好的 &os; 拷贝测试当前的版本。
这个选项评估当前的系统工具,库和配置文件。
使用以下的命令开始对照:</para>
<screen>&prompt.root; <userinput>freebsd-update IDS &gt;&gt; outfile.ids</userinput></screen>
<warning>
<para>这个命令的名称是 <acronym>IDS</acronym>
它并不是一个像
<filename role="package">security/snort</filename>
这样的入侵检测系统的替代品。因为
<command>freebsd-update</command> 在磁盘上存储数据,
很显然它们有被篡改的可能。
当然也可以使用一些方法来降低被篡改的可能性,比如设置
<varname>kern.securelevel</varname> 和不使用时把
<command>freebsd-update</command>
数据放在只读文件系统上,例如 <acronym>DVD</acronym> 或
安全存放的外置 <acronym>USB</acronym> 磁盘上。
</warning>
<para>现在系统将会被检查,生成一份包含了文件和它们的 &man.sha256.1;
哈希值的清单,已知发行版中的值与当前系统中安装的值将会被打印到屏幕上。
这就是为什么输出被送到了 <filename>outfile.ids</filename> 文件。
它滚动的太块无法用肉眼对照,而且会很快填满控制台的缓冲区。</para>
<para>这个文件中有非常长的行,但输出的格式很容易分析。
举例来说,要获得一份与发行版中不同哈希值的文件列表,
已可使用如下的命令:</para>
<screen>&prompt.root; <userinput>cat outfile.ids | awk '{ print $1 }' | more</userinput>
/etc/master.passwd
/etc/motd
/etc/passwd
/etc/pf.conf</screen>
<para>这份输出时删节缩短后的,其实是有更多的文件。
其中有些文件并非人为修改,比如
<filename>/etc/passwd</filename>
被修改是因为添加了用户进系统。在某些情况下,
还有另外的一些文件,诸如内核模块与
<command>freebsd-update</command> 的不同是因为它们被更新过了。
为了指定的文件或目录排除在外,把它们加到
<filename>/etc/freebsd-update.conf</filename> 的
<literal>IDSIgnorePaths</literal> 选项中。</para>
<para>除了前面讨论过的部分之外,
这也能被当作是对升级方法的详细补充。</para>
</sect2>
</sect1>
<sect1 id="updating-portsnap">
<title>Portsnap 一个 Ports Collection 更新工具</title>
<para>&os; 基本系统也包括了一个更新 Ports Collection 的工具:
&man.portsnap.8;。在运行之后,它会连上一个远程网站,
校验安全密钥,然后下载一份 Ports Collection 的拷贝。
密钥是用来校验所有下载文件的完整性,确保它们在传输是未被修改。
使用以下的命令下载最新的 Ports Collection</para>
<screen>&prompt.root; <userinput>portsnap fetch</userinput>
Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Wed Aug 6 18:00:22 EDT 2008 to Sat Aug 30 20:24:11 EDT 2008.
Fetching 3 metadata patches.. done.
Applying metadata patches... done.
Fetching 3 metadata files... done.
Fetching 90 patches.....10....20....30....40....50....60....70....80....90. done.
Applying patches... done.
Fetching 133 new ports or files... done.</screen>
<para>这个例子展示的是 &man.portsnap.8;
发现并校验了几个用于当前 ports 的补丁。这还表明以前运行过,
如果是第一次运行的话,那么仅仅只会下载 Ports Collection。</para>
<para>在 &man.portsnap.8; 成功完成一次
<command>fetch</command> 操作后,而且本地系统上的 Ports Collection
和随之而来的补丁通过校验以后。键入以下命令安装更新文件:</para>
<screen>&prompt.root; <userinput>portsnap extract</userinput>
/usr/ports/.cvsignore
/usr/ports/CHANGES
/usr/ports/COPYRIGHT
/usr/ports/GIDs
/usr/ports/KNOBS
/usr/ports/LEGAL
/usr/ports/MOVED
/usr/ports/Makefile
/usr/ports/Mk/bsd.apache.mk
/usr/ports/Mk/bsd.autotools.mk
/usr/ports/Mk/bsd.cmake.mk
<replaceable>...</replaceable></screen>
<para>至此更新就完成了,然后便可以使用更新后的
Ports Collection 来安装或升级应用程序。</para>
</sect1>
</chapter>

View file

@ -8,7 +8,7 @@
For the FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.47
Original Revision: 1.48
$FreeBSD$
-->
@ -677,16 +677,6 @@
前述的配置将使 Vinum 创建以下设备节点:</para>
<itemizedlist>
<listitem>
<note><para>这些内容仅适用于旧式的 Vinum
实现。</para></note>
<para>控制设备
<filename class="devicefile">/dev/vinum/control</filename> 和
<filename class="devicefile">/dev/vinum/controld</filename>
分别由 &man.gvinum.8; 和 Vinum 服务使用。</para>
</listitem>
<listitem>
<para>每个卷对应的设备项。 这些是 Vinum 使用的主要设备。
因此, 前述配置包括下列设备:
@ -697,15 +687,6 @@
<filename class="devicefile">/dev/gvinum/raid10</filename>。</para>
</listitem>
<listitem>
<note><para>这些内容仅适用于旧式的 Vinum
实现。</para></note>
<para>一个包含每个驱动器对应设备的
<filename class="directory">/dev/vinum/drive</filename>
目录。 这些项事实上是指向对应磁盘节点的符号连接。</para>
</listitem>
<listitem>
<para>所有卷的直接项都存放在
<filename class="directory">/dev/gvinum/</filename> 中。</para>
@ -784,12 +765,6 @@ newfs: /dev/gvinum/concat: can't figure out file system partition</screen>
&man.newfs.8;</para>
<screen>&prompt.root; <userinput>newfs /dev/gvinum/concat</userinput></screen>
<note><para>对于 &os; 5.0 之前的版本, &man.newfs.8; 还需要指定一个
<option>-v</option> 参数, 而且其设备命名方式也是旧式的:</para>
<screen>&prompt.root; <userinput>newfs -v /dev/vinum/concat</userinput></screen></note>
</sect2>
</sect1>
@ -843,28 +818,14 @@ sd name bigraid.p0.s4 drive e plex bigraid.p0 state initializing len 4194304b dr
<sect3 id="vinum-rc-startup">
<title>自动启动</title>
<note>
<para>这些内容仅适用于旧式的 Vinum 实现。
<emphasis>Gvinum</emphasis> 在通过 &man.loader.conf.5;
加载了内核模块之后就能自动启动。
在启动时加载 <emphasis>Gvinum</emphasis> 模块,
需在 <filename>/boot/loader.conf</filename> 中加入
<literal>geom_vinum_load="YES"</literal>。</para>
</note>
<para>
<emphasis>Gvinum</emphasis> 在通过 &man.loader.conf.5;
加载了内核模块之后就能自动启动。
在启动时加载 <emphasis>Gvinum</emphasis> 模块,
需在 <filename>/boot/loader.conf</filename> 中加入
<literal>geom_vinum_load="YES"</literal>。</para>
<para>要在引导系统时自动启动 Vinum 需要在
<filename>/etc/rc.conf</filename> 中加入下面的配置:</para>
<programlisting>start_vinum="YES" # set to YES to start vinum</programlisting>
<para>如果您的系统中没有
<filename>/etc/rc.conf</filename> 创建一个并加入这些设置就可以了。
这样, 系统就会在启动时自动加载 Vinum 的
<acronym>kld</acronym> 并启动配置中所提到的所有对象。
这是在挂接文件系统之前进行的, 因此,
&man.fsck.8; 和挂接文件系统都能够自动地在 Vinum 卷上进行。</para>
<para>当使用 <command>vinum
<para>当使用 <command>gvinum
start</command> 命令来启动 Vinum 时, Vinum 会从某一个 Vinum
驱动器中读取配置数据库。 正常情况下,
每个驱动器上都包含了同样的配置数据库副本,
@ -928,32 +889,9 @@ sd name bigraid.p0.s4 drive e plex bigraid.p0 state initializing len 4194304b dr
</listitem>
<listitem>
<note><para>对 <emphasis>Gvinum</emphasis> 而言,
<para>对 <emphasis>Gvinum</emphasis> 而言,
所有的启动过程都是在内核模块加载时自动进行的, 因此上面的操作,
也就是所要进行的全部工作了。 下面的文字介绍的是旧式的 Vinum
系统, 保留它们的主要是为了方便那些使用旧版系统的用户。</para></note>
<para>Vinum 必须尽早初始化, 因为需要由它来提供根文件系统的卷。
默认情况下, Vinum 的内核部分并不主动地查找可能包含 Vinum
卷信息的驱动器, 而会等待管理员
(或者某个启动脚本) 来执行 <command>vinum
start</command> 命令。</para>
<note><para>下面介绍的是 &os; 所需的配置。</para></note>
<para>通过将下面的配置:</para>
<programlisting>vinum.autostart="YES"</programlisting>
<para>加入 <filename>/boot/loader.conf</filename> Vinum
将在内核部分初始化的过程中, 自动地扫描所有的驱动器以查找 Vinum
信息。</para>
<para>需要说明的是, 并不需要指定内核到什么地方去找根文件系统。
<filename>/boot/loader</filename> 会在 <filename>/etc/fstab</filename>
中查找根文件系统的设备名, 并将这一信息转交给内核。
当需要挂接根文件系统时, 内核会根据设备名来知道它由哪个驱动提供,
并将其转译为内部设备 ID (major/minor 编号)。</para>
也就是所要进行的全部工作了。</para>
</listitem>
</itemizedlist>
</sect2>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.24
Original Revision: 1.25
$FreeBSD$
-->
@ -39,10 +39,14 @@
计算机上安装 &os;。</para>
</listitem>
<!--
Note: There is no working/end-user ready Xen support for FreeBSD as of 07-2010.
Hide all information regarding Xen under FreeBSD.
<listitem>
<para>如何在包含 <application>&xen;</application> 的 Linux 上安装 &os;。</para>
</listitem>
-->
<listitem>
<para>如何在 &microsoft.windows; 以
<application>Virtual PC</application> 安装 &os;。</para>
@ -997,6 +1001,9 @@ xenbr1 8000.feffffffffff no vif0.1
上的相关页面 <ulink url="http://wiki.FreeBSD.org/VirtualBox"></ulink>
以获取最新的信息和故障排查细则。</para>
</sect2>
<!--
Note: There is no working/end-user ready Xen support for FreeBSD as of 07-2010.
Hide all information regarding Xen under FreeBSD.
<sect2 id="virtualization-other">
<title>其他的虚拟化选项</title>
@ -1004,6 +1011,7 @@ xenbr1 8000.feffffffffff no vif0.1
<para><application>&xen;</application>在 &os;
上作为宿主运行依然处于开发之中。</para>
</sect2>
-->
</sect1>
</chapter>

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
Original Revision: 1.201
Original Revision: 1.205
$FreeBSD$
-->
@ -28,26 +28,12 @@
<para>FreeBSD 使用 X11 来为用户提供功能强大的图形用户界面。
X11 是一种可以免费使用的 X 视窗系统,
其实现包括 <application>&xorg;</application> 和
<application>&xfree86;</application> (以及一些其他这里没有讨论的软件包)。 &os; 在包括
&os;&nbsp;5.2.1-RELEASE
在内的版本之前, 都默认安装
<application>&xfree86;</application> 一种由 &xfree86; Project, Inc.
发布的 X11 服务。 从 &os;&nbsp;5.3-RELEASE 开始,
默认并且为官方支持的 X11 变成了
其实现包括 <application>&xorg;</application>
&os; 中默认使用并受官方支持的 X11 实现即是
<application>&xorg;</application> 它是由 X.Org
基金会开发的 X11 服务, 采用与 &os; 类似的授权。 此外,
也有一些用于 &os; 的商业 X 服务器。</para>
<para>这章将介绍 X11 的安装和配置, 并着重强调
<application>&xorg;</application> 的 &xorg.version; 版。
如欲了解关于 <application>&xfree86;</application>
的详细信息 (在较早的 &os; 版本中,
<application>&xfree86;</application> 是默认的 X11
软件包) 或较早版本的 <application>&xorg;</application>
则可以访问存档的旧版 &os; 使用手册, 其网址为 <ulink
url="http://docs.FreeBSD.org/doc/"></ulink>。</para>
<para>欲了解 X11 所支持的显示卡等硬件,
请访问 <ulink
url="http://www.x.org/">&xorg;</ulink> 网站。</para>
@ -308,7 +294,11 @@
<note><para>上面的例子介绍了如何安装完整的
X11 软件包, 包括服务器端,客户端,字体等等。
此外, 也有一些单独的 X11 的 ports 和 packages.</para></note>
此外, 也有一些单独的 X11 的 ports 和 packages.</para>
<para>另外, 如果需要最小化的 X11 软件, 您也可以安装
<filename role="package">x11/xorg-minimal</filename>。</para>
</note>
<para>这一章余下的部分将会讲解如何配置
X11, 以及如何设置一个高效的桌面环境。</para>
@ -730,7 +720,8 @@ EndSection</programlisting>
&truetype; 字体:请参见后面的
<link linkend="truetype">&truetype; 字体一节</link>。</para>
<para>要安装上面的Type1字体您只需要运行下面的命令</para>
<para>如果希望使用
Ports Collection 来安装上面的 Type1 字体, 只需运行下面的命令:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput>
&prompt.root; <userinput>make install clean</userinput></screen>
@ -1466,17 +1457,20 @@ DisplayManager.requestPort: 0</screen>
用户还能通过菜单很容易地选择希望使用的桌面环境 (<application>KDE</application>、
<application>GNOME</application> 或其它)。</para>
<para>要启用 <application>kdm</application> 需要修改
<filename>/etc/ttys</filename> 中的 <literal>ttyv8</literal> 项。
将其改为类似下面的样子:</para>
<para>要启用 <application>kdm</application> 需要根据
<application>KDE</application> 的版本修改不同的配置文件。</para>
<para>对于 <application>KDE3</application></para>
<para>对于 <application>KDE3</application>
<filename>/etc/ttys</filename> 中的 <literal>ttyv8</literal>
项需被改写成如下的形式:</para>
<programlisting>ttyv8 "/usr/local/bin/kdm -nodaemon" xterm on secure</programlisting>
<para>对于 <application>KDE4</application></para>
<para>对于 <application>KDE4</application>
你需要将如下这行加入 <filename>/etc/rc.conf</filename></para>
<programlisting>ttyv8 "/usr/local/kde4/bin/kdm -nodaemon" xterm on secure</programlisting>
<programlisting>local_startup="${local_startup} /usr/local/kde4/etc/rc.d"
kdm4_enable="YES"</programlisting>
</sect3>
</sect2>
@ -1534,7 +1528,8 @@ DisplayManager.requestPort: 0</screen>
<screen>&prompt.root; <userinput>pkg_add -r xfce4</userinput></screen>
<para>另外要从源代码建立使用Ports Collection</para>
<para>另外, 也可以使用
Ports Collection 从源代码联编:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/x11-wm/xfce4</userinput>
&prompt.root; <userinput>make install clean</userinput></screen>