Changeset ba40e32
- Timestamp:
- 09/14/2023 08:50:37 AM (13 months ago)
- Branches:
- 12.1, 12.1-rc1, 12.2, 12.2-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/update-glibc
- Children:
- 2df066c9, d269e20, dc39c7b
- Parents:
- efd1113
- git-author:
- Xi Ruoyao <xry111@…> (09/14/2023 08:48:46 AM)
- git-committer:
- Xi Ruoyao <xry111@…> (09/14/2023 08:50:37 AM)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/glibc.xml
refd1113 rba40e32 321 321 following:</para> 322 322 323 <screen ><userinput>cat > /etc/nsswitch.conf << "EOF"323 <screen revision='sysv'><userinput>cat > /etc/nsswitch.conf << "EOF" 324 324 <literal># Begin /etc/nsswitch.conf 325 325 … … 329 329 330 330 hosts: files dns 331 networks: files 332 333 protocols: files 334 services: files 335 ethers: files 336 rpc: files 337 338 # End /etc/nsswitch.conf</literal> 339 EOF</userinput></screen> 340 341 <screen revision='systemd'><userinput>cat > /etc/nsswitch.conf << "EOF" 342 <literal># Begin /etc/nsswitch.conf 343 344 passwd: files systemd 345 group: files systemd 346 shadow: files systemd 347 348 hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns 331 349 networks: files 332 350 -
chapter09/network.xml
refd1113 rba40e32 179 179 </indexterm> 180 180 181 <para>Decide on the IP address, fully-qualified domain name (FQDN), and 182 possible aliases for use in the <filename>/etc/hosts</filename> file. The 183 syntax is:</para> 181 <para>Decide on a fully-qualified domain name (FQDN), and possible aliases 182 for use in the <filename>/etc/hosts</filename> file. If using static IP 183 addresses, you'll also need to decide on an IP address. The syntax 184 for a hosts file entry is:</para> 184 185 185 186 <screen><literal>IP_address myhost.example.org aliases</literal></screen> … … 198 199 range 0-255.</para> 199 200 200 <para>A valid private IP address could be 192.168.1.1. A valid FQDN for 201 this IP could be lfs.example.org.</para> 202 203 <para>Even if not using a network card, a valid FQDN is still required. 204 This is necessary for certain programs to operate correctly.</para> 201 <para>A valid private IP address could be 192.168.1.1.</para> 202 203 <para>If the computer is to be visible to the Internet, a valid FQDN 204 can be the domain name itself, or a string resulted by concatenating a 205 prefix (often the hostname) and the domain name with a <quote>.</quote> 206 character. And, you need to contact the domain provider to resolve the 207 FQDN to your public IP address.</para> 208 209 <para>Even if the computer is not visible to the Internet, a FQDN is 210 still needed for certain programs, such as MTAs, to operate properly. 211 A special FQDN, <literal>localhost.localdomain</literal>, can be used 212 for this purpose.</para> 205 213 206 214 <para>Create the <filename>/etc/hosts</filename> file by running:</para> -
chapter09/networkd.xml
refd1113 rba40e32 317 317 range 0-255.</para> 318 318 319 <para>A valid private IP address could be 192.168.1.1. A valid FQDN for 320 this IP could be lfs.example.org.</para> 321 322 <para>Even if not using a network card, a valid FQDN is still required. 323 This is necessary for certain programs, such as MTAs, to operate properly.</para> 324 325 <!-- 326 <para>Create the /etc/hosts file using the following command:</para> 327 328 <screen role="nodump"><userinput>cat > /etc/hosts << "EOF" 319 <para>A valid private IP address could be 192.168.1.1.</para> 320 321 <para>If the computer is to be visible to the Internet, a valid FQDN 322 can be the domain name itself, or a string resulted by concatenating a 323 prefix (often the hostname) and the domain name with a <quote>.</quote> 324 character. And, you need to contact the domain provider to resolve the 325 FQDN to your public IP address.</para> 326 327 <para>Even if the computer is not visible to the Internet, a FQDN is 328 still needed for certain programs, such as MTAs, to operate properly. 329 A special FQDN, <literal>localhost.localdomain</literal>, can be used 330 for this purpose.</para> 331 332 <para>Create the <filename>/etc/hosts</filename> file using the following 333 command:</para> 334 335 <screen><userinput>cat > /etc/hosts << "EOF" 329 336 <literal># Begin /etc/hosts 330 337 331 127.0.0.1 localhost.localdomain localhost 332 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> 333 ::1 localhost ip6-localhost ip6-loopback 338 <replaceable><192.168.0.2></replaceable> <replaceable><FQDN></replaceable> <replaceable>[alias1] [alias2] ...</replaceable> 339 ::1 ip6-localhost ip6-loopback 334 340 ff02::1 ip6-allnodes 335 341 ff02::2 ip6-allrouters … … 337 343 # End /etc/hosts</literal> 338 344 EOF</userinput></screen> 339 --> 340 341 <para>Create the <filename>/etc/hosts</filename> file using the following 342 command:</para> 343 344 <screen><userinput>cat > /etc/hosts << "EOF" 345 <literal># Begin /etc/hosts 346 347 127.0.0.1 localhost.localdomain localhost 348 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> 349 <replaceable><192.168.0.2></replaceable> <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> <replaceable>[alias1] [alias2] ...</replaceable> 350 ::1 localhost ip6-localhost ip6-loopback 351 ff02::1 ip6-allnodes 352 ff02::2 ip6-allrouters 353 354 # End /etc/hosts</literal> 355 EOF</userinput></screen> 356 357 <para>The <replaceable><192.168.0.2></replaceable>, 358 <replaceable><FQDN></replaceable>, and 359 <replaceable><HOSTNAME></replaceable> values need to be 345 346 <para>The <replaceable><192.168.0.2></replaceable> and 347 <replaceable><FQDN></replaceable> values need to be 360 348 changed for specific uses or requirements (if assigned an IP address by a 361 349 network/system administrator and the machine will be connected to an 362 350 existing network). The optional alias name(s) can be omitted, and the 363 351 <replaceable><192.168.0.2></replaceable> line can be omitted if you 364 are using a connection configured with DHCP or IPv6 Autoconfiguration.</para> 352 are using a connection configured with DHCP or IPv6 Autoconfiguration, 353 or using <literal>localhost.localdomain</literal> as the FQDN.</para> 354 355 <para>The <filename>/etc/hostname</filename> does not contain entries 356 for <literal>localhost</literal>, 357 <literal>localhost.localdomain</literal>, or the hostname (without a 358 domain) because they are handled by the 359 <systemitem class='library'>myhostname</systemitem> NSS module, read 360 the man page <filename>nss-myhostname(8)</filename> for details.</para> 365 361 366 362 <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents 367 the IPv6 loopback interface. 127.0.1.1 is a loopback entry reserved 368 specifically for the FQDN.</para> 363 the IPv6 loopback interface.</para> 369 364 370 365 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.