First you untar the file. I suggest you first examine the tar file by doing something like a:
tar tvf filename.tar or
tar tvzf filename.tar.gz or
tar tvzf filename.tgz whatever works for you.
This allows you to view how the file will be untarred, just to be safe. Normally, the distribution will untar into it's own directory, but sometimes (not often) it just dumps 'not so nicely'.
After you find out that it untars nicely (or you create a directory to untar) you then do a
tar xvf filename.tar or
tar xvzf filename.tar.gz or
tar xvzf filename.tgz whatever works for you
Then, you
cd into the directory and then follow Optimus's idea to read the README or INSTALL file. This is a text file and you should read carefully, perhaps even print, go to the couch, and relax and read.
Normally, good tarfiles will have a command you run in the root directory that says
./configure or something like that. This script will do lots of genius system checking and automatically create the
Makefile . Most of the times, that is all you have to do.
make then
make install .
However, you might like to install things in different places than the default, need to link special libs, add special compile time features, etc. This is all nicely documented in any good README or INSTALL file.
There are other ways..... but the description above is bare bones, no frills, untar, configure, make and make install.
Enjoy! This is a well established UNIX tradition that is fun and easy after you get the hang of it !!! As Optimus says, the key is to read the README first file.
BTW: The programmers have spent a lot of time to create the ./configure scripts to generate the Makefile. They work super hard to make this error free in a cross-vendor cross-compiler world, and they give great things away for FREE!! This is really a core UNIX cultural trait. It is both the strength of UNIX and a weakness. The strength is that it is free. The weakness is that free is not normally a commercially viable model, so you don't call and scream at the person who wrote the code and gave it away for free.... you spend some time working out the difficulties because the time you spend on your install debug is a fraction of the time the programmer spent in writing your free code that does all the wonderful things you like.
This cultural model is actually one of the greatest achievements of the Internet age, if you ask me, and a tribute to the unselfishness of the technical community as a whole. As you might agree, this is a rare trait in the modern world.
Respect and Honor the Tradition