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!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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

If I've raised more questions in your mind, just ask :)
1. to list contents of the compressed tar ball assumed at your home dir.
`tar tvfz ~/blah1.tar.gz`

2. to unzip and untar the tar ball to a temp location
`cd /tmp && mkdir darnTemp && cd darnTemp`
`tar xvzf ~/blah1.tar.gz`

3. to read instructions in README or INSTALL or alike in the untarred results.
'less README'
or 'less INSTALL'

4. follow instructions from either of the above to do the installation
most .tar.gz packages have those to instruct you how to install them: how to prepare dir, execute command, post-install config, etc.

0. if you tell folks what packages you are trying to install, people can give you more specific answer.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
harnalAuthor Commented:
Thanks for all of the help/comments it really helps!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.