Link to home
Start Free TrialLog in
Avatar of harnal
harnal

asked on

Installing packages

I have a bunch of *.gz packages and have no idea how to install em'.  Please help this Linux Newborn to take his first step...Thanks in advance!
Avatar of bughead1
bughead1

Try, as root:

gunzip packagename.gz

then they will probably be tar files after you unzipped them, so:

tar -xvf packagename.tar

That ought to work. You might want to copy them to the appropriate partition/directory first, though.
Bughead gave the correct advice, ofcourse if the file looks like a *tar.gz you could do a "tar xvfz *tar.gz", but it may be a good idea to look at the contents first so do a "tar tvfz *tar.gz."  I would suspect these are source code archives, so unpack them using the "tar xvfz" in a directory you will remember about.  

Then you will have to read the INSTALL file which gives you the directions you need to know about to make and install the program.  If the INSTALL program gives you an option to install in the /usr/local directories take the opportunity to do this, since you have no way of knowing (unless you check carefully) whether or not you are writing over other files in the normal /usr/* hierarchy.  This is one of the reasons packages are a better route to go, because all the guess work has been done for you.  By packages I mean *deb, *tgz, *slp, or *rpm packages.

If these are binary archives (program is already compiled) there may not be INSTALL information, so remember what I just said, be carefull that you don't overwrite important system files when you unpack the archive.  You could put the archive in "/" and to a "tar xvfz *tar.gz", or
you could do the "tar xvfz *tar.gz" in a special directory of your own choice, and then copy the binaries and or libraries to the appropriate places.  Incidently you can do this with the source archives, to, just don't do a "make install."

The main program parts could be put in /usr/bin or /usr/local/bin, if you put it in local make sure local is in your path.  If you are in the bash shell, type "echo $PATH", if you aren't in a bash shell, type "bash" and then "echo $PATH" and you will see your path!  Other parts, may have to go in /usr/lib or /usr/local/lib.  But, there are even more directories than this.

If you want to know more about the Linux filesystem hierarchy  you should read the FSSTND FAQ.  This is available via anonymous FTP at tsx-11.mit.edu
in /pub/linux/docs/linux-standards/fsstnd/FSSTND-FAQ.

Doing the *tar.gz thing can be a pretty fun learning experience, but these may just be compressed "*gz", if this is the case you will get just one file after you do a
"gzip -d *gz" (for each *gz).  Again, put this file in the appropriate directory, ofcourse maybe it's just a text file, but if it is an executable or interpreted program put it in one of the bin paths.

You may run into a problem all the above cases.  The program may not run  because it depends on other programs.  Maybe it's a Perl program, and so you need to install Perl in order to get it to run.  Maybe it is a compiled C program which depends on a shared library you will have to hunt down. But, this is part of the learning experience.  If you find it too involved I recommend going the package route.

I wrote a package manager called "swim", you may want to check out this software at http://the.netpedia.net/the-software.html.

If I've raised more questions in your mind, just ask :)
ASKER CERTIFIED SOLUTION
Avatar of jyu_88
jyu_88

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of harnal

ASKER

Thanks for all of the help/comments it really helps!