[Linux] Installing from .tgz

Kwan Lowe linux@flux.org
Mon, 19 Mar 2007 16:52:26 -0400 (EDT)


> 1)Should I 1st create a directory in /usr/local titles
> "myAPP" then do my extraction and compile in /tmp then
> point "PREFIX" to usr/local/myAPP for the binaries?
>
> 2)Untar and compile myAPP.tgz in /tmp and let makefile
> create the directories in /usr/local (using this
> directory is set as the default) for the binaries?
>
> 3)Create a folder in /usr/local called "myAPP" and do
> all work (untar & compile(makefile))within the
> directory that the actual binaries will reside?


You shouldn't need to create the directory beforehand as this is almost always done
as part of the installation scripts. Building in /tmp is fine, but I usually do it
in my home directory.  Don't do 3) as the build dir should not be the install dir.

A few notes:

Most tar-based installs (most, not all) use the "./configure;make;make install"
process. If you want it to install to a particular directory you can often do:
   ./configure --prefix=/usr/local/

Some tar installers are just the tar'red binary dirs (e.g., Java).  I just extract
these in /usr/local and sometimes create a symlink from the app dir to
/usr/local/bin.

If you're using an RPM based distro, check the tarball to see if a SPEC file is
there. If so, you can rebuild the package the SPEC file and install/manage it with
your regular package tools. If you don't go this route you should keep the original
tarball around in case you need to do a "make uninstall" at some later date. Though
the install files *should* be confined to their own files, this is not always the
case.


>
>
> ____________________________________________________________________________________
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives.
> http://tools.search.yahoo.com/toolbar/features/mail/
> _______________________________________________
> Linux mailing list
> Linux@flux.org
> http://www.flux.org/mailman/listinfo/linux
>


-- 
* The Digital Hermit   http://www.digitalhermit.com
* Unix and Linux Solutions   kwan@digitalhermit.com