Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

/opt vs. /usr/local

  • 25-06-2011 11:00AM
    #1
    Registered Users, Registered Users 2 Posts: 614 ✭✭✭


    Hi All,
    So I want to download and play with nodejs. Where are you supposed to install packages like this. I'd have the same question for other packages like ruby or grails etc.

    I would just drop them in my home directory but I get the sense from the interwebs that this is not the done thing.

    Any help greatly appreciated.


Comments

  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    From man hier:

    /usr/local - This is where programs which are local to the site typically go.
    /opt - This directory should contain add-on packages that contain static files.


  • Moderators, Technology & Internet Moderators Posts: 1,338 Mod ✭✭✭✭croo


    I don't think it matters all that much - I would think it's more a case of being consistent. But if you want to go by the book...
    http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard


  • Registered Users, Registered Users 2 Posts: 297 ✭✭stesh


    Use /opt. Often your distro's package manager will install things in /usr, which can make it difficult to distinguish between things you've installed from source and things you've installed from package. Also, installing things from source into /opt usually means you can confidently remove the entire installation in the future by just rm -r'ing the /opt directory it resides in.


  • Registered Users, Registered Users 2 Posts: 634 ✭✭✭loldog


    I have a separate partition for /home so I install stuff like games in /home which means when I upgrade I don't have to reinstall everything all over again.

    .


  • Closed Accounts Posts: 5,082 ✭✭✭Pygmalion


    loldog wrote: »
    I have a separate partition for /home so I install stuff like games in /home which means when I upgrade I don't have to reinstall everything all over again.

    .

    Surely that's a lot of hassle if the applications are dynamically linked, since each OS upgrade could easily break binary compatibility and require a rebuild?


  • Advertisement
  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    Pygmalion wrote: »
    Surely that's a lot of hassle if the applications are dynamically linked, since each OS upgrade could easily break binary compatibility and require a rebuild?

    If you can't apt it, you probably don't need it. I follow this rule to avoid the above. Works for me:cool:


  • Closed Accounts Posts: 3,038 ✭✭✭jackiebaron


    I normally put everything in /usr/local/ but if the installation automatically untars and put in /opt then I just leave it there. Because I piss around with HPUX and Linux a lot I just tend to let them go where the were designated unless I REALLY have to make a choice....and then I just go play X-tank!


Advertisement