networkd.po 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:11
  15. msgid "General Network Configuration"
  16. msgstr "一般网络配置"
  17. #. type: Content of: <sect1><sect2><indexterm><primary>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:14
  19. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:261
  20. msgid "network"
  21. msgstr "network"
  22. #. type: Content of: <sect1><sect2><indexterm><secondary>
  23. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:15
  24. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:230
  25. msgid "configuring"
  26. msgstr "configuring"
  27. #. type: Content of: <sect1><para>
  28. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:17
  29. msgid "This section only applies if a network card is to be configured."
  30. msgstr "本节只适用于需要配置网卡的情况。"
  31. #. type: Content of: <sect1><sect2><title>
  32. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:21
  33. msgid "Network Interface Configuration Files"
  34. msgstr "网络接口配置文件"
  35. #. type: Content of: <sect1><sect2><para>
  36. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:23
  37. msgid ""
  38. "Starting with version 209, systemd ships a network configuration daemon "
  39. "called <command>systemd-networkd</command> which can be used for basic "
  40. "network configuration. Additionally, since version 213, DNS name resolution "
  41. "can be handled by <command>systemd-resolved</command> in place of a static "
  42. "<filename>/etc/resolv.conf</filename> file. Both services are enabled by "
  43. "default."
  44. msgstr ""
  45. "从 209 版本开始,systemd 提供一个名为 <command>systemd-networkd</command> 的"
  46. "网络配置守护进程,它能够用于基础网络配置。另外,自 213 版本起,可以用 "
  47. "<command>systemd-resolved</command> 代替静态 <filename>/etc/resolv.conf</"
  48. "filename> 文件处理域名解析。这两个服务在默认情况下都是启用的。"
  49. #. type: Content of: <sect1><sect2><para>
  50. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:30
  51. msgid ""
  52. "Configuration files for <command>systemd-networkd</command> (and "
  53. "<command>systemd-resolved</command>) can be placed in <filename class="
  54. "\"directory\">/usr/lib/systemd/network</filename> or <filename class="
  55. "\"directory\">/etc/systemd/network</filename>. Files in <filename class="
  56. "\"directory\">/etc/systemd/network</filename> have a higher priority than "
  57. "the ones in <filename class=\"directory\">/usr/lib/systemd/network</"
  58. "filename>. There are three types of configuration files: <filename class="
  59. "\"extension\">.link</filename>, <filename class=\"extension\">.netdev</"
  60. "filename> and <filename class=\"extension\">.network</filename> files. For "
  61. "detailed descriptions and example contents of these configuration files, "
  62. "consult the <filename>systemd-link(5)</filename>, <filename>systemd-"
  63. "netdev(5)</filename> and <filename>systemd-network(5)</filename> manual "
  64. "pages."
  65. msgstr ""
  66. "<command>systemd-networkd</command> (以及 <command>systemd-resolved</"
  67. "command>)的配置文件可以放置在 <filename class=\"directory\">/usr/lib/systemd/"
  68. "network</filename> 或 <filename class=\"directory\">/etc/systemd/network</"
  69. "filename> 中。<filename class=\"directory\">/etc/systemd/network</filename> "
  70. "中的配置文件优先级高于 <filename class=\"directory\">/usr/lib/systemd/"
  71. "network</filename> 中的配置文件。有三种类型的配置文件:<filename class="
  72. "\"extension\">.link</filename>、 <filename class=\"extension\">.netdev</"
  73. "filename> 和 <filename class=\"extension\">.network</filename> 文件。要获得"
  74. "它们的详细描述和内容示例,参阅 <filename>systemd-link(5)</filename>、 "
  75. "<filename>systemd-netdev(5)</filename> 和 <filename>systemd-network(5)</"
  76. "filename> man 手册页面。"
  77. #. type: Content of: <sect1><sect2><sect3><title>
  78. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:47
  79. msgid "Network Device Naming"
  80. msgstr "网络设备命名"
  81. #. type: Content of: <sect1><sect2><sect3><para>
  82. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:50
  83. msgid ""
  84. "Udev normally assigns network card interface names based on physical system "
  85. "characteristics such as enp2s1. If you are not sure what your interface name "
  86. "is, you can always run <command>ip link</command> after you have booted your "
  87. "system."
  88. msgstr ""
  89. "Udev 一般根据系统物理特征为网卡分配接口名,例如 enp2s1。如果您不确定接口名是"
  90. "什么,可以在引导您的系统后,运行 <command>ip link</command> 命令。"
  91. #. type: Content of: <sect1><sect2><sect3><para>
  92. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:57
  93. msgid ""
  94. "For most systems, there is only one network interface for each type of "
  95. "connection. For example, the classic interface name for a wired connection "
  96. "is eth0. A wireless connection will usually have the name wifi0 or wlan0."
  97. msgstr ""
  98. "对于多数系统,每种连接类型只有一个网络接口。例如,有线连接的经典接口名是 "
  99. "eth0,而无线连接的接口名一般是 wifi0 或 wlan0。"
  100. #. type: Content of: <sect1><sect2><sect3><para>
  101. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:64
  102. msgid ""
  103. "If you prefer to use the classic or customized network interface names, "
  104. "there are three alternative ways to do that:"
  105. msgstr "如果您偏爱经典或自定义网络接口名,可以使用三种不同方式:"
  106. #. type: Content of: <sect1><sect2><sect3><itemizedlist><listitem><para><screen>
  107. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:71
  108. #, no-wrap
  109. msgid "<userinput>ln -s /dev/null /etc/systemd/network/99-default.link</userinput>"
  110. msgstr "<userinput>ln -s /dev/null /etc/systemd/network/99-default.link</userinput>"
  111. #. type: Content of: <sect1><sect2><sect3><itemizedlist><listitem><para>
  112. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:70
  113. msgid ""
  114. "Mask udev's .link file for the default policy: <placeholder type=\"screen\" "
  115. "id=\"0\"/>"
  116. msgstr ""
  117. "覆盖 udev 提供默认策略的 .link 文件:<placeholder type=\"screen\" id=\"0\"/>"
  118. #. type: Content of: <sect1><sect2><sect3><itemizedlist><listitem><para>
  119. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:77
  120. msgid ""
  121. "Create a manual naming scheme, for example by naming the interfaces "
  122. "something like \"internet0\", \"dmz0\", or \"lan0\". To do that, create ."
  123. "link files in /etc/systemd/network/ that select an explicit name or a better "
  124. "naming scheme for your network interfaces. For example:"
  125. msgstr ""
  126. "手动创建命名架构,例如将网络接口命名为“internet0”、“dmz0” 或 “lan0”。为此,"
  127. "在 /etc/systemd/network 中创建 .link 文件,为您的一个、一些或全部网络接口直"
  128. "接选择名称,或选择更好的命名架构。例如:"
  129. #. type: Content of: <sect1><sect2><sect3><itemizedlist><listitem><screen>
  130. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:84
  131. #, no-wrap
  132. msgid ""
  133. "<userinput>cat &gt; /etc/systemd/network/10-ether0.link &lt;&lt; \"EOF\"\n"
  134. "<literal>[Match]\n"
  135. "# Change the MAC address as appropriate for your network device\n"
  136. "MACAddress=12:34:45:78:90:AB\n"
  137. "\n"
  138. "[Link]\n"
  139. "Name=ether0</literal>\n"
  140. "EOF</userinput>"
  141. msgstr ""
  142. "<userinput>cat &gt; /etc/systemd/network/10-ether0.link &lt;&lt; \"EOF\"\n"
  143. "<literal>[Match]\n"
  144. "# 将 MAC 地址替换为适用于您的网络设备的值\n"
  145. "MACAddress=12:34:45:78:90:AB\n"
  146. "\n"
  147. "[Link]\n"
  148. "Name=ether0</literal>\n"
  149. "EOF</userinput>"
  150. #. type: Content of: <sect1><sect2><sect3><itemizedlist><listitem><para>
  151. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:94
  152. msgid "See the man page systemd.link(5) for more information."
  153. msgstr "参阅 man 页面 systemd.link(5) 获得更多信息。"
  154. #. type: Content of: <sect1><sect2><sect3><itemizedlist><listitem><para>
  155. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:100
  156. msgid ""
  157. "In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the kernel command "
  158. "line."
  159. msgstr "在 /boot/grub/grub.cfg 的内核命令行中传递选项 net.ifnames=0。"
  160. #. type: Content of: <sect1><sect2><sect3><title>
  161. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:108
  162. msgid "Static IP Configuration"
  163. msgstr "静态 IP 配置"
  164. #. type: Content of: <sect1><sect2><sect3><para>
  165. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:110
  166. msgid ""
  167. "The command below creates a basic configuration file for a Static IP setup "
  168. "(using both systemd-networkd and systemd-resolved):"
  169. msgstr ""
  170. "以下命令为静态 IP 设置创建一个基本的配置文件 (使用 systemd-networkd 和 "
  171. "systemd-resolved)。"
  172. #. jhalfs relies on the values for Name, Address, etc. If you want to change
  173. #. them, please inform the jhalfs maintainer(s).
  174. #. type: Content of: <sect1><sect2><sect3><screen>
  175. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:115
  176. #, no-wrap
  177. msgid ""
  178. "<userinput>cat &gt; /etc/systemd/network/10-eth-static.network &lt;&lt; \"EOF\"\n"
  179. "<literal>[Match]\n"
  180. "Name=<replaceable>&lt;network-device-name&gt;</replaceable>\n"
  181. "\n"
  182. "[Network]\n"
  183. "Address=192.168.0.2/24\n"
  184. "Gateway=192.168.0.1\n"
  185. "DNS=192.168.0.1\n"
  186. "Domains=<replaceable>&lt;Your Domain Name&gt;</replaceable></literal>\n"
  187. "EOF</userinput>"
  188. msgstr ""
  189. "<userinput>cat &gt; /etc/systemd/network/10-eth-static.network &lt;&lt; \"EOF\"\n"
  190. "<literal>[Match]\n"
  191. "Name=<replaceable>&lt;网络设备名&gt;</replaceable>\n"
  192. "\n"
  193. "[Network]\n"
  194. "Address=192.168.0.2/24\n"
  195. "Gateway=192.168.0.1\n"
  196. "DNS=192.168.0.1\n"
  197. "Domains=<replaceable>&lt;您的域名&gt;</replaceable></literal>\n"
  198. "EOF</userinput>"
  199. #. type: Content of: <sect1><sect2><sect3><para>
  200. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:126
  201. msgid ""
  202. "Multiple DNS entries can be added if you have more than one DNS server. Do "
  203. "not include DNS or Domains entries if you intend to use a static <filename>/"
  204. "etc/resolv.conf</filename> file."
  205. msgstr ""
  206. "如果您有多个 DNS 服务器,可以在配置文件中创建多个 DNS 项。如果您希望使用静"
  207. "态 <filename>/etc/resolv.conf</filename> 文件,则不要在配置文件中包含 DNS "
  208. "和 Domains 项。"
  209. #. type: Content of: <sect1><sect2><sect3><title>
  210. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:133
  211. msgid "DHCP Configuration"
  212. msgstr "DHCP 配置"
  213. #. type: Content of: <sect1><sect2><sect3><para>
  214. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:135
  215. msgid ""
  216. "The command below creates a basic configuration file for an IPv4 DHCP setup:"
  217. msgstr "以下命令为 IPv4 DHCP 配置创建基本配置文件:"
  218. #. type: Content of: <sect1><sect2><sect3><screen>
  219. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:138
  220. #, no-wrap
  221. msgid ""
  222. "<userinput>cat &gt; /etc/systemd/network/10-eth-dhcp.network &lt;&lt; \"EOF\"\n"
  223. "<literal>[Match]\n"
  224. "Name=&lt;network-device-name&gt;\n"
  225. "\n"
  226. "[Network]\n"
  227. "DHCP=ipv4\n"
  228. "\n"
  229. "[DHCP]\n"
  230. "UseDomains=true</literal>\n"
  231. "EOF</userinput>"
  232. msgstr ""
  233. "<userinput>cat &gt; /etc/systemd/network/10-eth-dhcp.network &lt;&lt; \"EOF\"\n"
  234. "<literal>[Match]\n"
  235. "Name=&lt;网络设备名&gt;\n"
  236. "\n"
  237. "[Network]\n"
  238. "DHCP=ipv4\n"
  239. "\n"
  240. "[DHCP]\n"
  241. "UseDomains=true</literal>\n"
  242. "EOF</userinput>"
  243. #. type: Content of: <sect1><sect2><title>
  244. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:154
  245. msgid "Creating the /etc/resolv.conf File"
  246. msgstr "创建 /etc/resolv.conf 文件"
  247. #. type: Content of: <sect1><sect2><indexterm><primary>
  248. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:157
  249. msgid "/etc/resolv.conf"
  250. msgstr "/etc/resolv.conf"
  251. #. type: Content of: <sect1><sect2><para>
  252. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:160
  253. msgid ""
  254. "If the system is going to be connected to the Internet, it will need some "
  255. "means of Domain Name Service (DNS) name resolution to resolve Internet "
  256. "domain names to IP addresses, and vice versa. This is best achieved by "
  257. "placing the IP address of the DNS server, available from the ISP or network "
  258. "administrator, into <filename>/etc/resolv.conf</filename>."
  259. msgstr ""
  260. "如果要将系统连接到 Internet,它需要某种域名服务 (DNS) 名称解析方式,以将 "
  261. "Internet 域名解析为 IP 地址,或将 IP 地址解析为域名。最好的方法是将 ISP 或网"
  262. "络管理员提供的 DNS 服务器 IP 地址写入 <filename>/etc/resolv.conf</filename>。"
  263. #. type: Content of: <sect1><sect2><sect3><title>
  264. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:168
  265. msgid "systemd-resolved Configuration"
  266. msgstr "systemd-resolved 配置"
  267. #. type: Content of: <sect1><sect2><sect3><note><para>
  268. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:170
  269. msgid ""
  270. "If using another means to configure your network interfaces (ex: ppp, "
  271. "network-manager, etc.), or if using any type of local resolver (ex: bind, "
  272. "dnsmasq, unbound, etc.), or any other software that generates an <filename>/"
  273. "etc/resolv.conf</filename> (ex: resolvconf), the <command>systemd-resolved</"
  274. "command> service should not be used."
  275. msgstr ""
  276. "如果使用其他方式配置网络接口 (例如 ppp 或 network-manager 等),或使用了某种本"
  277. "地解析器 (如 bind,dnsmasq,或者 unbound 等),或其他任何生成 <filename>/etc/resolv."
  278. "conf</filename> 的软件 (如 resolvconf),则不应使用 <command>systemd-"
  279. "resolved</command> 服务。"
  280. #. type: Content of: <sect1><sect2><sect3><para>
  281. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:177
  282. msgid ""
  283. "When using <command>systemd-resolved</command> for DNS configuration, it "
  284. "creates the file <filename>/run/systemd/resolve/resolv.conf</filename>. "
  285. "Create a symlink in <filename>/etc</filename> to use the generated file:"
  286. msgstr ""
  287. "在使用 <command>systemd-resolved</command> 进行 DNS 配置时,它创建文件 "
  288. "<filename>/run/systemd/resolve/resolv.conf</filename>。在 <filename>/etc</"
  289. "filename> 中创建符号链接以使用生成的文件:"
  290. #. type: Content of: <sect1><sect2><sect3><screen>
  291. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:182
  292. #, no-wrap
  293. msgid "<userinput>ln -sfv /run/systemd/resolve/resolv.conf /etc/resolv.conf</userinput>"
  294. msgstr "<userinput>ln -sfv /run/systemd/resolve/resolv.conf /etc/resolv.conf</userinput>"
  295. #. type: Content of: <sect1><sect2><sect3><title>
  296. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:187
  297. msgid "Static resolv.conf Configuration"
  298. msgstr "静态 resolv.conf 配置"
  299. #. type: Content of: <sect1><sect2><sect3><para>
  300. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:189
  301. msgid ""
  302. "If a static <filename>/etc/resolv.conf</filename> is desired, create it by "
  303. "running the following command:"
  304. msgstr ""
  305. "如果希望使用静态的 <filename>/etc/resolv.conf</filename> 执行以下命令创建它:"
  306. #. type: Content of: <sect1><sect2><sect3><screen>
  307. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:192
  308. #, no-wrap
  309. msgid ""
  310. "<userinput>cat &gt; /etc/resolv.conf &lt;&lt; \"EOF\"\n"
  311. "<literal># Begin /etc/resolv.conf\n"
  312. "\n"
  313. "domain <replaceable>&lt;Your Domain Name&gt;</replaceable>\n"
  314. "nameserver <replaceable>&lt;IP address of your primary nameserver&gt;</replaceable>\n"
  315. "nameserver <replaceable>&lt;IP address of your secondary nameserver&gt;</replaceable>\n"
  316. "\n"
  317. "# End /etc/resolv.conf</literal>\n"
  318. "EOF</userinput>"
  319. msgstr ""
  320. "<userinput>cat &gt; /etc/resolv.conf &lt;&lt; \"EOF\"\n"
  321. "<literal># Begin /etc/resolv.conf\n"
  322. "\n"
  323. "domain <replaceable>&lt;您的域名&gt;</replaceable>\n"
  324. "nameserver <replaceable>&lt;您的主要域名服务器 IP 地址&gt;</replaceable>\n"
  325. "nameserver <replaceable>&lt;您的次要域名服务器 IP 地址&gt;</replaceable>\n"
  326. "\n"
  327. "# End /etc/resolv.conf</literal>\n"
  328. "EOF</userinput>"
  329. #. type: Content of: <sect1><sect2><sect3><para>
  330. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:202
  331. msgid ""
  332. "The <varname>domain</varname> statement can be omitted or replaced with a "
  333. "<varname>search</varname> statement. See the man page for resolv.conf for "
  334. "more details."
  335. msgstr ""
  336. "可以省略 <varname>domain</varname> 语句,或使用一条 <varname>search</"
  337. "varname> 语句代替它。阅读 resolv.conf 的 man 页面了解更多细节。"
  338. #. type: Content of: <sect1><sect2><sect3><para>
  339. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:206
  340. msgid ""
  341. "Replace <replaceable>&lt;IP address of the nameserver&gt;</replaceable> with "
  342. "the IP address of the DNS server most appropriate for your setup. There "
  343. "will often be more than one entry (requirements demand secondary servers for "
  344. "fallback capability). If you only need or want one DNS server, remove the "
  345. "second <emphasis>nameserver</emphasis> line from the file. The IP address "
  346. "may also be a router on the local network. Another option is to use the "
  347. "Google Public DNS service using the IP addresses below as nameservers."
  348. msgstr ""
  349. "将 <replaceable>&lt;域名服务器的 IP 地址&gt;</replaceable> 替换为您的网络环境"
  350. "下最合适的 DNS 服务器 IP 地址。这里往往会写入不止一个 DNS 服务器 (需要次要服务器作为后备"
  351. ")。如果您只需要或只希望使用一个 DNS 服务器,可以删除文件中"
  352. "的第二个 <emphasis>nameserver</emphasis> 行。可以写入本地网络路由器的 IP 地址。也可以使用 Google 公用 DNS 服务器作为域名服务器,它们的 IP 地址在下面给出。"
  353. #. type: Content of: <sect1><sect2><sect3><note><para>
  354. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:216
  355. msgid ""
  356. "The Google Public IPv4 DNS addresses are <parameter>8.8.8.8</parameter> and "
  357. "<parameter>8.8.4.4</parameter> for IPv4, and "
  358. "<parameter>2001:4860:4860::8888</parameter> and "
  359. "<parameter>2001:4860:4860::8844</parameter> for IPv6."
  360. msgstr ""
  361. "Google 公用 DNS 服务器的 IPv4 地址是 <parameter>8.8.8.8</parameter> 和 "
  362. "<parameter>8.8.4.4</parameter>,IPv6 地址是 "
  363. "<parameter>2001:4860:4860::8888</parameter> 和 "
  364. "<parameter>2001:4860:4860::8844</parameter>。"
  365. #. type: Content of: <sect1><sect2><title>
  366. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:226
  367. msgid "Configuring the system hostname"
  368. msgstr "配置系统主机名"
  369. #. type: Content of: <sect1><sect2><indexterm><primary>
  370. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:229
  371. msgid "hostname"
  372. msgstr "hostname"
  373. #. type: Content of: <sect1><sect2><para>
  374. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:233
  375. msgid ""
  376. "During the boot process, the file <filename>/etc/hostname</filename> is used "
  377. "for establishing the system's hostname."
  378. msgstr ""
  379. "在引导过程中,<filename>/etc/hostname</filename> 被用于设定系统主机名。"
  380. #. type: Content of: <sect1><sect2><para>
  381. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:236
  382. msgid ""
  383. "Create the <filename>/etc/hostname</filename> file and enter a hostname by "
  384. "running:"
  385. msgstr ""
  386. "执行以下命令,创建 <filename>/etc/hostname</filename> 文件,并输入一个主机"
  387. "名:"
  388. #. type: Content of: <sect1><sect2><screen>
  389. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:239
  390. #, no-wrap
  391. msgid "<userinput>echo \"<replaceable>&lt;lfs&gt;</replaceable>\" &gt; /etc/hostname</userinput>"
  392. msgstr "<userinput>echo \"<replaceable>&lt;lfs&gt;</replaceable>\" &gt; /etc/hostname</userinput>"
  393. #. type: Content of: <sect1><sect2><para>
  394. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:241
  395. msgid ""
  396. "<replaceable>&lt;lfs&gt;</replaceable> needs to be replaced with the name "
  397. "given to the computer. Do not enter the Fully Qualified Domain Name (FQDN) "
  398. "here. That information is put in the <filename>/etc/hosts</filename> file."
  399. msgstr ""
  400. "<replaceable>&lt;lfs&gt;</replaceable> 需要被替换为赋予该计算机的名称。不要"
  401. "在这里输入全限定域名 (FQDN),它应该被写入 <filename>/etc/hosts</filename> 文"
  402. "件。"
  403. #. type: Content of: <sect1><sect2><title>
  404. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:249
  405. msgid "Customizing the /etc/hosts File"
  406. msgstr "自定义 /etc/hosts 文件"
  407. #. type: Content of: <sect1><sect2><indexterm><secondary>
  408. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:252
  409. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:257
  410. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:262
  411. msgid "/etc/hosts"
  412. msgstr "/etc/hosts"
  413. #. type: Content of: <sect1><sect2><indexterm><primary>
  414. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:256
  415. msgid "localnet"
  416. msgstr "localnet"
  417. #. type: Content of: <sect1><sect2><para>
  418. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:265
  419. msgid ""
  420. "Decide on a fully-qualified domain name (FQDN), and possible aliases for use "
  421. "in the <filename>/etc/hosts</filename> file. If using static IP addresses, "
  422. "you'll also need to decide on an IP address. The syntax for a hosts file "
  423. "entry is:"
  424. msgstr ""
  425. "选择一个全限定域名 (FQDN),和可能的别名,以供 <filename>/etc/hosts</"
  426. "filename> 文件使用。如果使用静态 IP 地址,您还需要确定要使用的 IP 地址。"
  427. "hosts 文件条目的语法是:"
  428. #. type: Content of: <sect1><sect2><screen>
  429. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:270
  430. #, no-wrap
  431. msgid "<literal>IP_address myhost.example.org aliases</literal>"
  432. msgstr "<literal>IP_地址 主机名.域名 别名</literal>"
  433. #. type: Content of: <sect1><sect2><para>
  434. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:272
  435. msgid ""
  436. "Unless the computer is to be visible to the Internet (i.e., there is a "
  437. "registered domain and a valid block of assigned IP addresses&mdash;most "
  438. "users do not have this), make sure that the IP address is in the private "
  439. "network IP address range. Valid ranges are:"
  440. msgstr ""
  441. "除非该计算机可以从 Internet 访问 (即拥有一个注册域名,并分配了一个有效的 IP "
  442. "地址段 —— 多数用户没有分配有效 IP),确认使用的 IP 地址属于私网 IP 范围。有效"
  443. "的范围是:"
  444. #. type: Content of: <sect1><sect2><screen>
  445. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:277
  446. #, no-wrap
  447. msgid ""
  448. "<literal>Private Network Address Range Normal Prefix\n"
  449. "10.0.0.1 - 10.255.255.254 8\n"
  450. "172.x.0.1 - 172.x.255.254 16\n"
  451. "192.168.y.1 - 192.168.y.254 24</literal>"
  452. msgstr ""
  453. "<literal>"
  454. "私网地址范围 公共前缀长度\n"
  455. "10.0.0.1 - 10.255.255.254 8\n"
  456. "172.x.0.1 - 172.x.255.254 16\n"
  457. "192.168.y.1 - 192.168.y.254 24</literal>"
  458. #. type: Content of: <sect1><sect2><para>
  459. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:282
  460. msgid ""
  461. "x can be any number in the range 16-31. y can be any number in the range "
  462. "0-255."
  463. msgstr "x 可以是 16-31 之间的任何数字。y 可以是 0-255 之间的任何数字。"
  464. #. type: Content of: <sect1><sect2><para>
  465. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:285
  466. msgid ""
  467. "A valid private IP address could be 192.168.1.1. A valid FQDN for this IP "
  468. "could be lfs.example.org."
  469. msgstr ""
  470. "有效的私网 IP 地址的一个例子是 192.168.1.1。与之对应的 FQDN 可以是 lfs."
  471. "example.org。"
  472. #. type: Content of: <sect1><sect2><para>
  473. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:288
  474. msgid ""
  475. "Even if not using a network card, a valid FQDN is still required. This is "
  476. "necessary for certain programs, such as MTAs, to operate properly."
  477. msgstr "即使没有网卡,也要提供一个有效的 FQDN。某些程序,如 MTA,需要它才能正常工作。"
  478. #. type: Content of: <sect1><sect2><para>
  479. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:307
  480. msgid ""
  481. "Create the <filename>/etc/hosts</filename> file using the following command:"
  482. msgstr ""
  483. "执行以下命令,创建 <filename>/etc/hostname</filename> 文件:"
  484. #. type: Content of: <sect1><sect2><screen>
  485. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:310
  486. #, no-wrap
  487. msgid ""
  488. "<userinput>cat &gt; /etc/hosts &lt;&lt; \"EOF\"\n"
  489. "<literal># Begin /etc/hosts\n"
  490. "\n"
  491. "127.0.0.1 localhost.localdomain localhost\n"
  492. "127.0.1.1 <replaceable>&lt;FQDN&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable>\n"
  493. "<replaceable>&lt;192.168.0.2&gt;</replaceable> <replaceable>&lt;FQDN&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> <replaceable>[alias1] [alias2] ...</replaceable>\n"
  494. "::1 localhost ip6-localhost ip6-loopback\n"
  495. "ff02::1 ip6-allnodes\n"
  496. "ff02::2 ip6-allrouters\n"
  497. "\n"
  498. "# End /etc/hosts</literal>\n"
  499. "EOF</userinput>"
  500. msgstr ""
  501. "<userinput>cat &gt; /etc/hosts &lt;&lt; \"EOF\"\n"
  502. "<literal># Begin /etc/hosts\n"
  503. "\n"
  504. "127.0.0.1 localhost.localdomain localhost\n"
  505. "127.0.1.1 <replaceable>&lt;FQDN&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable>\n"
  506. "<replaceable>&lt;192.168.0.2&gt;</replaceable> <replaceable>&lt;FQDN&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> <replaceable>[alias1] [alias2] ...</replaceable>\n"
  507. "::1 localhost ip6-localhost ip6-loopback\n"
  508. "ff02::1 ip6-allnodes\n"
  509. "ff02::2 ip6-allrouters\n"
  510. "\n"
  511. "# End /etc/hosts</literal>\n"
  512. "EOF</userinput>"
  513. #. type: Content of: <sect1><sect2><para>
  514. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:323
  515. msgid ""
  516. "The <replaceable>&lt;192.168.0.2&gt;</replaceable>, <replaceable>&lt;FQDN&gt;"
  517. "</replaceable>, and <replaceable>&lt;HOSTNAME&gt;</replaceable> values need "
  518. "to be changed for specific uses or requirements (if assigned an IP address "
  519. "by a network/system administrator and the machine will be connected to an "
  520. "existing network). The optional alias name(s) can be omitted, and the "
  521. "<replaceable>&lt;192.168.0.2</replaceable> line can be omitted if you are "
  522. "using a connection configured with DHCP or IPv6 Autoconfiguration."
  523. msgstr ""
  524. "其中 <replaceable>&lt;192.168.0.2&gt;</replaceable>,<replaceable>&lt;"
  525. "FQDN&gt;</replaceable>,以及<replaceable>&lt;主机名&gt;</replaceable> 的值需要"
  526. "为特定使用环境和需求进行修改 (如果系统或网络管理员分配了 IP 地址,且本机将被"
  527. "连接到现有的网络中)。可以略去别名 (alias),它们不是必要的。"
  528. #. type: Content of: <sect1><sect2><para>
  529. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/networkd.xml:332
  530. msgid ""
  531. "The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents the IPv6 "
  532. "loopback interface. 127.0.1.1 is a loopback entry reserved specifically for "
  533. "the FQDN."
  534. msgstr "::1 是 127.0.0.1 在 IPv6 中的对应,即 IPv6 回环接口。"