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

📄 doc070.htm

📁 Reh Hat user manual. really goooood
💻 HTM
字号:
<html><body><a href="doc071.html"><img src=../icons/next.gif alt="Next"></a><a href="doc000.html"><img src=../icons/up.gif alt="Up"></a><a href="doc069.html"><img src=../icons/previous.gif alt="Previous"></a><a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a><a href="doc123.html"><img src=../icons/index.gif alt="Index"></a><hr><h2><a name="s10.1">10.1 Filesystem Structure</a></h2><title>Filesystem Structure</title>Red Hat Software is committed to the Linux File System Standard, acollaborative document that defines the names and locations of manyfiles and directories.  We will continue to track thestandard to keep Red Hat compliant.<p>While compliance with the standardmeans many things, the two most important are compatibility with othercompliant systems, and the ability to mount the <tt>/usr</tt> partition read-only.The <tt>/usr</tt> partition contains common executables and is not meantto be changed by users.Because of the, the <tt>/usr</tt> partition can be mounted from the CD-ROMor from another machine via read-only NFS.  The current Linux FilesystemStandard (FSSTND) documentis the authoritative reference to any FSSTND compliant filesystem, butthe standard leaves many areas undefined or extensible.  In this sectionwe provide an overview of the standard and a description of the partsof the filesystem not covered by the standard.<p>The complete standard can be viewed at:<p><blockquote><tt><a href="http://www.pathname.com/fhs/">http://www.pathname.com/fhs/</a></tt></blockquote><p><h3><a name="s10.1.1">10.1.1 Overview of the FSSTND</a></h3><title>Overview of the FSSTND</title><p>The directories and files noted here are a small subset of thosespecified by the FSSTND document.  Check thelatest FSSTND document for the most up to date and completeinformation.<p><h4><a name="s10.1.1.1">10.1.1.1 The <tt>/etc</tt> Directory</a></h4><title>The <tt>/etc</tt> Directory</title><p>The <tt>/etc</tt> directory is reserved for configuration files that are localto your machine.  No binaries are to put in <tt>/etc</tt>. Binaries that werein the past put in <tt>/etc</tt> should now go into <tt>/sbin</tt>or possibly <tt>/bin</tt>.<p>The <tt>X11</tt> and <tt>skel</tt> directories should be subdirectories of<tt>/etc</tt>:<p><pre>/etc  |- X11  +- skel</pre><p>The <tt>X11</tt> directory is for X11 configuration files such as<tt>XF86Config</tt>.  The<tt>skel</tt> directory is for  ``skeleton'' user files, which are files usedto populate a home directory when a user is first created.<p><h4><a name="s10.1.1.2">10.1.1.2 The <tt>/lib</tt> Directory</a></h4><title>The <tt>/lib</tt> Directory</title><p>The <tt>/lib</tt> directory should contain only those libraries that are need toexecute the binaries in <tt>/bin</tt> and <tt>/sbin</tt>.<p><h4><a name="s10.1.1.3">10.1.1.3 The <tt>/sbin</tt> Directory</a></h4><title>The <tt>/sbin</tt> Directory</title><p>The <tt>/sbin</tt> directory is for executables used only by the root user, andonly those executables needed to boot and mount <tt>/usr</tt> and performsystem recovery operations.  The FSSTND says:<p><blockquote>``/sbin typically contains files essential for booting the systemin addition to the binaries in /bin.  Anything executed after /usr is knownto be mounted (when there are no problems) should be placed in/usr/sbin.  Local-only system administration binaries should beplaced into /usr/local/sbin.''</blockquote><p>At a minimum, the following programs should be in <tt>/sbin</tt>:<a name="i230"> <a name="i231"> <a name="i232"><blockquote><tt>clock, getty, init, update, mkswap, swapon, swapoff,halt, reboot, shutdown, fdisk, fsck.*, mkfs.*, lilo, arp, ifconfig, route</tt></blockquote><a name="i233"><a name="i234"><a name="i235"><h4><a name="s10.1.1.4">10.1.1.4 The <tt>/usr</tt> Directory</a></h4><title>The <tt>/usr</tt> Directory</title><p>The <tt>/usr</tt> directory is for files that are shareable across a whole site.The <tt>/usr</tt> directory usually has its own partition, and it should bemountable read only.  The following directories should besubdirectories of <tt>/usr</tt>:<p><pre>/usr  |- X11R6  |- bin  |- dict  |- doc  |- etc  |- games  |- include  |- info  |- lib  |- local  |- man  |- sbin  |- share  +- src</pre><p>The <tt>X11R6</tt> directory is for the X Window System (XFree86 on Red Hat Linux),bin is for executables, doc is for random non-man-page documentation,etc is for site-wide configuration files, include is for C header files,info is for GNU info files, lib is for libraries, man is for manpages, sbin is for system administration binaries (those that do notbelong in /sbin), and src is for source code.<p><h4><a name="s10.1.1.5">10.1.1.5 The <tt>/usr/local</tt> Directory</a></h4><title>The <tt>/usr/local</tt> Directory</title><p>The FSSTND says:<p><blockquote>``The /usr/local hierarchy is for use by the system administrator wheninstalling software locally.  It needs to be safe from being overwrittenwhen the system software is updated.  It may be used for programs and datathat are shareable amongst a group of machines, but not found in /usr.''</blockquote><p>The <tt>/usr/local</tt> directory is similar in structure to the <tt>/usr</tt>directory.  It has thefollowing subdirectories, which are similar in purpose to those in the<tt>/usr</tt> directory:<p><pre>/usr/local      |- bin      |- doc      |- etc      |- games      |- include      |- info      |- lib      |- man      |- sbin      +- src</pre><p><h4><a name="s10.1.1.6">10.1.1.6 The <tt>/var</tt> directory</a></h4><title>The <tt>/var</tt> directory</title><p>Since the FSSTND requires that you be able to mount <tt>/usr</tt> read-only,any programsthat write log files or need spool or lock directories probably shouldwrite them to the <tt>/var</tt> directory.  The FSSTND says <tt>/var</tt> is for<p><blockquote>``... variable data files.  This includes spool directories and files,administrative and logging data,and transient and temporary files.''</blockquote><p>The following directories should be subdirectories of<tt>/var</tt>:<p><pre>/var  |- log  |- catman  |- lib  |- local  |- named  |- nis  |- preserve  |- run  |- lock  |- tmp  +- spool      |- at      |- cron      |- lpd      |- mail      |- mqueue      |- rwho      |- smail      |- uucp      +- news</pre><p>System log files such as <tt>wtmp</tt> and <tt>lastlog</tt> go in <tt>/var/log</tt>.The <tt>/var/lib</tt> directory alsocontains the RPM system databases.Formatted man pages go in <tt>/var/catman</tt>, and lock files go in<tt>/var/lock</tt>.The <tt>/var/spool</tt> directory has subdirectories for various systems thatneed to store data files.<p><h3><a name="s10.1.2">10.1.2 <tt>/usr/local</tt> in Red Hat Linux</a></h3><title><tt>/usr/local</tt> in Red Hat Linux</title><p>In Red Hat Linux, the intended use for <tt>/usr/local</tt> is slightlydifferent from that specified by the FSSTND.  The FSSTND saysthat <tt>/usr/local</tt> should be where your store software that is toremain safe from system software upgrades.  Since system upgradesfrom Red Hat Software are done safely with the RPM system and Glint,you don't need to protect files by putting them in<tt>/usr/local</tt>.  Instead, we recommend you use <tt>/usr/local</tt> forsoftware that is local to your machine.<p>For instance, let's sayyou have mounted <tt>/usr</tt> via read-only NFS from <i>beavis</i>.  If there is a packageor program you would like to install, but you are not allowed to writeto <i>beavis</i>, you should install it under<tt>/usr/local</tt>.  Later perhaps, if you've managed to convince the systemadministrator of <i>beavis</i> to install the program on <tt>/usr</tt>, youcan uninstall it from <tt>/usr/local</tt>.<p><p><hr><a href="doc071.html"><img src=../icons/next.gif alt="Next"></a><a href="doc000.html"><img src=../icons/up.gif alt="Up"></a><a href="doc069.html"><img src=../icons/previous.gif alt="Previous"></a><a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a><a href="doc123.html"><img src=../icons/index.gif alt="Index"></a><hr></body></html>

⌨️ 快捷键说明

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