There are three main way you can install software on a UNIX system:
binary distribution - requires you to unzip software and figure out where to copy it. This is similar to a .zip file on the Windows platforms that contain ready-to-run software.
source distributions - requires to you compile the computer code that is provided in the package. Essentially, you have take the computer code the author has provided and turn it into an executable program. This requires a compiler - gcc happens to be a very common compiler that is included with a number of UNIX distributions.
rpm distributions - the most common type of software distribution on Linux systems. A .rpm file is a single file which usually contains all software, documentation and support files related to a software package. You can install, query, and remove .rpm packages on your system by using the "rpm" utility.
If you have a zipped software package that ends in a .gzip, .gz, .zip or .Z extension, you need to use a utility to uncompress the file:
for files ending in .gz or .gzip, issue the "gunzip filename.gzip" command to uncompress the file.
for files ending in .Z, issue the "uncompress filename.Z" command to uncompress the file.
for files ending in .zip, issue the "unzip filename.zip" command to uncompress the file.
A lot of times, you will see a zipped tar file that contains a number of files and directories. These files usually end in the .tar.gz or .tgz extensions You can uncompress and untar this type of file by issuing the "tar -xvfz filename.tgz" command.
After unzipping a source or binary software distribution (NOT AN .rpm file), you should be left with a file with a .tar extension. It's now your job to untar the file by issuing the "tar -xvf file.tar", which will untar the files and (most likely) put all of them in a directory named something similar to the software package you are installing (e.g. if you untar "MySoftware.tar", it will usually place all files in a directory called "MySoftware"). You must now install and/or compile the software yourself. The procedure for doing this varies for each piece of software. Each distribution should have an INSTALL or README file that tells you how to install it. Refer to Chapter 4 of "Linux Administration: A Beginner's Guide" for detailed instructions on the procedure I just described.
The rpm command is a powerful utility that allows you to install, delete and view existing software packages on your system. Here are some of the most common uses of the rpm command:
This installs a software package called ssh-server-1.2.26-4TL.i386.rpm, the secure shell server:
rpm -ihv ssh-server-1.2.26-4TL.i386.rpm
This queries the system to see if a package called "ssh-server" is installed on the system:
rpm -q ssh-server
Lists all the files that are installed by the ssh-server package:
rpm -ql ssh-server
Delete the ssh-server package from the system:
rpm -e ssh-server
Upgrade the existing ssh-server package on the system. For example, if you already have the ssh-server package installed and a new version is released, use the the upgrade flag to overwrite the old package with the new one.
rpm -Uhv ssh-server
Lists all the packages currently installed on the system: