Home » Linux Basics » 05 - Notes on Installation and Configuration
5

Package Installation Steps

Following a step by step instruction on the installation of a linux packaging

Normally, compressed archives of source code are distributed as packages. This code is then built and compiled on each computer or server so that the executable is in the native binary code of the machine and the OS 'understands' the executable. Following are the steps that are followed to unzip and install a package archive:

  1. Unpack the tarball by issuing the following command. The '|' 'pipes' sends the output of the gunzip command to the 'tar' command; the '-' at the end causes the tar command to take its input from standard in (from the gunzip command whose output is piped into tar's standard input). This command normally installs the appropriate files in new directories starting from the path where the command is executed.
  2. # gunzip -c backup.tar.gz | tar xvf -
  3. Error messages at this point are usually the result of the command benign issued at an inappropriate path; sometimes, the archive should be installed in a specific location within the filesystem. Also, updates or bugs in the archives may have to be fixed using a 'patch' provided by the packagers. This information is provided in the package's documentation.
  4. The archive normally contains a Makefile that may be built (or compiled) using the command 'make'. The building process consists of preprocessing, compiling, and linking source code and these processes convert the source into the binaries.
  5. Before running 'make', the Makefile should normally be customized with reference to the location of libraries and other resources on the machine. Utilities like make accomplish this task. Just type the word 'make' at the command prompt to get the package up and running.
  6. Once the program is installed, all permissions should be set appropriately to allow the right user execute access.

Package formats are used to simplify the process of installation. Although package format installation may be performed in a single step, the long drawn process of unpacking, configuring the Makefile, and building, is unnecessary if tools like rpm or deb are used to install packages. Applications packaged using these formats tend to be less current than the tarballs. Also, a tarball is more flexible as it is more configurable; it may be customized and changed to fit each system. Further, malicious softwares disguised as an rpm packages may wreak havoc on the system. Sources of rpm packages should always be verified using checksums or some other verification process. Installing an application package using a package format is really simple; the following commands will accomplish installation. The second command is for systems running Debian versions of Linux:

# rpm -i package_name.rpm
 
# dpkg --install package_name.deb