/[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.122 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.122 2013/07/24 20:40:40 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>28</version> 17<version>35</version>
18<date>2013-07-24</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
165</p> 175</p>
166 176
167<p> 177<p>
168To improve performance, most users would want to add the <c>noatime</c> 178To improve performance, most users would want to add the <c>noatime</c>
169mount option, which results in a faster system since access times 179mount option, which results in a faster system since access times
170aren't registered (you don't need those generally anyway). 180aren't registered (you don't need those generally anyway). This is also
181recommended for solid state drive (SSD) users, who should also enable
182the <c>discard</c> mount option (ext4 and btrfs only for now) which
183makes the TRIM command work.
171</p> 184</p>
172 185
173<p> 186<p>
174Double-check your <path>/etc/fstab</path>, save and quit to continue. 187Double-check your <path>/etc/fstab</path>, save and quit to continue.
175</p> 188</p>
203You 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
204have 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
205domainnames if your networking is setup for DHCP. 218domainnames if your networking is setup for DHCP.
206</p> 219</p>
207 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
208<pre caption="Setting the domainname"> 226<pre caption="Setting the domainname">
209# <i>nano -w /etc/conf.d/net</i> 227# <i>nano -w /etc/conf.d/net</i>
210 228
211<comment>(Set the dns_domain variable to your domain name)</comment> 229<comment>(Set the dns_domain variable to your domain name)</comment>
212dns_domain_lo="<i>homenetwork</i>" 230dns_domain_lo="<i>homenetwork</i>"
230nis_domain_lo="<i>my-nisdomain</i>" 248nis_domain_lo="<i>my-nisdomain</i>"
231</pre> 249</pre>
232 250
233<note> 251<note>
234For more information on configuring DNS and NIS, please read the examples 252For more information on configuring DNS and NIS, please read the examples
235provided in <path>/usr/share/doc/openrc-*/net.example.bz2</path> which 253provided in <path>/usr/share/doc/netifrc-*/net.example.bz2</path> which
236can 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>
237to help manage your DNS/NIS setup. 255to help manage your DNS/NIS setup.
238</note> 256</note>
239 257
240</body> 258</body>
259<p> 277<p>
260All 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
261a 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
262networking manually. But don't fear, we'll explain everything. A fully 280networking manually. But don't fear, we'll explain everything. A fully
263commented example that covers many different configurations is available in 281commented example that covers many different configurations is available in
264<path>/usr/share/doc/openrc-*/net.example.bz2</path>. 282<path>/usr/share/doc/netifrc-*/net.example.bz2</path>.
265</p> 283</p>
266 284
267<p> 285<p>
268DHCP 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
269client. This is described later in <uri 287client. This is described later in <uri
278this example): 296this example):
279</p> 297</p>
280 298
281<pre caption="Opening /etc/conf.d/net for editing"> 299<pre caption="Opening /etc/conf.d/net for editing">
282# <i>nano -w /etc/conf.d/net</i> 300# <i>nano -w /etc/conf.d/net</i>
283</pre>
284
285<p>
286You will see the following file:
287</p>
288
289<pre caption="Default /etc/conf.d/net">
290# This blank configuration will automatically use DHCP for any net.*
291# scripts in /etc/init.d. To create a more complete configuration,
292# please review /usr/share/doc/openrc-*/net.example.bz2 and save
293# your configuration in /etc/conf.d/net (this file :]!).
294</pre> 301</pre>
295 302
296<p> 303<p>
297To enter your own IP address, netmask and gateway, you need 304To enter your own IP address, netmask and gateway, you need
298to set both <c>config_eth0</c> and <c>routes_eth0</c>: 305to set both <c>config_eth0</c> and <c>routes_eth0</c>:
318<pre caption="Automatically obtaining an IP address for eth0"> 325<pre caption="Automatically obtaining an IP address for eth0">
319config_eth0="dhcp" 326config_eth0="dhcp"
320</pre> 327</pre>
321 328
322<p> 329<p>
323Please 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
324list 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
325you need to set specific DHCP options. 332you need to set specific DHCP options.
326</p> 333</p>
327 334
328<p> 335<p>
513</p> 520</p>
514 521
515</body> 522</body>
516</subsection> 523</subsection>
517 524
518<subsection>
519<title>Configure locales</title>
520<body>
521
522<p>
523You will probably only use one or maybe two locales on your system. You have to
524specify locales you will need in <path>/etc/locale.gen</path>.
525</p>
526
527<pre caption="Opening /etc/locale.gen">
528# <i>nano -w /etc/locale.gen</i>
529</pre>
530
531<p>
532The following locales are an example to get both English (United States) and
533German (Germany) with the accompanying character formats (like UTF-8).
534</p>
535
536<pre caption="Specify your locales">
537en_US ISO-8859-1
538en_US.UTF-8 UTF-8
539de_DE ISO-8859-1
540de_DE@euro ISO-8859-15
541</pre>
542
543<note>
544You can select your desired locales in the list given by running <c>locale -a</c>.
545</note>
546
547<warn>
548We strongly suggest that you should use at least one UTF-8 locale because some
549applications may require it.
550</warn>
551
552<p>
553The next step is to run <c>locale-gen</c>. It will generates all the locales you
554have specified in the <path>/etc/locale.gen</path> file.
555</p>
556
557<pre caption="Running locale-gen">
558# <i>locale-gen</i>
559</pre>
560
561<p>
562Once done, you now have the possibility to set the system-wide locale settings
563in the <path>/etc/env.d/02locale</path> file:
564</p>
565
566<pre caption="Setting the default system locale in /etc/env.d/02locale">
567LANG="de_DE.UTF-8"
568LC_COLLATE="C"
569</pre>
570
571<p>
572And reload your environment:
573</p>
574
575<pre caption="Reload shell environment">
576# env-update &amp;&amp; source /etc/profile
577</pre>
578
579<p>
580We made a full <uri link="https://wiki.gentoo.org/wiki/Localization/HOWTO">Localization
581Guide</uri> to help you through this process. You can also read the detailed
582<uri link="https://wiki.gentoo.org/wiki/UTF-8">UTF-8 article</uri> for very specific
583informations to enable UTF-8 on your system.
584</p>
585
586<p test="not(func:keyval('arch')='PPC64')">
587Please continue with <uri link="?part=1&amp;chap=9">Installing Necessary System
588Tools</uri>.
589</p>
590
591</body>
592</subsection>
593<subsection test="func:keyval('arch')='PPC64'"> 525<subsection test="func:keyval('arch')='PPC64'">
594<title>Configuring the Console</title> 526<title>Configuring the Console</title>
595<body> 527<body>
596 528
597<p> 529<p>

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

  ViewVC Help
Powered by ViewVC 1.1.20