Installing or Upgrading Without RPM

Sometimes, you may find it necessary to install or upgrade an application for which an RPM package is not available. Of course, it is certainly possible to do such a thing (in fact, it is the “defacto-standard” way of doing things in the so-called “real” Unix world), but I would recommend against it unless absolutely necessary (for reasons why, see the section called Using the Red Hat Package Manager (RPM)).

Should you need to install anything from tarballs, the general rule of thumb for system-wide software installations is to place things in your ``/usr/local/'' filesystem. Therefore, source tarballs would be untarred in ``/usr/local/src/'', while resultant binaries would probably be installed in ``/usr/local/bin'', with their configuration files in ``/usr/local/etc/''. Following such a scheme will make the administration of your system a bit easier (although, not as easy as on an RPM-only system).

Finally, end-users who wish to install software from tarballs for their own private use will probably do so under their own home directory.

After downloading the tarball from your trusted software archive site, change to the appropriate top-level directory and untar the archive by typing commands (as root, if necessary) as in the following example:

tar zxvpf cardgame.tar.gz

The above command will extract all files from the example ``cardgame.tar.gz'' compressed archive. The ``z'' option tells tar that the archive is compressed with gzip (so omit this option if your tarball is not compressed); the ``x'' option tells tar to extract all files from the archive. The ``v'' option is for verbose, listing all filenames to the display as they are extracted. The ``p'' option maintains the original and permissions the files had as the archive was created. Finally, the ``f'' option tells tar that the very next argument is the file name. Don't forget that options to tar are cAsE-sEnSiTiVe.

Caution

Caution: As mentioned in the section called Restoring with ``tar'': in Chapter 8, I recommend first using the ``t'' option to display the archive contents to verify the contents prior to actually extracting the files. Doing so may help avoid extracting files to unintended locations, or even worse, inadvertently overwriting existing files.

Once the tarball has been installed into the appropriate directory, you will almost certainly find a ``README'' or a ``INSTALL'' file included with the newly installed files, with further instructions on how to prepare the software package for use. Likely, you will need to enter commands similar to the following example:

./configure
mmake
make install

The above commands would configure the software to ensure your system has the necessary functionality and libraries to successfully compile the package, compile all source files into executable binaries, and then install the binaries and any supporting files into the appropriate locations. The actual procedures you will need to follow may, of course, vary between various software packages, so you should read any included documentation thoroughly.

Again, unless it is absolutely necessary, I really recommend avoiding tarballs and sticking to RPM if you can.