📄 install-post.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>安装后的配置</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD 使用手册" href="index.html" /><link rel="UP" title="安装 FreeBSD" href="install.html" /><link rel="PREVIOUS" title="安装确认" href="install-final-warning.html" /><link rel="NEXT" title="支持的硬件" href="install-supported-hardware.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /><meta http-equiv="Content-Type" content="text/html; charset=GB2312" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD 使用手册</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="install-final-warning.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 2. 安装 FreeBSD</td><td width="10%" align="right" valign="bottom"><a href="install-supported-hardware.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="INSTALL-POST" name="INSTALL-POST">2.9. 安装后的配置</a></h1><p>如果安装成功,您将可以对一些基本的项目作安装后初步的配置。任何一项配置在重新开机前都可以重新配置,系统会使用最后一次的配置值。重新开机后如果再做配置,可以执行<tt class="COMMAND">/stand/sysinstall</tt> 命令然后选择 <spanclass="GUIMENUITEM">Configure</span>选项。</p><div class="SECT2"><h2 class="SECT2"><a id="INST-NETWORK-DEV" name="INST-NETWORK-DEV">2.9.1.配置网卡</a></h2><p>如果您之前配置用 PPP 通过 FTP 安装,那么这个画面将不会出现;正像所说的那样,你可以稍后再做配置。</p><p>如果想更多的了解网卡或将FreeBSD配置为网关或路由器,请参考 <ahref="advanced-networking.html">Advanced Networking</a> 的相关文章。</p><pre class="SCREEN"> User Confirmation Requested Would you like to configure any Ethernet or SLIP/PPP network devices? [ Yes ] No</pre><p>如果要配置网卡,请选择 <span class="GUIBUTTON">[ Yes ]</span> 然后按 <bclass="KEYCAP">Enter</b>。 否则请选择 <span class="GUIBUTTON">[ No ]</span> 继续。</p><div class="FIGURE"><a id="ED-CONFIG1" name="ED-CONFIG1"></a><p><b>Figure 2-31. 选择网卡设备</b></p><p><img src="install/ed0-conf.png" /></p></div><p>用方向键选择您要配置的网卡接口,然后按<b class="KEYCAP">Enter</b>。</p><pre class="SCREEN"> User Confirmation Requested Do you want to try IPv6 configuration of the interface? Yes [ No ]</pre><p>目录私人区域网络IP协议<acronym class="ACRONYM">IPv4</acronym>已经足够,所以选择 <spanclass="GUIBUTTON">[ No ]</span>然后按 <b class="KEYCAP">Enter</b>。</p><p>如果想试试新的IP通信协议 <acronym class="ACRONYM">IPv6</acronym> ,使用 <acronymclass="ACRONYM">RA</acronym> 服务,请选择<span class="GUIBUTTON">[ Yes ]</span> 然后按 <bclass="KEYCAP">Enter</b>。 它将会花费几秒钟去搜寻RA服务器。</p><pre class="SCREEN"> User Confirmation Requested Do you want to try DHCP configuration of the interface? Yes [ No ]</pre><p>如果您不需要 DHCP (Dynamic Host Configuration Protocol 动态主机配置协议) ,选择 <spanclass="GUIBUTTON">[ No ]</span> 然后按<b class="KEYCAP">Enter</b>。</p><p>选择<span class="GUIBUTTON">[ Yes ]</span> 会执行<b class="APPLICATION">dhclient</b>,如果成功,它会自动将网络配置信息填上。更多的信息请参考 <ahref="network-dhcp.html">Section 19.10</a> 。</p><p>下面的网络配置显示了怎样把以太网设备配置成区域网络网关的角色。</p><div class="FIGURE"><a id="ED-CONFIG2" name="ED-CONFIG2"></a><p><b>Figure 2-32. 配置 ed0接口</b></p><p><img src="install/ed0-conf2.png" /></p></div><p>使用<b class="KEYCAP">Tab</b> 键可以在各个栏目之间进行切换,请输入适当 的信息:</p><div class="VARIABLELIST"><dl><dt>Host(机器名称)</dt><dd><p>完整的机器名称,例如本例中的 <tt class="HOSTID">k6-2.example.com</tt> 。</p></dd><dt>Domain(域名)</dt><dd><p>您机器所在的域名称,如本例的 <tt class="HOSTID">example.com</tt></p></dd><dt>IPv4 Gateway(IPv4网关)</dt><dd><p>输入将数据包传送到远端网络的机器IP地址。只有当机器是网络上的一个接点时才要输入。如果这台机器要作为您局域网的网关, <span class="emphasis"><iclass="EMPHASIS">请将此处设为空白</i></span>。IPv4网关,也被称作默认网关或默认路由器。</p></dd><dt>域名服务器</dt><dd><p>本地网络中的域名服务器的IP地址。本例中假设机器所在的网络中没有域名服务器,所以填入的是ISP提供的域名服务器地址 (<ttclass="HOSTID">208.163.10.2</tt>。)</p></dd><dt>IPv4 地址</dt><dd><p>本机所使用的IP地址。本例为 <tt class="HOSTID">192.168.0.1</tt>。</p></dd><dt>子网掩码</dt><dd><p>本范例中的IP地址属于一个C类地址 (<tt class="HOSTID">192.168.0.0</tt> - <ttclass="HOSTID">192.168.255.255</tt>)。默认的子网掩码为 (<ttclass="HOSTID">255.255.255.0</tt>)。</p></dd><dt>ifconfig 额外参数设定</dt><dd><p>任何<tt class="COMMAND">ifconfig</tt>命令跟网卡接口有关的参数。 本范例中没有。</p></dd></dl></div><p>使用 <b class="KEYCAP">Tab</b> 键选择 <spanclass="GUIBUTTON">[ OK ]</span>然后按 <b class="KEYCAP">Enter</b>键。</p><pre class="SCREEN"> User Confirmation Requested Would you like to Bring Up the ed0 interface right now? [ Yes ] No</pre><p>选择 <span class="GUIBUTTON">[ Yes ]</span> 然后按 <b class="KEYCAP">Enter</b>将会将机器的网卡转为启用状态。机器下次启动 的时候即可实用。</p></div><div class="SECT2"><h2 class="SECT2"><a id="GATEWAY" name="GATEWAY">2.9.2. 配置网关</a></h2><pre class="SCREEN"> User Confirmation Requested Do you want this machine to function as a network gateway? [ Yes ] No</pre><p>如果这台机器要作为本地网络和其它机器之间传送数据包的网关,请选择 <spanclass="GUIBUTTON">[ Yes ]</span> 然后按 <b class="KEYCAP">Enter</b>。如果这台机器只是网络上的一个节点主,请选择 <span class="GUIBUTTON">[ No ]</span> 并按<bclass="KEYCAP">Enter</b> 继续。</p></div><div class="SECT2"><h2 class="SECT2"><a id="INETD-SERVICES" name="INETD-SERVICES">2.9.3.配置网络服务</a></h2><pre class="SCREEN"> User Confirmation RequestedDo you want to configure inetd and the network services that it provides? Yes [ No ]</pre><p>如果选择 <span class="GUIBUTTON">[ No ]</span> ,许多网络服务,如 <bclass="APPLICATION">telnetd</b> 将不会启用。这表示远端用户将无法 <bclass="APPLICATION">telnet</b> 进入这台机器。本机器上的用户还是可以 <bclass="APPLICATION">telnet</b>到远端机器的。</p><p>这些服务可以在安装完成后修改<tt class="FILENAME">/etc/inetd.conf</tt>配置文件来启用它们。请参阅 <a href="network-inetd.html#NETWORK-INETD-OVERVIEW">Section19.14.1</a> 以获得更多的信息。</p><p>如果您想现在就配置这些网络服务,请选择<span class="GUIBUTTON">[ Yes ]</span> ,然后会看到下面的信息:</p><pre class="SCREEN"> User Confirmation RequestedThe Internet Super Server (inetd) allows a number of simple Internetservices to be enabled, including finger, ftp and telnetd. Enablingthese services may increase risk of security problems by increasingthe exposure of your system.With this in mind, do you wish to enable inetd? [ Yes ] No</pre><p>选择 <span class="GUIBUTTON">[ Yes ]</span> 继续。</p><pre class="SCREEN"> User Confirmation Requestedinetd(8) relies on its configuration file, /etc/inetd.conf, to determinewhich of its Internet services will be available. The default FreeBSDinetd.conf(5) leaves all services disabled by default, so they must bespecifically enabled in the configuration file before they willfunction, even once inetd(8) is enabled. Note that services forIPv6 must be separately enabled from IPv4 services.Select [Yes] now to invoke an editor on /etc/inetd.conf, or [No] touse the current settings. [ Yes ] No</pre><p>选择 <span class="GUIBUTTON">[ Yes ]</span> 将允许您添加网络服务(将相应网络服务每行开头的<var class="LITERAL">#</var>除掉即呆。</p><div class="FIGURE"><a id="INETD-EDIT" name="INETD-EDIT"></a><p><b>Figure 2-33. 编辑 <tt class="FILENAME">inetd.conf</tt>配置文件</b></p><p><img src="install/edit-inetd-conf.png" /></p></div><p>在加入您想启用的服务后,按下 <b class="KEYCAP">Esc</b>键会出现一个对话框可以让您离开以及保存修改。</p></div><div class="SECT2"><h2 class="SECT2"><a id="FTPANON" name="FTPANON">2.9.4. 匿名 FTP</a></h2><pre class="SCREEN"> User Confirmation Requested Do you want to have anonymous FTP access to this machine? Yes [ No ]</pre><div class="SECT3"><h3 class="SECT3"><a id="DENY-ANON" name="DENY-ANON">2.9.4.1. 不允许匿名 FTP访问</a></h3><p>选择默认的 <span class="GUIBUTTON">[ No ]</span> 并按下 <b class="KEYCAP">Enter</b>键将仍然可以让在这台机器上有账号的用户访问 FTP。</p></div><div class="SECT3"><h3 class="SECT3"><a id="FTPALLOW" name="FTPALLOW">2.9.4.2. 允许匿名 FTP访问</a></h3><p>如果您选择允许匿名FTP存取,那么网络中任何人都可以使用FTP来访问您的机器。在启用匿名访问之前应该考虑网络的安全问题。如果要知道更多有关网络安全的信息,请参阅 <a href="security.html">Chapter 10</a>。</p><p>要启用FTP匿名访问,用方向键选择 <span class="GUIBUTTON">[ Yes ]</span> 然后按 <bclass="KEYCAP">Enter</b>键。您会看到下面(或类似)的画面:</p><div class="FIGURE"><a id="ANON-FTP2" name="ANON-FTP2"></a><p><b>Figure 2-34. 默认的匿名FTP配置</b></p><p><img src="install/ftp-anon1.png" /></p></div><p>按 <b class="KEYCAP">F1</b> 键可以查看在线帮助文档:</p><pre class="SCREEN">This screen allows you to configure the anonymous FTP user.The following configuration values are editable:UID: The user ID you wish to assign to the anonymous FTP user. All files uploaded will be owned by this ID.Group: Which group you wish the anonymous FTP user to be in.Comment: String describing this user in /etc/passwdFTP Root Directory: Where files available for anonymous FTP will be kept.Upload subdirectory: Where files uploaded by anonymous FTP users will go.</pre><p>默认的FTP根目录将放在 <tt class="FILENAME">/var</tt>目录下。如果您的/var目录空间不足以应付您的FTP需求,您可以将FTP的根目录改为 <ttclass="FILENAME">/usr</tt> 目录下的 <tt class="FILENAME">/usr/ftp</tt> 目录。</p><p>当您对一切配置都满意后,请按 <b class="KEYCAP">Enter</b> 键继续。</p><pre class="SCREEN"> User Confirmation Requested Create a welcome message file for anonymous FTP users? [ Yes ] No</pre><p>如果您选择 <span class="GUIBUTTON">[ Yes ]</span> 并按下 <bclass="KEYCAP">Enter</b>键,系统会自动打开文本编辑器让您编辑FTP的欢迎信息。</p><div class="FIGURE"><a id="ANON-FTP4" name="ANON-FTP4"></a><p><b>Figure 2-35. 编辑FTP欢迎信息</b></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -