MFen:
books/handbook
advanced-networking/chapter.sgml 1.406 -> 1.408
config/chapter.sgml 1.229 -> 1.232
desktop/chapter.sgml 1.75 -> 1.76
eresources/chapter.sgml 1.183 -> 1.185
firewalls/chapter.sgml 1.81 -> 1.83
install/chapter.sgml 1.389 -> 1.390
kernelconfig/chapter.sgml 1.183 -> 1.184
mac/chapter.sgml 1.70 -> 1.71
mail/chapter.sgml 1.136 -> 1.138
mirrors/chapter.sgml 1.443 -> 1.444
ports/chapter.sgml 1.281 -> 1.281
ppp-and-slip/chapter.sgml 1.179 -> 1.180
printing/chapter.sgml 1.114 -> 1.114
serialcomms/chapter.sgml 1.126 -> 1.128
vinum/chapter.sgml 1.44 -> 1.45
Obtained from: The FreeBSD Simplified Chinese Project
This commit is contained in:
parent
9e2c41fe7b
commit
a1f723d624
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=32405
15 changed files with 285 additions and 403 deletions
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Chinese Documentation Project
|
||||
|
||||
Original revision: 1.406
|
||||
Original revision: 1.408
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -629,6 +629,15 @@ route_net2="-net 192.168.1.0/24 192.168.1.1"</programlisting>
|
|||
配置来开启通道和 <acronym>DVMRP</acronym>。
|
||||
更多关于多播路由配置的信息可以在 &man.mrouted.8;
|
||||
的手册里找到。</para>
|
||||
|
||||
<note>
|
||||
<para>&os; 7.0 开始 &man.mrouted.8;
|
||||
多播路由守护进程已从基本系统中移除。 实现 <acronym>DVMRP</acronym>
|
||||
多播路由协议的程序主要由 &man.pim.4; 取代。相关的
|
||||
&man.map-mbone.8; 和 &man.mrinfo.8 工具也被移除了。
|
||||
这些程序能在 &os; 的 Ports Collection
|
||||
<filename role="port">net/mrouted</filename> 中找到。</para>
|
||||
</note>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
@ -1982,11 +1991,6 @@ ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
|
|||
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3,
|
||||
wMaxPacketSize=49, nframes=6, buffer size=294</screen>
|
||||
|
||||
<note>
|
||||
<para>在 &os; 6.0, 以及 &os; 5.X 系列中 5.5 之前的版本上,
|
||||
蓝牙栈必须手动启动。 在 &os; 5.5、 6.1 以及更新一些的版本上,
|
||||
这一工作会由 &man.devd.8; 自动完成。</para>
|
||||
|
||||
<para>复制 <filename>/usr/share/examples/netgraph/bluetooth/rc.bluetooth</filename>
|
||||
到一个合适的地方,如 <filename>/etc/rc.bluetooth</filename>。
|
||||
这个脚本用于启动和停止 Bluetooth stack (蓝牙栈)。
|
||||
|
|
@ -2005,7 +2009,6 @@ Max. ACL packet size: 192 bytes
|
|||
Number of ACL packets: 8
|
||||
Max. SCO packet size: 64 bytes
|
||||
Number of SCO packets: 8</screen>
|
||||
</note>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
|
@ -2294,12 +2297,6 @@ Bluetooth Profile Descriptor List:
|
|||
|
||||
<screen>&prompt.root; <userinput>/etc/rc.d/sdpd start</userinput></screen>
|
||||
|
||||
<para>在 &os; 6.0, 以及 5.5 之前的 &os; 5.X 版本上,
|
||||
<application>sdpd</application> 没有集成进系统启动脚本。
|
||||
它可以用下面的命令来手动启动:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>sdpd</userinput></screen>
|
||||
|
||||
<para>需要为远端提供蓝牙服务的本地的服务程序会使用本地 SDP
|
||||
进程注册服务。像这样的程序就有 &man.rfcomm.pppd.8;。
|
||||
一旦启动它,就会使用本地 SDP 进程注册蓝牙 LAN 服务。</para>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Chinese Documentation Project
|
||||
|
||||
Original Revision: 1.229
|
||||
Original Revision: 1.232
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -309,10 +309,8 @@
|
|||
当然, 绝大多数情况下, 新式的脚本也会工作的很好。</para>
|
||||
|
||||
<para>每个脚本都应该遵守 &os; 版本所需求的一些规定:
|
||||
每个脚本必须在文件名最后添加一个 <filename>.sh</filename>
|
||||
的扩展名,并且这个脚本能被系统执行。
|
||||
后者可以通过 <command>chmod</command> 命令把权限设置为
|
||||
<literal>755</literal>来实现。
|
||||
每个脚本必须是能够被系统执行,通常可以使用
|
||||
<command>chmod</command> 命令设置成 <literal>555</literal> 权限。
|
||||
它还应该能接受 <literal>start</literal>
|
||||
选项来启动程序并且接受 <literal>stop</literal>
|
||||
选项来结束程序。</para>
|
||||
|
|
@ -343,7 +341,7 @@ exit 0</programlisting>
|
|||
|
||||
<para>可以用如下方法来启动:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput><filename>/usr/local/etc/rc.d/utility.sh</filename> start</userinput></screen>
|
||||
<screen>&prompt.root; <userinput><filename>/usr/local/etc/rc.d/utility</filename> start</userinput></screen>
|
||||
|
||||
<para>现在不是所有第三方软件都需要在
|
||||
<filename>rc.conf</filename> 中进行如此的配置,
|
||||
|
|
@ -1896,7 +1894,7 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
|
|||
尽管并不会真的有 256 个用户同时连接一台生产服务器,
|
||||
但对于高负载的 web 服务器而言, 却可能需要与之类似的资源。</para>
|
||||
|
||||
<para>从 FreeBSD 4.5 开始, <varname>kern.maxusers</varname>
|
||||
<para>变量 <varname>kern.maxusers</varname>
|
||||
会在系统启动时, 根据可用内存的尺寸进行计算, 在内核开始运行之后,
|
||||
可以通过只读的 <varname>kern.maxusers</varname> sysctl 变量值来进行观察。
|
||||
有些情况下, 可能会希望使用更大或更小一些的
|
||||
|
|
@ -1907,9 +1905,7 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
|
|||
一般都可以在引导甚至运行时通过 <filename>/boot/loader.conf</filename>
|
||||
(请参见 &man.loader.conf.5; 联机手册或
|
||||
<filename>/boot/defaults/loader.conf</filename> 文件来获得相关的指导)
|
||||
或这篇文档的其余部分所介绍的方式来调整。 而在
|
||||
FreeBSD 4.4 之前的版本, 则只能通过内核的 &man.config.8;
|
||||
选项 <option>maxusers</option> 来加以调整。</para>
|
||||
或这篇文档的其余部分所介绍的方式来调整。</para>
|
||||
|
||||
<para>在较早的版本中, 如果您明确地将
|
||||
<literal>maxusers</literal> 设置为
|
||||
|
|
@ -1942,13 +1938,7 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
|
|||
<para><literal>maxusers</literal> 并 <emphasis>不能</emphasis>
|
||||
限制实际能够登录到您系统上来的用户的数量。
|
||||
它的主要作用是根据您可能支持的用户数量来为一系列系统数据表设置合理的尺寸,
|
||||
以便提供支持他们所需运行的进程资源。 而 <emphasis>能够</emphasis>
|
||||
限制并发远程以及 X 终端窗口数量的变量则是 <link
|
||||
linkend="kernelconfig-ptys"><literal>pseudo-device pty
|
||||
16</literal></link>。 对于 &os; 5.X, 您不再需要为这一数字而担心,
|
||||
因为 &man.pty.4; 驱动已经是
|
||||
<quote>自动复制的</quote> 了; 您只需在配置文件中指定
|
||||
<literal>device pty</literal> 即可。</para>
|
||||
以便提供支持他们所需运行的进程资源。</para>
|
||||
</note>
|
||||
|
||||
</sect3>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Chinese Project
|
||||
|
||||
Original Revision: 1.75
|
||||
Original Revision: 1.76
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -279,39 +279,20 @@
|
|||
这个 wrapper 也支持 &adobe; &acrobat;、
|
||||
RealPlayer 和很多其他插件。</para>
|
||||
|
||||
<para>应安装 <filename role="package">www/linuxpluginwrapper</filename>
|
||||
port, 这个 port 需要依赖一个很大的 port,
|
||||
<filename role="package">emulators/linux_base</filename>。
|
||||
请按照 port 在安装过程中所给出的提示对您的
|
||||
<filename>/etc/libmap.conf</filename> 进行正确的配置!
|
||||
示范的配置可以在
|
||||
<filename>/usr/local/share/examples/linuxpluginwrapper/</filename>
|
||||
目录找到。</para>
|
||||
<para>应安装 <filename role="package">www/nspluginwrapper</filename>
|
||||
port, 这个 port 需要依赖一个很大的 port
|
||||
<filename role="package">emulators/linux_base</filename>。</para>
|
||||
|
||||
<para>下一步是安装 <filename
|
||||
role="package">www/linux-flashplugin7</filename> port。
|
||||
一旦装好了这个插件, 就可以打开浏览器, 并在地址栏中输入
|
||||
一旦装好了这个插件,需要用户运行一下
|
||||
<command>nspluginwrapper</command> 命令:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>nspluginwrapper -v -a -i</userinput></screen>
|
||||
|
||||
<para>然后就可以打开浏览器, 并在地址栏中输入
|
||||
<literal>about:plugins</literal> 然后按下
|
||||
<keycap>Enter</keycap>。 这将显示目前可用的插件列表。</para>
|
||||
|
||||
<para>如果您没有在这个列表中看到 &flash; 插件,
|
||||
则多数情况下这是由于缺少一个符号链接导致的。
|
||||
您需要以 <username>root</username>,
|
||||
身份执行下面的命令:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>ln -s /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so \
|
||||
/usr/local/lib/browser_plugins/</userinput>
|
||||
&prompt.root; <userinput>ln -s /usr/local/lib/npapi/linux-flashplugin/flashplayer.xpt \
|
||||
/usr/local/lib/browser_plugins/</userinput></screen>
|
||||
|
||||
<para>重新启动浏览器之后,
|
||||
插件就应该会在前面提到的那个列表中有所体现了。</para>
|
||||
|
||||
<note>
|
||||
<para><application>linuxpluginwrapper</application> 只能在
|
||||
&i386; 架构上运行。</para>
|
||||
</note>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.183
|
||||
Original Revision: 1.185
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -435,6 +435,11 @@
|
|||
<entry>FreeBSD 实时扩展的开发</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>&a.ruby.name;</entry>
|
||||
<entry>关于 FreeBSD 上 Ruby 的讨论</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>&a.scsi.name;</entry>
|
||||
<entry>SCSI 子系统</entry>
|
||||
|
|
@ -491,6 +496,11 @@
|
|||
<entry>关于 &os; 的 USB 支持的讨论</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>&a.virtualization.name;</entry>
|
||||
<entry>讨论各种 &os; 支持的虚拟化技术</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>&a.vuxml.name;</entry>
|
||||
<entry>关于 VuXML 的问题讨论</entry>
|
||||
|
|
@ -1197,6 +1207,21 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>&a.ruby.name;</term>
|
||||
|
||||
<listitem>
|
||||
<para><emphasis>有关 FreeBSD 上 Ruby
|
||||
的讨论</emphasis></para>
|
||||
|
||||
<para>这是一个讨论关于 Ruby 在 FreeBSD 上支持的邮件列表。
|
||||
这是一个纯技术的邮件列表。它是为那些移植 Ruby、第三方库以及
|
||||
各种 framework 准备的。</para>
|
||||
|
||||
<para>这里也欢迎参与技术讨论的人。</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>&a.scsi.name;</term>
|
||||
|
||||
|
|
@ -1299,6 +1324,19 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>&a.virtualization.name;</term>
|
||||
|
||||
<listitem>
|
||||
<para><emphasis>讨论各种 &os;
|
||||
支持的虚拟化技术</emphasis></para>
|
||||
|
||||
<para>讨论 &os; 所支持的各种虚拟化技术的邮件列表。
|
||||
在注重实现基本功能,加入新特性的同时,
|
||||
也为用户提供了一个寻求帮助和讨论他们的使用经验的场所。</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</sect2>
|
||||
<sect2 id="eresources-mailfiltering">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.81
|
||||
Original Revision: 1.83
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -169,6 +169,17 @@
|
|||
</sect1>
|
||||
|
||||
<sect1 id="firewalls-pf">
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>John</firstname>
|
||||
<surname>Ferrell</surname>
|
||||
<contrib>Revised and updated by </contrib>
|
||||
<!-- 24 March 2008 -->
|
||||
</author>
|
||||
</authorgroup>
|
||||
</sect1info>
|
||||
|
||||
<title>OpenBSD Packet Filter (PF) 和
|
||||
<acronym>ALTQ</acronym></title>
|
||||
|
||||
|
|
@ -186,48 +197,54 @@
|
|||
<acronym>PF</acronym> 是一个完整的提供了大量功能的防火墙软件,
|
||||
并提供了可选的 <acronym>ALTQ</acronym> (交错队列, Alternate
|
||||
Queuing) 功能。 <acronym>ALTQ</acronym> 提供了服务品质
|
||||
(<acronym>QoS</acronym>) 带宽整形功能,
|
||||
这个功能能够以基于过滤规则的方式来保障不同服务的带宽。
|
||||
OpenBSD Project 在维护 PF 用户指南方面已经做了非常卓越的工作,
|
||||
因此我们不打算在这本使用手册中进行更进一步的阐述,
|
||||
以避免不必要的重复劳动。</para>
|
||||
(<acronym>QoS</acronym>) 带宽整形功能。</para>
|
||||
|
||||
<para>更多的详细信息, 可以在 &os; 版本的 PF 网站上找到: <ulink
|
||||
<para>OpenBSD 项目非常杰出的维护着一份
|
||||
<ulink url="http://www.openbsd.org/faq/pf/">PF FAQ</ulink>。
|
||||
就其本身而言,这一节注重于 &os; 的 <acronym>PF</acronym>
|
||||
和提供一些关于使用方面的一般常识。更详细的使用信息请参阅
|
||||
<ulink url="http://www.openbsd.org/faq/pf/">PF FAQ</ulink>。</para>
|
||||
|
||||
<para>更多的详细信息, 可以在 &os; 版本的
|
||||
<acronym>PF</acronym> 网站上找到: <ulink
|
||||
url="http://pf4freebsd.love2party.net/"></ulink>。</para>
|
||||
|
||||
<sect2>
|
||||
<title>启用 PF</title>
|
||||
<title>使用 PF 可装载的内核模块</title>
|
||||
|
||||
<para>PF 作为 &os; 5.3 和更高版本基本系统安装的一部分,
|
||||
作为一个可以动态加载的模块出现。 如果在 rc.conf 中配置了
|
||||
<literal>pf_enable="YES"</literal> 则系统会自动加载对应的内核模块。
|
||||
可加载内核模块在构建时启用了 &man.pflog.4;。</para>
|
||||
<para>从 &os; 5.3;开始,PF
|
||||
作为一个单独的运行时可装载的模块被收录进基本的安装系统。
|
||||
在 &man.rc.conf.5; 加入如下的语句能让系统能够动态装载 PF
|
||||
内核模块,<literal>pf_enable="YES"</literal>。
|
||||
然而如果系统无法找到一份 <acronym>PF</acronym>
|
||||
防火墙规则的配置文件,<acronym>PF</acronym> 模块则不会被加载。
|
||||
配置文件默认的位置在 <filename>/etc/pf.conf</filename>。
|
||||
如果你的 <acronym>PF</acronym> 规则存放在其他的位置,
|
||||
那么就需要在 <filename>/etc/rc.conf</filename>
|
||||
配置文件中加入以下语句
|
||||
<literal>pf_rules="<replaceable>/path/pf.rules</replaceable>"</literal>
|
||||
来指定一份。</para>
|
||||
|
||||
<note>
|
||||
<para>这个模块假定 <literal>options
|
||||
INET</literal> 和 <literal>device bpf</literal> 是存在的。
|
||||
除非编译时指定了
|
||||
<literal>NOINET6</literal> (对 &os; 6.0-RELEASE 之前的版本) 或
|
||||
<literal>NO_INET6</literal> (对更新一些的版本) (例如在
|
||||
&man.make.conf.5; 中定义) 它还需要 <literal>options INET6</literal>。</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>从 &os; 7.0 开始,作为例子的存放在
|
||||
<filename role="directory">/etc/</filename> 的
|
||||
<filename>pf.conf</filename> 被移动到了<filename
|
||||
role="directory">/usr/share/examples/pf/</filename>。
|
||||
&os; 7.0 以前的版本,默认仍有一份
|
||||
<filename>/etc/pf.conf</filename>。</para>
|
||||
</note>
|
||||
|
||||
<para>一旦加载了这个内核模块, 或者将 PF 支持静态联编进内核,
|
||||
就可以随时通过 <command>pfctl</command> 来启用或禁用
|
||||
<application>pf</application> 了。</para>
|
||||
<para><acronym>PF</acronym> 模块也能从命令行手工加载:</para>
|
||||
|
||||
<para>下面的例子展示了如何启用
|
||||
<application>pf</application>:</para>
|
||||
<screen>&prompt.root; <userinput>kldload pf.ko</userinput></screen>
|
||||
|
||||
<screen>&prompt.root; <userinput>pfctl -e</userinput></screen>
|
||||
|
||||
<para><command>pfctl</command> 命令提供了一种与
|
||||
<application>pf</application> 防火墙交互的方法。 要了解进一步的信息,
|
||||
参考 &man.pfctl.8; 联机手册是一个不错的办法。</para>
|
||||
<para>可装载的摸块默认由 &man.pflog.4; 提供日志记录。
|
||||
如果你需要 <acronym>PF</acronym> 其他的特性,
|
||||
你可能需要把 <acronym>PF</acronym> 编译进内核。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>内核选项</title>
|
||||
<title>PF 内核选项</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>内核选项</primary>
|
||||
|
|
@ -247,39 +264,46 @@
|
|||
<secondary>device pfsync</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>将下面这些选项加入到 &os; 内核的编译配置文件中并不是启用
|
||||
PF 的强制性要求。 这里列出它们主要是为了介绍一些背景信息。
|
||||
将 PF 编译到内核中之后, 就不再需要使用可加载内核模块了。</para>
|
||||
<para>虽然你不必亲自把对 <acronym>PF</acronym> 的支持编译进 &os;
|
||||
内核,但是有时你仍然需要这么做来使用到 PF
|
||||
的某些没有被收录进可装载模块的高级特性,比如 &man.pfsync.4;
|
||||
伪设备用来发送某些改变到<acronym>PF</acronym> 状态表。
|
||||
它能配合 &man.carp.4; 使用 PF 建立支持故障转移的防火墙。
|
||||
更多有关 <acronym>CARP</acronym> 的详细信息可以参阅
|
||||
<link linkend="carp">第 29 章</link>。</para>
|
||||
|
||||
<para>如何在内核编译配置中加入对于 PF 选项的例子可以在内核源代码中的
|
||||
<filename>/usr/src/sys/conf/NOTES</filename> 这个文件中找到。
|
||||
这里列举如下:</para>
|
||||
<para>The <acronym>PF</acronym> kernel options can be found in
|
||||
<filename>/usr/src/sys/conf/NOTES</filename> and are reproduced
|
||||
below:</para>
|
||||
<para>有关 <acronym>PF</acronym> 的内核选项可以在
|
||||
<filename>/usr/src/sys/conf/NOTES</filename> 中找到,
|
||||
以下也略有阐述:</para>
|
||||
|
||||
<programlisting>device pf
|
||||
device pflog
|
||||
device pfsync</programlisting>
|
||||
|
||||
<para><literal>device pf</literal> 用于启用
|
||||
<quote>Packet Filter</quote> 防火墙的支持。</para>
|
||||
<para><literal>device pf</literal> 选项用于启用
|
||||
<quote>Packet Filter</quote> 防火墙的支持
|
||||
(&man.pf.4;)。</para>
|
||||
|
||||
<para><literal>device pflog</literal> 启用可选的
|
||||
&man.pflog.4; 伪网络设备, 用以通过 &man.bpf.4;
|
||||
描述符来记录流量。 &man.pflogd.8; 服务可以用来存储信息,
|
||||
并把它们以日志形式记录到磁盘上。</para>
|
||||
|
||||
<para><literal>device pfsync</literal> 启用可选的
|
||||
&man.pfsync.4; 伪网络设备, 用以监视
|
||||
<quote>状态变更</quote>。 由于这不是那个可加载内核模块的一部分,
|
||||
因此如果需要使用它, 就必须自行编译定制的内核了。</para>
|
||||
|
||||
<para>这些设置只有在您使用它们构建和安装新内核之后才会生效。</para>
|
||||
<para><literal>device pfsync</literal> 选项启用可选的
|
||||
&man.pfsync.4; 支持,这是用于监视 <quote>状态变更</quote>
|
||||
的伪网络设备。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>可用的 rc.conf 选项</title>
|
||||
|
||||
<para>您需要在 <filename>/etc/rc.conf
|
||||
</filename> 中添加如下配置, 以便在启动时激活 PF:</para>
|
||||
<para>The following &man.rc.conf.5; statements configure
|
||||
<acronym>PF</acronym> and &man.pflog.4; at boot:</para>
|
||||
<para>以下 &man.rc.conf.5; 中的语句用于启动时配置
|
||||
<acronym>PF</acronym> 和 &man.pflog.4;</para>
|
||||
|
||||
<programlisting>pf_enable="YES" # 启用 PF (如果需要的话, 自动加载内核模块)
|
||||
pf_rules="/etc/pf.conf" # pf 使用的规则定义文件
|
||||
|
|
@ -290,18 +314,109 @@ pflog_flags="" #
|
|||
|
||||
<para>如果您的防火墙后面有一个 LAN,
|
||||
而且需要通过它来转发 LAN 上的包, 或进行 NAT,
|
||||
还必须同时启用下述选项:</para>
|
||||
还需要同时启用下述选项:</para>
|
||||
|
||||
<programlisting>gateway_enable="YES" # 启用为 LAN 网关</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>建立过滤规则</title>
|
||||
|
||||
<para><acronym>PF</acronym> 会从 &man.pf.conf.5;
|
||||
(默认为 <filename>/etc/pf.conf</filename>)
|
||||
文件中读取配置规则, 并根据那里的规则修改、丢弃或让数据包通过。
|
||||
默认安装的 &os; 已经提供了一些简单的例子放在
|
||||
<filename>/usr/share/examples/pf/</filename> 目录下。
|
||||
请参阅 <ulink url="http://www.openbsd.org/faq/pf/">PF FAQ</ulink>
|
||||
获取完整的 <acronym>PF</acronym> 规则信息。</para>
|
||||
|
||||
<warning>
|
||||
<para>在浏览 <ulink
|
||||
url="http://www.openbsd.org/faq/pf/">PF FAQ</ulink> 时,
|
||||
请时刻注意不同版本的 &os; 使用了不同版本的 PF:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>&os; 5.<replaceable>X</replaceable> —
|
||||
<acronym>PF</acronym> 相当于 OpenBSD 3.5</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>&os; 6.<replaceable>X</replaceable> —
|
||||
<acronym>PF</acronym> 相当于 OpenBSD 3.7</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>&os; 7.<replaceable>X</replaceable> —
|
||||
<acronym>PF</acronym> 相当于 OpenBSD 4.1</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</warning>
|
||||
|
||||
<para>&a.pf; 是一个提有关配置使用 <acronym>PF</acronym>
|
||||
防火墙问题的好地方。请在提问之前查阅邮件列表的归档!</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>使用 PF</title>
|
||||
|
||||
<para>使用 &man.pfctl.8; 可以控制 <acronym>PF</acronym>。
|
||||
以下是一些实用的命令
|
||||
(请查阅 &man.pfctl.8; 获得全部可用的选项):</para>
|
||||
|
||||
<informaltable frame="none" pgwide="1">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>命令</entry>
|
||||
<entry>作用</entry>
|
||||
</row>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><command>pfctl <option>-e</option></command></entry>
|
||||
<entry>启用 PF</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><command>pfctl <option>-d</option></command></entry>
|
||||
<entry>禁用 PF</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><command>pfctl <option>-F</option> all <option>-f</option> /etc/pf.conf</command></entry>
|
||||
<entry>清楚所有规则 (nat, filter, state, table, 等等。)
|
||||
并读取 <filename>/etc/pf.conf</filename></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><command>pfctl <option>-s</option> [ rules | nat | state ]</command></entry>
|
||||
<entry>列出 filter 规则, nat 规则,
|
||||
或状态表</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><command>pfctl <option>-vnf</option> /etc/pf.conf</command></entry>
|
||||
<entry>检查 <filename>/etc/pf.conf</filename>
|
||||
中的错误,但不装载相关的规则</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>启用 <acronym>ALTQ</acronym></title>
|
||||
|
||||
<para><acronym>ALTQ</acronym> 只有在作为编译选项加入到 &os; 内核时,
|
||||
才能使用。 <acronym>ALTQ</acronym> 目前还不是所有的可用网卡驱动都能够支持的。
|
||||
请参见 &man.altq.4; 联机手册了解您正使用的 &os; 版本中的驱动支持情况。
|
||||
下面这些选项将启用 <acronym>ALTQ</acronym> 以及一些附加的功能。</para>
|
||||
<para><acronym>ALTQ</acronym> 只有在作为编译选项加入到 &os;
|
||||
内核时才能使用。<acronym>ALTQ</acronym>
|
||||
目前还不是所有的可用网卡驱动都能够支持的。
|
||||
请参见 &man.altq.4; 联机手册了解您正使用的 &os;
|
||||
版本中的驱动支持情况。</para>
|
||||
|
||||
<para>下面这些选项将启用 <acronym>ALTQ</acronym>
|
||||
以及一些附加的功能:</para>
|
||||
|
||||
<programlisting>options ALTQ
|
||||
options ALTQ_CBQ # 基于分类的排列 (CBQ)
|
||||
|
|
@ -344,33 +459,6 @@ options ALTQ_NOPCC #
|
|||
如果是 <acronym>SMP</acronym> 系统,
|
||||
则必须使用它。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>建立过滤规则</title>
|
||||
|
||||
<para>Packet Filter 会从
|
||||
&man.pf.conf.5; 文件中读取配置规则, 并根据那里的规则修改、
|
||||
丢弃或让数据包通过。 默认安装的 &os;
|
||||
已经提供了一个默认的、 包含一些有用例子和注释的
|
||||
<filename>/etc/pf.conf</filename>。</para>
|
||||
|
||||
<para>尽管 &os; 提供了自己的 <filename>/etc/pf.conf</filename>,
|
||||
但这个文件和 OpenBSD 中的语法是一样的。 OpenBSD
|
||||
开发团队提供了一个非常好的配置 <application>pf</application>
|
||||
资源, 它可以在
|
||||
<ulink url="http://www.openbsd.org/faq/pf/"></ulink> 找到。</para>
|
||||
|
||||
<warning>
|
||||
<para>在浏览 pf 用户手册时, 请时刻注意,
|
||||
在 &os; 中所包含的 pf 的版本和 OpenBSD 中是不一样的。 在 &os; 5.X 中
|
||||
<application>pf</application> 相当于 OpenBSD 3.5 中的版本,
|
||||
而 &os; 6.X 中则相当于 OpenBSD 3.7。</para>
|
||||
</warning>
|
||||
|
||||
<para>关于 <application>pf</application> 的配置和使用问题,
|
||||
可以在 &a.pf; 提出。 当然, 在提出问题之前,
|
||||
别忘了查阅邮件列表的存档。</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="firewalls-ipf">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.389
|
||||
Original Revision: 1.390
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -1858,16 +1858,6 @@ Mounting root from ufs:/dev/md0c
|
|||
<literal>G</literal> 结尾表示GB, 或者 <literal>C</literal>
|
||||
表示柱面数的方式来表达尺寸。</para>
|
||||
|
||||
<note><para>从 FreeBSD 5.X 开始, 用户可以:
|
||||
使用 <literal>Custom Newfs</literal>
|
||||
(<keycap>Z</keycap>) 选项来选择
|
||||
<acronym>UFS2</acronym> (在 &os; 5.1 和更高版本中的默认值)。
|
||||
用 <literal>Auto Defaults</literal> 来创建,
|
||||
然后用 <literal>Custom Newfs</literal> 选项,
|
||||
或在创建文件系统时指定 <option>-O 2</option>。
|
||||
如果您使用了 <literal>Custom Newfs</literal>选项,
|
||||
不要忘记增加 <option>-U</option> 来启用 SoftUpdates!</para></note>
|
||||
|
||||
<figure id="sysinstall-label-add">
|
||||
<title>根目录使用空间</title>
|
||||
|
||||
|
|
@ -2215,8 +2205,7 @@ installation menus to retry whichever operations have failed.
|
|||
|
||||
<para>安装成功后, 就可以进行进一步的配置了。
|
||||
引导新安装的 FreeBSD 系统之后, 使用
|
||||
<command>sysinstall</command> (<command>/stand/sysinstall</command>
|
||||
如果您使用的是 &os; 5.2 之前的版本), 并选择
|
||||
<command>sysinstall</command> 并选择
|
||||
<guimenuitem>Configure</guimenuitem>。</para>
|
||||
|
||||
<sect2 id="inst-network-dev">
|
||||
|
|
@ -3195,8 +3184,7 @@ Press [Enter] now to invoke an editor on /etc/exports
|
|||
|
||||
<para>如果有其他的需要, 此时还可以添加其他的组。
|
||||
此外, 还可以通过
|
||||
<command>sysinstall</command> (在 &os; 5.2 以前的版本中是
|
||||
<command>/stand/sysinstall</command>) 在安装完成之后添加它们。</para>
|
||||
<command>sysinstall</command> 在安装完成之后添加它们。</para>
|
||||
|
||||
<para>当您完成添加用户的时候,选择<guimenuitem>Exit</guimenuitem>
|
||||
然后键入<keycap>Enter</keycap> 继续下面的安装。</para>
|
||||
|
|
@ -3233,7 +3221,6 @@ Retype new password :</screen>
|
|||
<link linkend="network-services">其他网络设备</link>,
|
||||
或需要完成其他的配置工作,
|
||||
可以在此时或者事后通过 <command>sysinstall</command>
|
||||
(对于 &os; 5.2 之前的版本是 <command>/stand/sysinstall</command>)
|
||||
来进行配置。</para>
|
||||
|
||||
<screen> User Confirmation Requested
|
||||
|
|
@ -3807,7 +3794,7 @@ Please press any key to reboot.</screen>
|
|||
或没有检测到软驱。</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>&os; 5.0 和更高版本在启动过程中广泛使用了 i386、
|
||||
<para>&os; 在启动过程中广泛使用了 i386、
|
||||
amd64 及 ia64 平台提供的 ACPI 服务来检测系统配置。
|
||||
不幸的是, 在 ACPI 驱动和主板 BIOS 中存在一些 bug。
|
||||
如果遇到这种情况, 可以在系统引导时禁用 ACPI,
|
||||
|
|
@ -4040,9 +4027,6 @@ Please press any key to reboot.</screen>
|
|||
|
||||
<screen>&prompt.root; <userinput>cu -l /dev/cuad0</userinput></screen>
|
||||
|
||||
<para>在 &os; 5.X 上, 应使用
|
||||
<filename>/dev/cuaa0</filename> 代替例子中的
|
||||
<filename>/dev/cuad0</filename>。</para>
|
||||
</step>
|
||||
</procedure>
|
||||
|
||||
|
|
@ -4114,7 +4098,7 @@ Please press any key to reboot.</screen>
|
|||
<para>目录中包含下面一些映像文件:</para>
|
||||
|
||||
<table frame="none">
|
||||
<title>FreeBSD 5.<replaceable>X</replaceable> 和 6.<replaceable>X</replaceable> ISO 映像文件名和含意</title>
|
||||
<title>FreeBSD 6.<replaceable>X</replaceable> 和 7.<replaceable>X</replaceable> ISO 映像文件名和含意</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
|
|
@ -4145,14 +4129,13 @@ Please press any key to reboot.</screen>
|
|||
<row>
|
||||
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架构名</replaceable>-disc2.iso</filename></entry>
|
||||
|
||||
<entry>&os; 文档 (在 &os; 6.2 之前) 以及这张光盘能装下的、
|
||||
尽可能多的第三方软件包。</entry>
|
||||
<entry>尽可能多的第三方软件包。</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><filename><replaceable>version</replaceable>-RELEASE-<replaceable>arch</replaceable>-docs.iso</filename></entry>
|
||||
|
||||
<entry>&os; 文档 (&os; 6.2 和之后的版本)。</entry>
|
||||
<entry>&os; 文档。</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Chinese Documentation Project
|
||||
|
||||
Original Revision: 1.183
|
||||
Original Revision: 1.184
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -878,8 +878,7 @@ device sc</programlisting>
|
|||
<programlisting># 电源管理支持 (参见 NOTES 了解更多选项)
|
||||
#device apm</programlisting>
|
||||
|
||||
<para>高级电源管理支持。 对笔记本有用,
|
||||
不过在 &os; 5.X 和更高版本中的
|
||||
<para>高级电源管理支持。对笔记本有用,不过在
|
||||
<filename>GENERIC</filename> 里默认禁用。</para>
|
||||
|
||||
<programlisting># 增加 i8254 的 挂起/恢复 支持。
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.70
|
||||
Original Revision: 1.71
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -885,10 +885,7 @@ test: biba/high</screen>
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>security.mac.portacl.enabled</literal> 将完全
|
||||
启用/禁用 策略。 <footnote><para>由于一个
|
||||
bug, <literal>security.mac.portacl.enabled</literal>
|
||||
<command>sysctl</command> 变量在
|
||||
&os; 5.2.1 和更早版本上并不起作用。</para></footnote></para>
|
||||
启用/禁用 策略。</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Chinese Documentation Project
|
||||
|
||||
Original Revision: 1.136
|
||||
Original Revision: 1.138
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -631,12 +631,6 @@ postmaster@example.com postmaster@noc.example.net
|
|||
<sect2 id="mail-disable-sendmail">
|
||||
<title>禁用 <application>sendmail</application></title>
|
||||
|
||||
<para>用以启动
|
||||
<application>sendmail</application> 的流程,
|
||||
在 4.5-RELEASE、 4.6-RELEASE 以及之后的版本中,
|
||||
存在着十分显著的不同。 因此, 用于禁用它的方法,
|
||||
也就有许多不同之处。</para>
|
||||
|
||||
<warning>
|
||||
<para>如果您打算禁用 <application>sendmail</application>
|
||||
的邮件发出服务, 保持系统中有一个替代它的、
|
||||
|
|
@ -649,47 +643,6 @@ postmaster@example.com postmaster@noc.example.net
|
|||
的非活跃 (inactive) 队列, 而永远不会被送达。</para>
|
||||
</warning>
|
||||
|
||||
<sect3>
|
||||
<title>FreeBSD 4.5-STABLE 版本 2002/4/4 之前和更早前版本
|
||||
(包括 4.5-RELEASE 及更早版本)</title>
|
||||
|
||||
<para>输入:</para>
|
||||
|
||||
<programlisting>sendmail_enable="NO"</programlisting>
|
||||
|
||||
<para>到 <filename>/etc/rc.conf</filename> 文件。它将停用
|
||||
<application>sendmail</application> 接收邮件服务,
|
||||
但是如果 <filename>/etc/mail/mailer.conf</filename> 文件(见下文)
|
||||
没有被改变,<application>sendmail</application> 将仍然可以发送邮件。</para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>FreeBSD 4.5-STABLE 版本 2002/4/4 之后和以后的版本
|
||||
(包括 4.6-RELEASE 及后续版本)</title>
|
||||
|
||||
<para>要完全地禁用
|
||||
<application>sendmail</application>, 包括邮件的发出服务,
|
||||
您就必须将</para>
|
||||
|
||||
<programlisting>sendmail_enable="NONE"</programlisting>
|
||||
|
||||
<para>写在 <filename>/etc/rc.conf</filename> 中。</para>
|
||||
|
||||
<para>如果您只是希望禁用
|
||||
<application>sendmail</application> 的接信服务,
|
||||
则应将</para>
|
||||
|
||||
<programlisting>sendmail_enable="NO"</programlisting>
|
||||
|
||||
<para>写到 <filename>/etc/rc.conf</filename> 中。
|
||||
不过, 即使禁用了接信服务, 本地的送信仍将正常工作。 关于
|
||||
<application>sendmail</application> 的启动选项的更多信息,
|
||||
可以在 &man.rc.sendmail.8; 联机手册中找到。</para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>FreeBSD 5.0-STABLE 和更高版本</title>
|
||||
|
||||
<para>要彻底禁用包括邮件送出服务在内的所有
|
||||
<application>sendmail</application> 功能,
|
||||
必须将</para>
|
||||
|
|
@ -710,50 +663,18 @@ sendmail_msp_queue_enable="NO"</programlisting>
|
|||
<para>更多的有关
|
||||
<application>sendmail</application> 可用的启动选项,参看
|
||||
&man.rc.sendmail.8; 联机手册.</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>机器引导时运行您的新 MTA</title>
|
||||
|
||||
<para>您也许有两种方法在机器引导时运行您的新
|
||||
MTA,这个也倚赖您所运行的 FreeBSD 版本。</para>
|
||||
<para>可以向 <filename>/etc/rc.conf</filename>
|
||||
中加入配置项使新的 MTA 在系统启动时运行,
|
||||
下面是一个 postfix 的例子:</para>
|
||||
|
||||
<sect3>
|
||||
<title>FreeBSD 4.5-STABLE 版本 2002/4/11 以前
|
||||
(包括 4.5-RELEASE 及更早版本)</title>
|
||||
|
||||
<para>在 <filename>/usr/local/etc/rc.d/</filename>
|
||||
中添加一个以 <filename>.sh</filename> 为后缀的脚本文件,
|
||||
并可以用 <username>root</username> 身份运行。这个脚本应该接受
|
||||
<literal>start</literal> 和 <literal>stop</literal>
|
||||
参数。用如下命令启动这个脚本</para>
|
||||
|
||||
<programlisting>/usr/local/etc/rc.d/supermailer.sh start</programlisting>
|
||||
|
||||
<para>您也可以手工启动这个服务。如果想要停止它,
|
||||
系统脚本将使用 <literal>stop</literal> 选项,运行如下命令</para>
|
||||
|
||||
<programlisting>/usr/local/etc/rc.d/supermailer.sh stop</programlisting>
|
||||
|
||||
<para>您也可以手工停止正在系统运行的服务。</para>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>FreeBSD 4.5-STABLE 版本 2002/4/11 以后
|
||||
(包括 4.6-RELEASE 及后续版本)</title>
|
||||
|
||||
<para>在 FreeBSD 较后来的版本,
|
||||
您可以使用上面的方法或者在 <filename>/etc/rc.conf</filename>
|
||||
文件做如下设置</para>
|
||||
|
||||
<programlisting>mta_start_script="filename"</programlisting>
|
||||
|
||||
<para><replaceable>filename</replaceable> 是您想要在引导时执行的
|
||||
MTA 脚本文件的名字。</para>
|
||||
</sect3>
|
||||
<screen>&prompt.root; echo '<replaceable>postfix</replaceable>_enable=<quote>YES</quote>' >> /etc/rc.conf</screen>
|
||||
|
||||
<para>这样 MTA 就能在系统启动是自动运行了。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Chinese Documentation Project
|
||||
|
||||
Original Revision: 1.443
|
||||
Original Revision: 1.444
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -54,14 +54,6 @@
|
|||
</address>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<address>
|
||||
<otheraddr>BSD-Systems</otheraddr>
|
||||
Email: <email>info@bsd-systems.co.uk</email>
|
||||
WWW: <otheraddr><ulink url="http://www.bsd-systems.co.uk"></ulink></otheraddr>
|
||||
</address>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<address>
|
||||
<otheraddr>FreeBSD Mall, Inc.</otheraddr>
|
||||
|
|
@ -105,17 +97,6 @@
|
|||
</address>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<address>
|
||||
<otheraddr>Linux CD Mall</otheraddr>
|
||||
<street>Private Bag MBE N348</street>
|
||||
<city>Auckland 1030</city>
|
||||
<country>New Zealand</country>
|
||||
Phone: <phone>+64 21 866529</phone>
|
||||
WWW: <otheraddr><ulink url="http://www.linuxcdmall.co.nz/"></ulink></otheraddr>
|
||||
</address>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<address>
|
||||
<otheraddr>The Linux Emporium</otheraddr>
|
||||
|
|
@ -125,7 +106,7 @@
|
|||
<country>United Kingdom</country>
|
||||
Phone: <phone>+44 1491 837010</phone>
|
||||
Fax: <fax>+44 1491 837016</fax>
|
||||
WWW: <otheraddr><ulink url="http://www.linuxemporium.co.uk/products/freebsd/"></ulink></otheraddr>
|
||||
WWW: <otheraddr><ulink url="http://www.linuxemporium.co.uk/products/bsd/"></ulink></otheraddr>
|
||||
</address>
|
||||
</listitem>
|
||||
|
||||
|
|
@ -164,7 +145,7 @@
|
|||
<country>Russia</country>
|
||||
Phone: <phone>+7-812-3125208</phone>
|
||||
Email: <email>info@linuxcenter.ru</email>
|
||||
WWW: <otheraddr><ulink url="http://linuxcenter.ru/freebsd"></ulink></otheraddr>
|
||||
WWW: <otheraddr><ulink url="http://linuxcenter.ru/shop/freebsd"></ulink></otheraddr>
|
||||
</address>
|
||||
</listitem>
|
||||
|
||||
|
|
|
|||
|
|
@ -199,8 +199,7 @@
|
|||
<listitem>
|
||||
<para>FreeBSD站点上有一个可以搜索到的当前所有可用的应用程序列表,在 <ulink
|
||||
url="&url.base;/ports/index.html">http://www.FreeBSD.org/ports/</ulink>。
|
||||
它分很多种类,您既可以通过程序的名称来搜索,
|
||||
也可以在分类中列出所有可用的应用程序 (如果您知道名字),
|
||||
它分很多种类,您既可以通过程序的名称来搜索(如果您知道名字),
|
||||
也可以在分类中列出所有可用的应用程序。</para>
|
||||
</listitem>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.179
|
||||
Original Revision: 1.180
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -312,12 +312,11 @@
|
|||
<term>行 4:</term>
|
||||
|
||||
<listitem>
|
||||
<para>标明modem要连接的端口号。 <devicename>COM1</devicename> 对应的设备是
|
||||
<filename>/dev/cuad0</filename>(或者 &os; 5.X 下
|
||||
<filename>/dev/cuaa0</filename>)
|
||||
<para>标明modem要连接的端口号。
|
||||
<devicename>COM1</devicename> 对应的设备是
|
||||
<filename>/dev/cuad0</filename>
|
||||
而 <devicename>COM2</devicename>
|
||||
对应的则是 <filename>/dev/cuad1</filename>(或者
|
||||
<filename>/dev/cuaa1</filename>)。</para>
|
||||
对应的则是 <filename>/dev/cuad1</filename>。</para
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
@ -1628,9 +1627,7 @@ exit 1
|
|||
您就会在 <devicename>sio1</devicename> 或 <devicename>COM2</devicename>
|
||||
上找到它。 如果 modem 设备连接在 <devicename>sio1</devicename>
|
||||
接口 (在 DOS 中称为<devicename>COM2</devicename>),
|
||||
那么您的 modem 将会是 <filename>/dev/cuad1</filename>
|
||||
(或者 &os;nbsp;5.X 下的
|
||||
<filename>/dev/cuaa1</filename>)。</para>
|
||||
那么您的 modem 将会是 <filename>/dev/cuad1</filename>。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
|
@ -1650,8 +1647,7 @@ exit 1
|
|||
<screen>ppp ON example> <userinput>set device <filename>/dev/cuad1</filename></userinput></screen>
|
||||
|
||||
<para>设置modem设备, 在本例子中是
|
||||
<devicename>cuad1</devicename> (或者 &os; 5.X 下的
|
||||
<filename>/dev/cuaa1</filename>)。</para>
|
||||
<devicename>cuad1</devicename>。</para>
|
||||
|
||||
<screen>ppp ON example> <userinput>set speed 115200</userinput></screen>
|
||||
|
||||
|
|
@ -2223,18 +2219,16 @@ tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
|
|||
<para>首先, 您需要确认调制解调器所连接的串口。
|
||||
许多人会设置一个符号连接, 例如
|
||||
<filename>/dev/modem</filename>, 用以指向实际的设备名,
|
||||
<filename>/dev/cuadN</filename> (或在 &os; 5.X 下是
|
||||
<filename>/dev/cuaaN</filename>)。 这样您就可以对实际的设备名进行抽象,
|
||||
<filename>/dev/cuadN</filename>。
|
||||
这样您就可以对实际的设备名进行抽象,
|
||||
以备调制解调器换到其他串口时方便调整之用。
|
||||
不然, 在系统中修改一大堆 <filename>/etc</filename> 下的文件以及
|
||||
<filename>.kermrc</filename> 将是非常麻烦的事情!</para>
|
||||
|
||||
<note>
|
||||
<para><filename>/dev/cuad0</filename> (或 &os; 5.X
|
||||
下的 <filename>/dev/cuaa0</filename>) 对应
|
||||
<para><filename>/dev/cuad0</filename> 对应
|
||||
<devicename>COM1</devicename>, 而 <filename>cuad1</filename>
|
||||
(或 <filename>/dev/cuaa1</filename>) 则对应
|
||||
<devicename>COM2</devicename>, 等等。</para>
|
||||
则对应 <devicename>COM2</devicename>, 等等。</para>
|
||||
</note>
|
||||
|
||||
<para>确保您的内核文件包含以下内容:</para>
|
||||
|
|
|
|||
|
|
@ -1234,7 +1234,8 @@ exit 2</programlisting>
|
|||
# /etc/printcap for host rose - added text filter
|
||||
#
|
||||
rattan|line|diablo|lp|Diablo 630 Line Printer:\
|
||||
:sh:sd=/var/spool/lpd/rattan:\ :lp=/dev/lpt0:\
|
||||
:sh:sd=/var/spool/lpd/rattan:\
|
||||
:lp=/dev/lpt0:\
|
||||
:if=/usr/local/libexec/if-simple:
|
||||
|
||||
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
||||
|
|
@ -1277,7 +1278,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
|||
使用 &man.lpr.1; 命令,
|
||||
它可以提交一个任务来打印。</para>
|
||||
|
||||
<para>您可以联合使用 &man.lpr.1; 和 the &man.lptest.1;
|
||||
<para>您可以联合使用 &man.lpr.1; 和 &man.lptest.1;
|
||||
程序, 在 <link
|
||||
linkend="printing-testing">检查打印机
|
||||
通讯</link> 这节介绍怎样生成一些测试文本。</para>
|
||||
|
|
@ -2941,7 +2942,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
|
|||
<literal>bamboo</literal> 的后台打印队列目录有空间的时, 这两个
|
||||
<application>LPD</application> 系统将会传输这个文件到主机
|
||||
<hostid>rose</hostid> 上。 文件将排在主机 <hostid>rose</hostid>
|
||||
的队列中知道最终被打印出来。 它将被从 DVI 转换成
|
||||
的队列中直到最终被打印出来。 它将被从 DVI 转换成
|
||||
&postscript; (因为 <literal>bamboo</literal> 是一台 &postscript; 打印机) 在主机
|
||||
<hostid>rose</hostid>。</para>
|
||||
</sect3>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.126
|
||||
Original Revision: 1.128
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -473,9 +473,6 @@
|
|||
您通常不使用呼出端口作为终端, 只使用modem。
|
||||
如果串口线或终端不支持载波检测数据传输,
|
||||
您可以使用呼出端口。</para>
|
||||
|
||||
<note><para>在 &os; 5.X 和更早版本中, 呼出端口的名字是
|
||||
<filename>/dev/cuaa<replaceable>N</replaceable></filename>。</para></note>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
|
@ -554,18 +551,11 @@ sio3: type 16550A</screen>
|
|||
<filename>/dev/ttyd<replaceable>N</replaceable></filename> (呼入)
|
||||
和 <filename>/dev/cuad<replaceable>N</replaceable></filename>
|
||||
(呼出) 设备来访问的。 此外, FreeBSD 也提供了初始化设备
|
||||
(在 &os; 6.X 上是
|
||||
<filename>/dev/ttyd<replaceable>N</replaceable>.init</filename> 以及
|
||||
<filename>/dev/cuad<replaceable>N</replaceable>.init</filename>,
|
||||
而在 &os; 5.X 上则是
|
||||
<filename>/dev/ttyid<replaceable>N</replaceable></filename> 和
|
||||
<filename>/dev/cuaia<replaceable>N</replaceable></filename>) 以及锁设备
|
||||
(在 &os; 6.X 上是
|
||||
<filename>/dev/ttyd<replaceable>N</replaceable>.lock</filename> 和
|
||||
<filename>/dev/cuad<replaceable>N</replaceable>.lock</filename>,
|
||||
而在 &os; 5.X 上则是
|
||||
<filename>/dev/ttyld<replaceable>N</replaceable></filename> 和
|
||||
<filename>/dev/cuala<replaceable>N</replaceable></filename>)。
|
||||
(<filename>/dev/ttyd<replaceable>N</replaceable>.init</filename> 和
|
||||
<filename>/dev/cuad<replaceable>N</replaceable>.init</filename>)
|
||||
以及锁设备
|
||||
(<filename>/dev/ttyd<replaceable>N</replaceable>.lock</filename> 和
|
||||
<filename>/dev/cuad<replaceable>N</replaceable>.lock</filename>)。
|
||||
初始化设备用于在打开端口时初始化其通讯参数, 例如使用
|
||||
<literal>RTS/CTS</literal> 信号进行流控制的调制解调器的
|
||||
<literal>crtscts</literal>。 锁设备则用于在端口上提供一个锁标志,
|
||||
|
|
@ -714,10 +704,7 @@ sio3: type 16550A</screen>
|
|||
<screen>&prompt.root; <userinput>cu -l <replaceable>串口设备</replaceable></userinput></screen>
|
||||
|
||||
<para>此处 <quote>串口设备</quote> 表示您计算机上某个串口对应的设备名。
|
||||
在 &os; 6.0 之前的版本中, 这些设备的名字是
|
||||
<devicename>/dev/cuaa<replaceable>N</replaceable></devicename>,
|
||||
而在 6.0 和更新一些的版本中, 则是
|
||||
<devicename>/dev/cuad<replaceable>N</replaceable></devicename>。</para>
|
||||
<devicename>/dev/cuad<replaceable>N</replaceable></devicename>。</para>
|
||||
|
||||
<para>此处的 <quote>N</quote> 表示串口的编号。</para>
|
||||
|
||||
|
|
@ -2384,13 +2371,6 @@ comconsole_speed="115200"
|
|||
console="comconsole,vidconsole"</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<note>
|
||||
<para>&os; 在 6.1-RELEASE 之前的版本并不支持
|
||||
<option>-S</option> 以及 <filename>/boot/loader.conf</filename>
|
||||
的 <varname>comconsole_speed</varname> 选项,
|
||||
如果您使用的是较早的 &os; 版本, 就只能重新编译引导块了。</para>
|
||||
</note>
|
||||
</sect3>
|
||||
|
||||
<sect3 id="serialconsole-com2">
|
||||
|
|
@ -2496,14 +2476,15 @@ ttyd3 "/usr/libexec/getty std.9600" unknown off secure</programlisting>
|
|||
<title>配置串口控制台</title>
|
||||
|
||||
<para>您可以很容易地指定启动引导器和内核来使用串口控制台, 只需要在
|
||||
<filename>/boot/loader.rc</filename>中写入下面这行:</para>
|
||||
<filename>/boot/loader.ronf</filename>中写入下面这行:</para>
|
||||
|
||||
<programlisting>set console="comconsole"</programlisting>
|
||||
|
||||
<para>无论前一节中的引导块如何配置, 这个设置都会生效。</para>
|
||||
|
||||
<para>您最好把上面一行放在文件的第一行,
|
||||
以便尽早地在启动时看到串口控制台的启动信息。</para>
|
||||
<para>您最好把上面一行放在
|
||||
<filename>/boot/loader.conf</filename>
|
||||
文件的第一行,以便尽早地在启动时看到串口控制台的启动信息。</para>
|
||||
|
||||
<para>同样地,您可以指定内部控制台为:</para>
|
||||
|
||||
|
|
@ -2513,22 +2494,9 @@ ttyd3 "/usr/libexec/getty std.9600" unknown off secure</programlisting>
|
|||
启动引导器和内核将使用在引导块时用 <option>-h</option>
|
||||
选项指定的控制台。</para>
|
||||
|
||||
<para>在 3.2 以及更新的版本中,您可以在 <filename>/boot/loader.conf.local</filename>
|
||||
或 <filename>/boot/loader.conf</filename> 中,
|
||||
而不是在 <filename>/boot/loader.rc</filename> 指定控制台。
|
||||
用这种方法, 您的 <filename>/boot/loader.rc</filename>
|
||||
文件将是这样的:</para>
|
||||
|
||||
<programlisting>include /boot/loader.4th
|
||||
start</programlisting>
|
||||
|
||||
<para>然后, 创建 <filename>/boot/loader.conf.local</filename> 并加入下面的行。</para>
|
||||
|
||||
<programlisting>console=comconsole</programlisting>
|
||||
|
||||
<para>或</para>
|
||||
|
||||
<programlisting>console=vidconsole</programlisting>
|
||||
<para>控制台可以在
|
||||
<filename>/boot/loader.conf.local</filename> 或者是在
|
||||
<filename>/boot/loader.conf</filename> 中指定。</para>
|
||||
|
||||
<para>看看 &man.loader.conf.5; 的联机手册了解更多信息。</para>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
For the FreeBSD Documentation Project
|
||||
The FreeBSD Simplified Chinese Project
|
||||
|
||||
Original Revision: 1.44
|
||||
Original Revision: 1.45
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
|
|
@ -932,9 +932,7 @@ sd name bigraid.p0.s4 drive e plex bigraid.p0 state initializing len 4194304b dr
|
|||
(或者某个启动脚本) 来执行 <command>vinum
|
||||
start</command> 命令。</para>
|
||||
|
||||
<note><para>下面介绍的是 FreeBSD 5.X 和更高版本所需的配置。 对于
|
||||
FreeBSD 4.X 的配置方法与此不同, 在 <xref
|
||||
linkend="vinum-root-4x"> 中有所描述。</para></note>
|
||||
<note><para>下面介绍的是 FreeBSD 所需的配置。</para></note>
|
||||
|
||||
<para>通过将下面的配置:</para>
|
||||
|
||||
|
|
@ -1197,59 +1195,6 @@ Subdisk root.p1.s0:
|
|||
以便使 Vinum 头和系统的引导程序不再冲突。</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="vinum-root-4x">
|
||||
<title>与 FreeBSD 4.X 的区别</title>
|
||||
|
||||
<para>在 FreeBSD 4.X 中, 由于缺少那些让 Vinum
|
||||
自动扫描所有磁盘所需的内部函数, 而检测根设备的内部 ID
|
||||
的代码不够智能, 以至于无法自动处理类似
|
||||
<filename>/dev/vinum/root</filename> 这样的名字。
|
||||
因此, 会有一些小差异。</para>
|
||||
|
||||
<para>必须明确地告诉 Vinum 要扫描哪些磁盘, 方法是在
|
||||
<filename>/boot/loader.conf</filename> 中加入:</para>
|
||||
|
||||
<programlisting>vinum.drives="/dev/<replaceable>da0</replaceable> /dev/<replaceable>da1</replaceable>"</programlisting>
|
||||
|
||||
<para>所有可能包含 Vinum 数据的盘在这里都应提及。 基本原则是,
|
||||
<emphasis>宁多毋缺</emphasis>。 此外, 也无需明确指定 slice
|
||||
或分区, 因为
|
||||
Vinum 在指定的驱动器上的所有 slice 和分区上扫描 Vinum 头。</para>
|
||||
|
||||
<para>由于用以分析根文件系统名字, 并产生设备 ID
|
||||
(major/minor 编号) 的程序, 只能够处理 <quote>传统的</quote>
|
||||
类似 <filename>/dev/ad0s1a</filename> 这样的设备名,
|
||||
因此它们不可能处理类似
|
||||
<filename>/dev/vinum/root</filename> 这样的根卷名。 因此,
|
||||
Vinum 本身需要预先配置内核的一些内部参数,
|
||||
以便在初始化时能够保持根设备的 ID。 这可以通过加载器变量
|
||||
<literal>vinum.root</literal> 来配置, 对应的
|
||||
<filename>/boot/loader.conf</filename> 设置是:</para>
|
||||
|
||||
<programlisting>vinum.root="root"</programlisting>
|
||||
|
||||
<para>现在, 当内核初始化过程尝试找到要挂接的 root 设备时,
|
||||
它将能看到是否已经有某个内核模块预先初始化了所需要的内核参数。
|
||||
这种情况下, <emphasis>并且</emphasis>
|
||||
所指定的根设备和来自加载器的根设备
|
||||
(也就是我们的 <literal>"vinum"</literal> ) 的 major 编号相符,
|
||||
则就是用预先分配的设备 ID, 而不是自己去找一个。
|
||||
这样, 在通常的自动启动过程中, 它就能够继续挂接 Vinum
|
||||
根卷来作为根文件系统了。</para>
|
||||
|
||||
<para>但是, 当指定了 <command>boot -a</command>
|
||||
来要求在启动时手工选择根设备时,
|
||||
仍然是无法自动地分析 Vinum 卷名的。 如果输入的设备名与 Vinum
|
||||
设备不匹配, 则 major
|
||||
编号的不匹配会使这个过程采用普通的分析过程, 这样, 输入
|
||||
<literal>ufs:da0d</literal> 就能够正常工作了。
|
||||
注意, 一旦这个过程失败, 则再输入 <literal>ufs:vinum/root</literal>
|
||||
将不能正常工作, 因为它无法再被解析了。 唯一的解决办法是,
|
||||
重新启动并从头开始 (在
|
||||
<quote>askroot</quote> 提示处, 可以省略
|
||||
<filename>/dev/</filename>。)</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue