|
Personal tools |
|
|
/User Guide/Filesystem Organization
From Annvix(Redirected from Documentation/Filesystem Organization)
Filesystem Organization The Annvix filesystem is largely similar to other UNIX-based and Linux systems you may be familiar with. This topic describes the function of each major filesystem or directory on the system and how they are organized.
/The root directory (/) is the top-level directory of any Linux filesystem. Everything falls below root. Don't confused the root directory with the root user's directory. The root user has his own home directory, much like regular user accounts, in /root. Think of / as the tree, and each directory and sub-directory below it are branches and leaves. / is the trunk of the tree, the single most important directory below which everything else lives. /binThe /bin directory is where essential binary files (programs) live. The /bin directory should be on the same partition as the / filesystem because most of the tools in /bin are required to boot the system and will be needed before other filesystems may be mounted during boot. The /bin directory is largely static and should never change except when packages are upgraded. This directory should not be shared to other systems (via samba, NFS, etc.). /bootThe /boot directory is where kernels, ramdisks (initrd files), and grub's configuration file lives. This directory can be on the / root filesystem, but it is recommended to make this directory it's own partition (typically the first partition on the first hard drive installed on the system). /devThe /dev directory is a special directory that should not be changed by hand. This directory contains system device files that allow you to interact with physical hardware via a filename. Files that it contains include /dev/hda (access to the master IDE drive on the primary IDE controller), /dev/null, and so forth. /etcThe /etc directory contains configuration files related to the system and the applications installed. More often than not, to configure something about a particular application of service, the configuration file(s) will be found here. This directory must also be on the / root filesystem. /homeThe /home directory is typically where all user accounts will have their home directory, such as /home/chum. It is recommended to make /home it's own partition. /libThe /lib directory is where shared libraries are installed that are often-used and/or used by programs in /bin. This directory should be on the / root filesystem. It also contains the kernel modules; such as /lib/modules/2.4.32-5205avx. /mediaThe /media directory is used as a top-level mount point for removable media. For instance, you should mount a USB disk here as, say, /media/usbdisk, or a CD-ROM as /media/cdrom, a floppy disk as /media/floppy, and so forth. By default, Annvix will place entries in /etc/fstab to mount the CD-ROM and/or floppy devices here. /rootThe root user's home directory. /sbinThe /sbin directory contains administration files for the system and must be a part of the / root filesystem. These are files that typically are executed only by root and not regular users. /srvThe Annvix operating system imposes almost nothing on users, including the location of where to place web files or files served by FTP. It is our opinion that using the /srv directory for this type of data is optimal. For instance, web data would be stored in /srv/www (rather than /var/www, FTP data would be stored in /srv/ftp (rather than /var/ftp, and mail storage (such as used by virtual mail systems) would be stored in /srv/mail. This can further be broken down by domain to keep things clean, consistent, and logical. For instance, on a system serving up "annvix.org" you might have:
The first directory would be the webroot for the annvix.org website. The second would be the root directory of FTP files served by annvix.org, and the last would be the directory for storing the virtual mail for chum@annvix.org. This is, of course, purely recommendation and you can place this data anywhere you like. /tmpTemporary files for any user are stored in /tmp. This directory is special in that, while it is writable by any user, no user can overwrite or delete another user's files. /usrThe /usr directory is a top-level directory for many other directories with different functions. /usr/binThe /usr/bin directory contains the bulk of the system's binary files. All files that aren't essential to the startup of the system, or are administrative in nature, belong here. The major exception is binaries installed as part of a ports package or that you compile on your own. /usr/libLike /lib, the /usr/lib directory contains library files, but these are library files not required by applications involved in bringing the system up to a useable state. /usr/sbinThe /usr/sbin directory contains system administration binaries that are not needed to boot the system. /usr/shareThis directory contains read-only architecture independent data that is required by applications in /usr. Zone information files, locales, documentation (/usr/share/doc), manpages, and more are located here. /usr/localThe /usr/local directory mimics /usr in that it contains similar directories, such as /usr/local/bin, /usr/local/sbin, /usr/local/etc, /usr/local/lib, etc. These directories serve the same function as their top-level counterparts with the exception that applications stored here are those either a) installed by ports packages or b) installed by compiling source on your own. /usr/local/portsAn exceptional directory here is /usr/local/ports which contains all the ports-related information. The /usr/local/ports/ports directory contains the build information for ports packages, including patches, source files, and spec files. The /usr/local/ports/packages directory contains the actual builder-built ports RPM packages that can be installed via urpmi. See the Ports documentation for more information. /varThe /var directory is used to store variable data, such as database files, process accounting files, logs, mail spools, and so forth. /var/log/systemThe /var/log/system directory is used to store all the system's syslog files. As of 1.2-RELEASE, Annvix uses socklog for system logging by default, rather than syslogd. As a result, instead of looking for /var/log/messages you would instead look for /var/log/system/messages/current. Read the socklog documentation for more information on how to configure and use socklog. /var/libDatabase files live here, be they MySQL or PostgreSQL database files, the system's RPM database, or the urpmi database files. This is a good directory to backup. |
![]() |
|
|
| |||