LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-15-2010, 06:51 PM   #1
General
Member
 
Registered: Aug 2005
Distribution: Debian 7
Posts: 526

Rep: Reputation: 31
Installing software to /usr/local or /opt?


I want to install some extra software on my Debian system (TexLive and NLTK) for which I can't find recent versions in the repositories. Both use their script-based installers. Where is the best place to put these on a Debian system? /usr/local/ or /opt or another place? Is that best I use ROOT or does that not matter?
 
Old 06-15-2010, 06:56 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
It's up to you; both work.

http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/
 
Old 06-15-2010, 06:59 PM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
If you want your newly-installed packages not to interfere with the package manager, it'd probably be better to install them in /opt.

If you install it as root, you'll install it system-wide (for all users). When some apps let you install it as a user, it's going to be only for that particular user.
AFAIK, if you want to install it in /usr/local or /opt, you'll have to be root (because of permissions on that directories)
 
Old 06-15-2010, 07:20 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
My -- I install to /opt for all users or to /home/opt for just me...
 
Old 06-15-2010, 10:20 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Some things to consider. If the software you plan to install wants all its files in a single directory you are probably better to use /opt/. Eg

Code:
/opt/PackageThatDoesNotUnderstandFSH-1.3
Then you need to add and entry to your $PATH and perhaps $LD_LIBRARY path etc.

If your package does understand FSH then you may find it better to install in /usr/local/

Eg.

Code:
cd /usr/local/src
mkdir baz
cd baz
wget http://foo.bar/download/baz-1.2.tar.gz
tar xzf baz-1.2.tar.gz
cd baz-1.2
./configure --prefix=/usr/local
make
getroot make install
Where I have assumed that your user has write permission to /usr/local/src and that "getroot" is sudo or su or whatever.

If using /usr/local and you think you may want to upgrade baz-1.2 to baz-1.3 or later you may want to consider using stow which does a kind of simplistic package management within /usr/local (or anywhere else) using symlinks.

Cheers,

Evo2.
 
Old 06-15-2010, 10:34 PM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by sycamorex View Post
If you want your newly-installed packages not to interfere with the package manager, it'd probably be better to install them in /opt.
+1
 
Old 06-15-2010, 10:45 PM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by sycamorex View Post
If you want your newly-installed packages not to interfere with the package manager, it'd probably be better to install them in /opt.
The package manager should not be using /usr/local either. ... but this may be distro specific. Also distros may have a policy on where packges should and should not install files to, but it will depend on the package actually respecting the policy.

Quote:
If you install it as root, you'll install it system-wide (for all users).
AFAIK, if you want to install it in /usr/local or /opt, you'll have to be root (because of permissions on that directories)
Strickly speaking it depends on your setup. For example on all my systems /usr/local is writable by members of the staff group.
Quote:
When some apps let you install it as a user, it's going to be only for that particular user.
That again depends on file permissions not on who does the installation.

Evo2.

Last edited by evo2; 06-16-2010 at 05:56 AM. Reason: quote tag fix
 
Old 06-15-2010, 11:17 PM   #8
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
The way I see it is:
/usr/local is a prefix for compiled apps, it host a usr/,bin/,sbin/,lib/,include/...(all other). /opt have one folder per apps with their own prefix inside. /usr/local is a mess while /opt can stay clean quite easilly. I know it is not officially like that, just like /var vs /srv for data, but as compiled packages tend to prefix themselves to /usr/local, it is quite common to see this kind of setup.
 
0 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to install software /opt? or /usr/local? sfwalter Linux - General 4 08-23-2013 11:22 PM
Installing software to /opt Jeff91 Linux - Software 5 01-02-2010 12:01 PM
/opt or /usr/local jstephens84 Fedora 6 12-17-2005 01:29 PM
/opt or /usr ? eeried Linux - Newbie 1 01-06-2005 04:49 AM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration