Installing Software Using tar Files



Installing Software Using tar Files

Another popular software installation file format is the tar file, which can frequently be obtained from the Web sites of software developers, and online software libraries such as www.sourceforge.net.

The Linux tar command is used to archive files, which typically have a .tar file extension in the filename. These files are also frequently compressed in the gzip format, and when they are, their file extensions end with .tar.gz or .tgz. The commands to extract the data from either type are similar. When a tar file is uncompressed, the command to extract the data is tar -xvf filename.tar. When the archive is compressed, the command to use is tar -xzvf filename.tar.gz.

The tar file installation process usually requires you first to uncompress and extract the contents of the archive in a local subdirectory, which frequently has the same name as the tar file. The subdirectory usually contains a file called README or INSTALL, which outlines all the customized steps to install the software.

Here are the initial steps to install tar-based software:

1.
Issue the tar command to extract the files:

[root@bigboy tmp]# tar -xvzf linux-software-1.3.1.tar.gz
linux-software-1.3.1/
linux-software-1.3.1/plugins-scripts/
...
...
...
linux-software-1.3.1/linux-software-plugins.spec
[root@bigboy tmp]#

This creates a subdirectory with the installation files inside:

[root@bigboy tmp]# ls
linux-software-1.3.1 linux-software-1.3.1.tar.gz
[root@bigboy tmp]#

2.
Use the cd command to enter the subdirectory and follow the directions listed in the INSTALL and README files:

[root@bigboy tmp]# cd linux-software-1.3.1
[root@bigboy linux-software-1.3.1]# ls
COPYING    install-sh    missing                  plugins
depcomp    LEGAL         mkinstalldirs            plugins-
scripts
FAQ        lib           linux-software.spec      README
Helper.pm  Makefile.am  linux-software.spec.in  REQUIREMENTS
INSTALL    Makefile.in  NEWS                      subst.in
[root@bigboy linux-software-1.3.1]#

Software installation with tar files can be frustrating, frequently requiring the installation of other supporting tar files, each with its own customized installation commands. RPMs, with the single standardized command format, are usually easier to use and may be the better method to use for newer Linux users.