Results 1 to 6 of 6
Hello,
I am currently trying to create a Debian package for a source tarball I've been given, and it suggests to be installed in /usr/local/ but if I create a ...
- 11-18-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 8
Where to install program files?
Hello,
I am currently trying to create a Debian package for a source tarball I've been given, and it suggests to be installed in /usr/local/ but if I create a package for it, it shouldn't install there because that should be reserved for locally installed programs.
the suggested directories are as follows:
Thank you.Code:--prefix=/usr/local/kLPRng --sysconfdir=/usr/local/kLPRng/etc
- 11-20-2011 #2Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 260
Then install it into "/usr/".
- 11-20-2011 #3Just Joined!
- Join Date
- Oct 2011
- Posts
- 8
that doesn't sound quite right though. the only program folders I see in there is the one for brlcad.
- 11-21-2011 #4Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 260
There are three sub-trees that have programs.
- /
- /usr
- /usr/local
These all contain subdirectories of
- bin
- sbin
- lib
- include
- share
- Note in 64-bit installs then "lib" is a symbolic link and there are lib64 and lib32 present
The "/" contains stuff that is needed for booting up and shutting down. while "/usr/" contains other applications. And as you said there is "/usr/local" for stuff installed that is specific to the machine.
Why three locations. Back in 1969 when Unix was a baby, the drives were much smaller and this was put together in a way that would guarantee that the items needed to boot and shut down the system were fond on the root filesystem. When drives became larger, often "/usr" is mounted via the network in "real-world" environments (also in those environments often "/home" and "usr/local" are also network mounted.) Latter on SUN MICRO SYSTEMS added "/opt" to the list and it is layed out as "/opt/appliacation/{bin,include,lib,...}".
Even on my notebooks, where is more-or-less me (with a personal and work accounts) I still have "/usr", "/usr/local", "/home", and "/opt" in there own partitions (in my case most are in "logical volumes" as I use LVM). This allows easy migration from one distro to the next over time. I have scripts in "/usr/local/bin" dating back to 1987. I use LVM as it allows resizing of the space without the hassles of the partition table and migrating from a 500GB to a 1TB drive is a lot less painless as I can connect the new drive and add it to the LVM and then LVM that I would like to take the old drive out of service. LVM then moves stuff to the remain drive(s) in that will remain. Some time later, all is moved and I can take the old drive out of the LVM and then the machine and insert my new drive. Yes, I have to partition the new drive, install grub on it, and copy the "/boot" partition to it as well.
- 11-21-2011 #5Just Joined!
- Join Date
- Oct 2011
- Posts
- 8
Wow, thanks for history lesson. I didn't know it worked like that. I guess I'll install it in the /usr directory after all. Thank you very much for your help.
-Derek
- 11-22-2011 #6Linux Guru
- Join Date
- May 2011
- Posts
- 1,788
But watch out! Fedora is going to try and *fix* this confusion.


Reply With Quote
