| … | |
… | |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-config.xml,v 1.77 2006/05/15 07:00:22 nightmorph Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-config.xml,v 1.78 2006/05/27 13:02:15 neysx Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>2.18</version> |
11 | <version>2.19</version> |
| 12 | <date>2006-03-28</date> |
12 | <date>2006-05-27</date> |
| 13 | |
13 | |
| 14 | <section> |
14 | <section> |
| 15 | <title>Filesystem Information</title> |
15 | <title>Filesystem Information</title> |
| 16 | <subsection> |
16 | <subsection> |
| 17 | <title>What is fstab?</title> |
17 | <title>What is fstab?</title> |
| … | |
… | |
| 332 | <title>Writing Down Network Information</title> |
332 | <title>Writing Down Network Information</title> |
| 333 | <body> |
333 | <body> |
| 334 | |
334 | |
| 335 | <p> |
335 | <p> |
| 336 | You now need to inform Linux about your network. This is defined in |
336 | You now need to inform Linux about your network. This is defined in |
| 337 | <path>/etc/hosts</path> and helps in resolving hostnames to IP addresses |
337 | <path>/etc/hosts</path> and helps in resolving hostnames to IP addresses for |
| 338 | for hosts that aren't resolved by your nameserver. For instance, if your |
338 | hosts that aren't resolved by your nameserver. You need to define your system. |
| 339 | internal network consists of three PCs called <c>jenny</c> (192.168.0.5), |
339 | You may also want to define other systems on your network if you don't want to |
| 340 | <c>benny</c> (192.168.0.6) and <c>tux</c> (192.168.0.7 - this system) you would |
340 | set up your own internal DNS system. |
| 341 | open <path>/etc/hosts</path> and fill in the values: |
|
|
| 342 | </p> |
341 | </p> |
| 343 | |
342 | |
| 344 | <pre caption="Opening /etc/hosts"> |
343 | <pre caption="Opening /etc/hosts"> |
| 345 | # <i>nano -w /etc/hosts</i> |
344 | # <i>nano -w /etc/hosts</i> |
| 346 | </pre> |
345 | </pre> |
| 347 | |
346 | |
| 348 | <pre caption="Filling in the networking information"> |
347 | <pre caption="Filling in the networking information"> |
| 349 | 127.0.0.1 localhost |
348 | <comment>(This defines the current system)</comment> |
|
|
349 | 127.0.0.1 tux.homenetwork tux localhost |
|
|
350 | |
|
|
351 | <comment>(Define extra systems on your network, |
|
|
352 | they need to have a static IP to be defined this way.)</comment> |
| 350 | 192.168.0.5 jenny.homenetwork jenny |
353 | 192.168.0.5 jenny.homenetwork jenny |
| 351 | 192.168.0.6 benny.homenetwork benny |
354 | 192.168.0.6 benny.homenetwork benny |
| 352 | 192.168.0.7 tux.homenetwork tux |
|
|
| 353 | </pre> |
|
|
| 354 | |
|
|
| 355 | <p> |
|
|
| 356 | If your system is the only system (or the nameservers handle all name |
|
|
| 357 | resolution) a single line is sufficient. For instance, if you want to call your |
|
|
| 358 | system <c>tux</c>: |
|
|
| 359 | </p> |
|
|
| 360 | |
|
|
| 361 | <pre caption="/etc/hosts for lonely or fully integrated PCs"> |
|
|
| 362 | 127.0.0.1 localhost tux |
|
|
| 363 | </pre> |
355 | </pre> |
| 364 | |
356 | |
| 365 | <p> |
357 | <p> |
| 366 | Save and exit the editor to continue. |
358 | Save and exit the editor to continue. |
| 367 | </p> |
359 | </p> |