Re: Download to where to install?



On Sat, 19 Aug 2006, in the Usenet newsgroup comp.os.linux.misc, in article
<4kngocFcqdb2U1@xxxxxxxxxxxxxx>, Frel wrote:

Hi, it's me again, another question, when downloading tarballed GNU stuff,
where's the best place to put them so I can tar them out and then compile
them?

First question - why are you downloading tarballs? Does your distribution
not include the package/application/program? Can you not find a pre-compiled
version at a reliable/well-known repository?

Second question - who are the resulting binary applications for? One user
(you) on the system, or everyone?

Background: It is _preferrable_ to use binaries supplied by your
distributor, as these have undergone scrutiny and are maintained by the
distributor, AND use the package manager. If you can't find the package as
part of your distribution, a pre-compiled package from a well-known source
is a good second choice. Again, it's using the package manager, which
simplifies software maintenance. Huh??? Yes, remember that _you_ are
responsible for software maintenance (keeping things up to date) for that
stuff that is not part of your distribution.

Who is it for, refers to where is the executable going to end up. See the
Filesystem Hierarchy Standard (FHS) at http://www.pathname.com/fhs/ and the
explanatory guide 'Linux Filesystem Hierarchy' from the Linux Documentation
Project at http://tldp.org/guides.html. If the binary is for everyone on
the system, it should end up in /usr/local/bin (or possibly /usr/local/sbin/
for system stuff). If it's for one user (you) only, then maybe the ~/bin/
directory in your home directory is more appropriate.

So far they're just going to to /home/<myname>/Desktop.

As others have posted - it's totally up to you. I personally would rather
use /home/<myname>/src/* for those applications for me alone, and
/usr/local/src/* for those applications that others will be using. See the
section titled "/usr/local : Local hierarchy" in the FHS for details.

But I'd like to do everything a little more organised than that, now that I
have su access. (In my student days as a UNIX user I only dreamed of ever
having su access, now I'm the king of the mountain, well the ant hill of my
PC at least!)

Yeah, I know. When I started using UNIX, it was six months before I even knew
who this 'root' was, and over a year _later_ before I got something like
sudo capability (I could run 'shutdown', 'mount' and knew enough to be able
to change the IP address when moving a computer from one subnet to another).
It was another six months before I got 'root', With Linux (and *BSD), that's
the first account you get.

For building _system_ software that anyone may be using, an auditor at my
company demanded we use a powerless account in case something went wrong.
Thus, /usr/local/src/ is owned by builder:builder (user and group), and
that's the home directory of that user. Untar in that directory, and
cd into the resulting directory. READ EVERYTHING (audit - and find out
what to do next). Then configure and build (up to 'make') as user 'builder'.
Then try to _run_ the command[s] as this user to see that there are no
surprises. Only when satisfied that things are OK do you become root and
run 'make install'. The entire reason for this user is that if the
software does something unexpected/nasty, it's being run as/by a user with
_no_ write permissions outside of the home directory (/usr/local/src/) and
/tmp/ and /var/tmp/. Thus, it can only trash that very limited part of
the file system.

Old guy
.