 |
|
 |
How to Install a Linux Program From a .tar.gz
("Gzipped Tarball")
One file extension that you will find often in the Linux world is ".tar.gz". This file extension signifies that this file is, what is affectionately referred to as, a "gzipped tarball".
Possibly the most common use of gzipped tarballs is that of Linux program installation files. Due to its widespread use, we have written the below tutorial on "How to Install a Linux Program from a .tar.gz".
But what is a gzipped tarball?
A gzipped tarball usually is a set of files that have gone through two different processes:
-
The set of files has been "tarred".
Tar, or the Tape ARchiver, is used to place multiple files into one single file. This one single file is much easier to manipulate then being forced to download many separate files. This is often compared to the action of purchasing paperclips... Do you buy 1 paperclip 200 times, or do you buy 1 box of 200 paperclips?
-
The ".tar" file has been gzipped.
Gzip is a compression utility available under the GNU Public License (GPL). The use of gzip with tarballs is simply to make a "tarred" file smaller in size, a very helpful feature when downloading software from the internet. Gzipped files are often 1/10th of the size (or less) of the original file.
So what am I supposed to do with a Gzipped Tarball?
For the purpose of this tutorial, our program will be called LinuxProg, version 0.1. This will usually result in a gzipped tarball with a name like: "linuxprog-0.1.tar.gz"
Locate and uncompress and untar the .tar.gz:
- Browse (cd) to the directory where the gzipped tarball resides.
- Gunzip it, and untar it, all with the following command
tar -xzvf linuxprog-0.1.tar.gz
Note: the "tar -xzvf" command does several things: x extracts the tar archive, z automatically filters the archive through gzip, v specifies verbose output, and f extracts to the default file name.
Alternately, you can perform the same task, with more commands, by executing the following:
gunzip linuxprog-0.1.tar.gz (ungzips the file, leaving you with a ".tar" file)
tar -xvf linuxprog-0.1.tar (untars the file, leaving you with a directory)
So, now I've got a directory full of files, what next?
You should now be left with a directory, with a name such as "linuxprog-0.1". Decend into this directory:
cd linuxprog-0.1
Run the configure script (the configure script is there to set up options and variables needed for the program to compile on your system, and to create the makefile).
./configure
Run make on the resulting configured code
make
Install the resulting compiled code
make install
And that (probably) is it. You can most likely run your program from the command line, with a command such as:
linuxprog
or
linuxprog &
to continue using your terminal session while the program is running.
|
 |