Linux Basic Administration Concepts

Installing from Source Code

Some software is available only as source code, and sometimes use of source code is preferred. The source is usually in C or C++, compressed in an archive. In Linux, two compressors are commonly used: gzip and bzip2, and the files are combined together using tar. To open a tar.gz or tgz archive, use the command: "tar -xzvf file.tar.gz". To open a tar.bz2 archive, use "tar -xjvf file.tar.bz2".

The archive will usually include a directory by the same name. In this directory you will usually find a README file, read it! There might also be an INSTALL file, read it too. Take a look at other files with capitalized names as well.

Note: not all tar files are properly built - they might create files without creating a directory first. To be on the safe side, make a habbit of opening tar files in a new, empty directory. You can always move the files later on to a different directory.

Most of these programs are based on a system called autoconf, which simplifies the compilation of Linux software. To install an autoconf-based program, do the following (as a normal user):

[alon@localhost foobar-1.0]$ ./configure
(... lots of output ...)
[alon@localhost foobar-1.0]$ make
(... lots of output ...)
[alon@localhost foobar-1.0]$ su
Password:
[root@localhost foobar-1.0]# make install
(... lots of output ...)
[root@localhost foobar-1.0]# exit
[alon@localhost foobar-1.0]$
Originally written by Valid HTML 4.01!Alon Altman