⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configtuning-core-configuration.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Core Configuration</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Configuration and Tuning" href="config-tuning.html" /><link rel="PREVIOUS" title="Initial Configuration" href="configtuning-initial.html" /><link rel="NEXT" title="Application Configuration" href="configtuning-appconfig.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="configtuning-initial.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 11 Configuration and Tuning</td><td width="10%" align="right" valign="bottom"><a href="configtuning-appconfig.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="CONFIGTUNING-CORE-CONFIGURATION"name="CONFIGTUNING-CORE-CONFIGURATION">11.3 Core Configuration</a></h1><p>The principal location for system configuration information is within <ttclass="FILENAME">/etc/rc.conf</tt>. This file contains a wide range of configurationinformation, principally used at system startup to configure the system. Its namedirectly implies this; it is configuration information for the <ttclass="FILENAME">rc*</tt> files.</p><p>An administrator should make entries in the <tt class="FILENAME">rc.conf</tt> file tooverride the default settings from <tt class="FILENAME">/etc/defaults/rc.conf</tt>. Thedefaults file should not be copied verbatim to <tt class="FILENAME">/etc</tt> - itcontains default values, not examples. All system-specific changes should be made in the<tt class="FILENAME">rc.conf</tt> file itself.</p><p>A number of strategies may be applied in clustered applications to separate site-wideconfiguration from system-specific configuration in order to keep administration overheaddown. The recommended approach is to place site-wide configuration into another file,such as <tt class="FILENAME">/etc/rc.conf.site</tt>, and then include this file into <ttclass="FILENAME">/etc/rc.conf</tt>, which will contain only system-specificinformation.</p><p>As <tt class="FILENAME">rc.conf</tt> is read by <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=sh&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">sh</span>(1)</span></a> it is trivial toachieve this. For example:</p><ul><li><p>rc.conf:</p><pre class="PROGRAMLISTING">   . rc.conf.site    hostname="node15.example.com"    network_interfaces="fxp0 lo0"    ifconfig_fxp0="inet 10.1.1.1"</pre></li><li><p>rc.conf.site:</p><pre class="PROGRAMLISTING">   defaultrouter="10.1.1.254"    saver="daemon"    blanktime="100"</pre></li></ul><p>The <tt class="FILENAME">rc.conf.site</tt> file can then be distributed to everysystem using <tt class="COMMAND">rsync</tt> or a similar program, while the <ttclass="FILENAME">rc.conf</tt> file remains unique.</p><p>Upgrading the system using <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=sysinstall&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">sysinstall</span>(8)</span></a> or <ttclass="COMMAND">make world</tt> will not overwrite the <tt class="FILENAME">rc.conf</tt>file, so system configuration information will not be lost.</p></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="configtuning-initial.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="configtuning-appconfig.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Initial Configuration</td><td width="34%" align="center" valign="top"><a href="config-tuning.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Application Configuration</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting &#60;<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>&#62;.<br />For questions about this documentation, e-mail &#60;<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>&#62;.</small></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -