efcc02e618e8134c74dd7cf9af7101796e95288f
[ikiwiki.git] / docs / handbook / handbook-configtuning-core-configuration.mdwn
1 \r
2 \r
3 ## 6.3 Core Configuration \r
4 \r
5 The principal location for system configuration information is within `/etc/rc.conf`. This file contains a wide range of configuration information, principally used at system startup to configure the system. Its name directly implies this; it is configuration information for the `rc*` files.\r
6 \r
7 An administrator should make entries in the `rc.conf` file to override the default settings from `/etc/defaults/rc.conf`. The defaults file should not be copied verbatim to `/etc` - it contains default values, not examples. All system-specific changes should be made in the `rc.conf` file itself.\r
8 \r
9 A number of strategies may be applied in clustered applications to separate site-wide configuration from system-specific configuration in order to keep administration overhead down. The recommended approach is to place site-wide configuration into another file, such as `/etc/rc.conf.site`, and then include this file into `/etc/rc.conf`, which will contain only system-specific information.\r
10 \r
11 As `rc.conf` is read by [sh(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#sh&section1) it is trivial to achieve this. For example:\r
12 \r
13
14 * rc.conf:\r
15       \r
16         hostname="node15.example.com"\r
17         network_interfaces="fxp0 lo0"\r
18         ifconfig_fxp0="inet 10.1.1.1"\r
19   \r
20
21 * rc.conf.site:\r
22       \r
23         defaultrouter="10.1.1.254"\r
24         saver="daemon"\r
25         blanktime="100"\r
26   \r
27 \r
28 The `rc.conf.site` file can then be distributed to every system using `rsync` or a similar program, while the `rc.conf` file remains unique.\r
29 \r
30 Upgrading the system using `make world` will not overwrite the `rc.conf` file, so system configuration information will not be lost.\r
31 \r
32 \r
33 \r
34 CategoryHandbook\r
35 CategoryHandbook-configuration\r