Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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:
    Code:
    --prefix=/usr/local/kLPRng --sysconfdir=/usr/local/kLPRng/etc
    Thank you.

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    649
    Then install it into "/usr/".

  3. #3
    Just 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.

  4. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    649
    There are three sub-trees that have programs.
    1. /
    2. /usr
    3. /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.

  5. #5
    Just 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

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    But watch out! Fedora is going to try and *fix* this confusion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •