Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Where to put all the gear


begin Nicholas Reese quotation:

> I have a question that may be simple - and I haven't found a straight
> answer for it yet. Where is the best place to unpack and set
> everything up.

Your question is unfortunately a little fuzzy, which makes it difficult
to answer.  It's unclear what "unpack and set everything up" means.
Perhaps you could give a few "for instances".

> First up - I am usually logged onto my machines as root....

Mistake.  You'll realise, sooner or later, that you should keep the
amount of time logged in as the root user to a minimum.  Each command
you issue as the root user has the potential for vast disaster.  You 
really don't want to be swinging lightning bolts around, all the time.
Trust me.  Or have the experience of accidentally recursively deleting, 
chowning, chmoding, or chgrping key parts of your system directory tree 
by accident -- and learn the hard way.

> Second - from what I read some say unpack everything in /usr/local/ ,
> others say unpack in /usr/local/src , and when I run an RPM it unpacks
> in /usr/share - I am a RedHat distro user by habit - QUESTION - where
> is the best place then?

With some exceptions, you don't specify where an RPM is to be unpacked.
The packager has specified, _inside_ the RPM's metadata, where all the 
various bits and pieces inside the RPM are to be installed.  (And, by
the way, I'm slightly confused by your bit about "running an RPM", since
RPMs are not executable files.)  

/usr/local/src is a cubbyhole where you might store the master copies
of source-code tarballs.  Some people also, through an extension of that
logic somewhat more broadly, chuck copies of other types of master
files, such as the original copies of binary RPMs that you downloaded
and installed.

/usr/local as a whole is a hierarchy into which you may place "locally
installed" software -- software not part of your initial system load.
E.g., the libraries for add-on software might land in /usr/local/lib,
the system binaries in /usr/local/sbin, the regular-user binaries
in /usr/local/bin, etc.

When I compile a program from a source-code tarball, I leave the tarball
itself in /usr/local/src.  I do the actual compile from some work area,
somewhere (it doesn't matter where), from which I later delete those
files.  In the process of compilation, I instruct the compiler toolchain
that it's to install the newly-compiled files to directories branching
off /usr/local, i.e., /usr/local/bin, /usr/local/lib, /usr/local/man,
etc.

I hope this helps.

-- 
Cheers,              "Not using Microsoft products is like being a non-smoker 
Rick Moen           40 or 50 years ago:  You can choose not to smoke, yourself,
rick@xxxxxxxxxxxxxx  but it's hard to avoid second-hand smoke."  -- M. Tiemann