Click to See Complete Forum and Search --> : Structuring the file system.


rch-tech
10-04-2001, 09:55 AM
Hey guys, here's a question for ya...
Is there a right way and a wrong way for laying out your directory structure. What I mean is. When you install apps, in order to keeps stuff straight, where should one install them? /opt, /usr/local, etc etc...(no not /etc *wink*)
Or is it better just to install your apps to your home dir?
I realize most things have their defaults but, say I download one editor and then later find another, I want to remove the one but make sure I get all the prog specific libs etc that come with it.
Can anyone out there make sense of what I am trying to accomplish??

Strike
10-04-2001, 10:04 AM
Check out the hier(7) man page: man hier

Choozo
10-04-2001, 10:11 AM
The Filesystem Hierachy Standard (http://www.pathname.com/fhs/) website is probably the best place to start looking?

Cheers :)

demian
10-04-2001, 10:19 AM
The canonical source of info on this type of question would be the Filesystem HHierarchy Standard which is available in the current version here (http://www.debian.org/doc/packaging-manuals/fhs/) for instance.

This document, though interesting, will be a lot of reading with few direct answers to your question. Concerning the use of /opt, for instance, the document states: "/opt is reserved for the installation of add-on application software packages." Where it is up to you to decide whether the software you want to install is an add-on application or not.

Typically most programs go to /usr/local. This makes a lot of sense if you box is part of a network where possibly some filesystems are mounted via nfs and stuff. If this is not the case it would be equally logical to install under /usr.

Generally it depends on how your system is used. If you are the only person to use/maintain your installation do whatever makes sense to you.

albertfuller
10-04-2001, 02:08 PM
Originally posted by rch-tech:
<STRONG>...Is there a right way and a wrong way for laying out your directory structure. What I mean is. When you install apps, in order to keeps stuff straight, where should one install them? /opt, /usr/local....... Or is it better just to install your apps to your home dir?</STRONG>
It is generally recommended that your apps go in /usr/local in order to keep it seperate from the distro; this makes it easy to upgrade, or change distro, or even reinstall a distro.
I use to use several partitions (/var / /tmp and others) and with RH 5x I did see speed improvements in comparison to the / for everything.
I have since moved to SuSE, now at 7.2, and I use their recommendations with some modification: SuSE's default is /, /boot, and swap.
In order to make use of reiserfs (I found it a big deal to move partitions to reiserfs), I use
/............reiserfs
/boot........ext2
/home........reiserfs
/usr/local...reiserfs
swap
With a seperate boot required for ext2, everything else is reiserfs; and I find that, keeping /home and /usr/local in seperate partitions, all my stuff is seperate from the distro and I have the option to put in other distros and tie it back to my stuff conviently
All in all I found a layout that works for me and gives me flexability for when I feel curious

[ 04 October 2001: Message edited by: albertfuller ]