/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-config.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-config.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.123 Revision 1.129
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.123 2013/12/17 09:34:53 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-config.xml,v 1.129 2013/12/19 10:48:20 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract> 11<abstract>
12You need to edit some important configuration files. In this chapter 12You need to edit some important configuration files. In this chapter
13you receive an overview of these files and an explanation on how to 13you receive an overview of these files and an explanation on how to
14proceed. 14proceed.
15</abstract> 15</abstract>
16 16
17<version>29</version> 17<version>35</version>
18<date>2013-12-17</date> 18<date>2013-12-19</date>
19 19
20<section> 20<section>
21<title>Filesystem Information</title> 21<title>Filesystem Information</title>
22<subsection> 22<subsection>
23<title>What is fstab?</title> 23<title>What is fstab?</title>
80 80
81<pre caption="Opening /etc/fstab"> 81<pre caption="Opening /etc/fstab">
82# <i>nano -w /etc/fstab</i> 82# <i>nano -w /etc/fstab</i>
83</pre> 83</pre>
84 84
85<p>
86In the remainder of the text, we use the default <path>/dev/sd*</path> block
87device files as partition. You can also opt to use the symbolic links in the
88<path>/dev/disk/byid</path> or <path>/dev/disk/by-uuid</path>. These names are
89not likely to change, whereas the default block device files naming depends on
90a number of factors (such as how and in what order the disks are attached to
91your system). However, if you do not intend to fiddle with the disk ordering,
92you can continue with the default block device files safely.
93</p>
94
85</body> 95</body>
86<body test="func:keyval('/boot')"> 96<body test="func:keyval('/boot')">
87 97
88<p> 98<p>
89Let us take a look at how we write down the options for the <path>/boot</path> 99Let us take a look at how we write down the options for the <path>/boot</path>
119 129
120<p> 130<p>
121Now use the <e>example</e> below to create your <path>/etc/fstab</path>: 131Now use the <e>example</e> below to create your <path>/etc/fstab</path>:
122</p> 132</p>
123 133
124<pre caption="A full /etc/fstab example" test="func:keyval('arch')='HPPA'"> 134<pre caption="A full /etc/fstab example" test="func:keyval('arch')='HPPA' or func:keyval('arch')='x86' or func:keyval('arch')='AMD64'">
125<keyval id="/boot"/> /boot ext2 defaults,noatime 0 2 135<keyval id="/boot"/> /boot ext2 defaults,noatime 0 2
126/dev/sda3 none swap sw 0 0 136/dev/sda3 none swap sw 0 0
127/dev/sda4 / ext4 noatime 0 1 137/dev/sda4 / ext4 noatime 0 1
128 138
129/dev/cdrom /mnt/cdrom auto noauto,user 0 0 139/dev/cdrom /mnt/cdrom auto noauto,user 0 0
130</pre> 140</pre>
131 141
132<pre caption="A full /etc/fstab example" test="func:keyval('arch')='Alpha' or func:keyval('arch')='MIPS' or func:keyval('arch')='x86' or func:keyval('arch')='AMD64'"> 142<pre caption="A full /etc/fstab example" test="func:keyval('arch')='Alpha' or func:keyval('arch')='MIPS'">
133<keyval id="/boot"/> /boot ext2 defaults,noatime 0 2 143<keyval id="/boot"/> /boot ext2 defaults,noatime 0 2
134/dev/sda2 none swap sw 0 0 144/dev/sda2 none swap sw 0 0
135/dev/sda3 / ext4 noatime 0 1 145/dev/sda3 / ext4 noatime 0 1
136 146
137/dev/cdrom /mnt/cdrom auto noauto,user 0 0 147/dev/cdrom /mnt/cdrom auto noauto,user 0 0
206You only need a domain if your ISP or network administrator says so, or if you 216You only need a domain if your ISP or network administrator says so, or if you
207have a DNS server but not a DHCP server. You don't need to worry about DNS or 217have a DNS server but not a DHCP server. You don't need to worry about DNS or
208domainnames if your networking is setup for DHCP. 218domainnames if your networking is setup for DHCP.
209</p> 219</p>
210 220
221<note>
222The <path>/etc/conf.d/net</path> file does not exist by default, so you might
223need to create it.
224</note>
225
211<pre caption="Setting the domainname"> 226<pre caption="Setting the domainname">
212# <i>nano -w /etc/conf.d/net</i> 227# <i>nano -w /etc/conf.d/net</i>
213 228
214<comment>(Set the dns_domain variable to your domain name)</comment> 229<comment>(Set the dns_domain variable to your domain name)</comment>
215dns_domain_lo="<i>homenetwork</i>" 230dns_domain_lo="<i>homenetwork</i>"
233nis_domain_lo="<i>my-nisdomain</i>" 248nis_domain_lo="<i>my-nisdomain</i>"
234</pre> 249</pre>
235 250
236<note> 251<note>
237For more information on configuring DNS and NIS, please read the examples 252For more information on configuring DNS and NIS, please read the examples
238provided in <path>/usr/share/doc/openrc-*/net.example.bz2</path> which 253provided in <path>/usr/share/doc/netifrc-*/net.example.bz2</path> which
239can be read using <c>bzless</c>. Also, you may want to emerge <c>openresolv</c> 254can be read using <c>bzless</c>. Also, you may want to emerge <c>openresolv</c>
240to help manage your DNS/NIS setup. 255to help manage your DNS/NIS setup.
241</note> 256</note>
242 257
243</body> 258</body>
262<p> 277<p>
263All networking information is gathered in <path>/etc/conf.d/net</path>. It uses 278All networking information is gathered in <path>/etc/conf.d/net</path>. It uses
264a straightforward yet not intuitive syntax if you don't know how to set up 279a straightforward yet not intuitive syntax if you don't know how to set up
265networking manually. But don't fear, we'll explain everything. A fully 280networking manually. But don't fear, we'll explain everything. A fully
266commented example that covers many different configurations is available in 281commented example that covers many different configurations is available in
267<path>/usr/share/doc/openrc-*/net.example.bz2</path>. 282<path>/usr/share/doc/netifrc-*/net.example.bz2</path>.
268</p> 283</p>
269 284
270<p> 285<p>
271DHCP is used by default. For DHCP to work, you will need to install a DHCP 286DHCP is used by default. For DHCP to work, you will need to install a DHCP
272client. This is described later in <uri 287client. This is described later in <uri
281this example): 296this example):
282</p> 297</p>
283 298
284<pre caption="Opening /etc/conf.d/net for editing"> 299<pre caption="Opening /etc/conf.d/net for editing">
285# <i>nano -w /etc/conf.d/net</i> 300# <i>nano -w /etc/conf.d/net</i>
286</pre>
287
288<p>
289You will see the following file:
290</p>
291
292<pre caption="Default /etc/conf.d/net">
293# This blank configuration will automatically use DHCP for any net.*
294# scripts in /etc/init.d. To create a more complete configuration,
295# please review /usr/share/doc/openrc-*/net.example.bz2 and save
296# your configuration in /etc/conf.d/net (this file :]!).
297</pre> 301</pre>
298 302
299<p> 303<p>
300To enter your own IP address, netmask and gateway, you need 304To enter your own IP address, netmask and gateway, you need
301to set both <c>config_eth0</c> and <c>routes_eth0</c>: 305to set both <c>config_eth0</c> and <c>routes_eth0</c>:
321<pre caption="Automatically obtaining an IP address for eth0"> 325<pre caption="Automatically obtaining an IP address for eth0">
322config_eth0="dhcp" 326config_eth0="dhcp"
323</pre> 327</pre>
324 328
325<p> 329<p>
326Please read <path>/usr/share/doc/openrc-*/net.example.bz2</path> for a 330Please read <path>/usr/share/doc/netifrc-*/net.example.bz2</path> for a
327list of all available options. Be sure to also read your DHCP client manpage if 331list of all available options. Be sure to also read your DHCP client manpage if
328you need to set specific DHCP options. 332you need to set specific DHCP options.
329</p> 333</p>
330 334
331<p> 335<p>
516</p> 520</p>
517 521
518</body> 522</body>
519</subsection> 523</subsection>
520 524
521<subsection>
522<title>Configure locales</title>
523<body>
524
525<p>
526You will probably only use one or maybe two locales on your system. You have to
527specify locales you will need in <path>/etc/locale.gen</path>.
528</p>
529
530<pre caption="Opening /etc/locale.gen">
531# <i>nano -w /etc/locale.gen</i>
532</pre>
533
534<p>
535The following locales are an example to get both English (United States) and
536German (Germany) with the accompanying character formats (like UTF-8).
537</p>
538
539<pre caption="Specify your locales">
540en_US ISO-8859-1
541en_US.UTF-8 UTF-8
542de_DE ISO-8859-1
543de_DE@euro ISO-8859-15
544</pre>
545
546<note>
547You can select your desired locales in the list given by running <c>locale -a</c>.
548</note>
549
550<warn>
551We strongly suggest that you should use at least one UTF-8 locale because some
552applications may require it.
553</warn>
554
555<p>
556The next step is to run <c>locale-gen</c>. It will generates all the locales you
557have specified in the <path>/etc/locale.gen</path> file.
558</p>
559
560<pre caption="Running locale-gen">
561# <i>locale-gen</i>
562</pre>
563
564<p>
565Once done, you now have the possibility to set the system-wide locale settings
566in the <path>/etc/env.d/02locale</path> file:
567</p>
568
569<pre caption="Setting the default system locale in /etc/env.d/02locale">
570LANG="de_DE.UTF-8"
571LC_COLLATE="C"
572</pre>
573
574<p>
575And reload your environment:
576</p>
577
578<pre caption="Reload shell environment">
579# env-update &amp;&amp; source /etc/profile
580</pre>
581
582<p>
583We made a full <uri link="https://wiki.gentoo.org/wiki/Localization/HOWTO">Localization
584Guide</uri> to help you through this process. You can also read the detailed
585<uri link="https://wiki.gentoo.org/wiki/UTF-8">UTF-8 article</uri> for very specific
586informations to enable UTF-8 on your system.
587</p>
588
589<p test="not(func:keyval('arch')='PPC64')">
590Please continue with <uri link="?part=1&amp;chap=9">Installing Necessary System
591Tools</uri>.
592</p>
593
594</body>
595</subsection>
596<subsection test="func:keyval('arch')='PPC64'"> 525<subsection test="func:keyval('arch')='PPC64'">
597<title>Configuring the Console</title> 526<title>Configuring the Console</title>
598<body> 527<body>
599 528
600<p> 529<p>

Legend:
Removed from v.1.123  
changed lines
  Added in v.1.129

  ViewVC Help
Powered by ViewVC 1.1.20