/usr/local partition
i've noticed most of the programs i install go under /usr/local. i've been paritioning my hd to have a partition for /usr.
seeing how most of my apps i build (like apache) go under /usr/local, should i adjust the way i do partitions in the future and create the partition for /usr/local instead of /usr. Would that make OS upgrades easier and give me many other good things? |
Do it like this
Code:
./configure --prefix=/usr You also might want to take a peek at this if you haven't before. |
What distrobution are you using? Building from source is generally a good learning experience but if your distro has a capable package manager then you're much better off using it.
|
/usr/local is an unfortunate FHS design mistake as it clashes with Unix standards.
Under Unix, /usr is designed to hold files belonging to the O/S and are shareable between machines, FHS advertise that too, but /usr/local is neither. I would suggest to use /opt/local instead (./configure --prefix=/opt/local), or have a different filesystem mounted to /usr/local if you still want the default installation PATH most Open Source freewares use. |
Here's what I do. /opt is a seperate mountpoint, /usr/local symlinks to /opt.
Code:
$ pwd |
Quote:
Seeing how the main Linux distributions seem happy to thumb their noses at the FHS, anyone got a good suggestion for an alternative to using /opt, /var/opt, and /etc/opt for added software? (/usr/local/opt, /usr/local/var, and /usr/local/etc? Yuk!) As a side question: What distribution does the best job of adhering to the FHS? TIA... -- rt |
IMHO, neither are wrong and correct. You are the user where do you think they should go. After you setup your standard way and document it. However, keep in mind where .pc files are located when compiling libraries.
You can try Gentoo and forget this problem ever occurring. Every program is compiled. Gentoo 2006.1 installation comes with gcc version 4.1 that might break some programs. Though I have not run into a snag when doing a test installation in VMware. |
Quote:
My current standard is/was to keep the source trees under /usr/local/src and when running "configure" supply "/opt" as the target. SUSE's rather ruined that in that I can no longer use /opt in accordance with the FHS the way I used to. Quote:
I suspect I'll have to start using using something like /opt/app, /var/opt/app, and /etc/opt/app as mount points. Hopefully that'll keep my binaries out of the vendor's way. For a while. Later... -- rt |
Perhaps I misunderstood, but I think he just meant to ask if we thought it was a good idea to give /usr/local a separate hard drive partition, making /usr/local another mount point. I think that how you partition your hard drive is up to you. You look at the amount of space taken by different directories and do what's right for you. If you think you could benefit from that, and it's worth the trouble, then go ahead.
|
All OP asked was how to do this....
Quote:
CAUTION: Whenever you mount to an existing file system, you will hide files already stored under the mount point. In this case, something a bit different will happen. If you take the partition holding all of /usr and then mount it to /usr/local, you won't hide anything, but everything that was in /usr will now be in /usr/local and the sytem will get lost trying to find things. So--after changing the mounting, you will need to move all the directories EXCEPT the new /usr/local |
All times are GMT -5. The time now is 09:28 PM. |