webpointmorpheus total solution web design

webpointmorpheus Linux Info
Software Installation
and Management

©2005 - material compiled by Bob Carnaghi, www.webpointmorpheus.com

Introduction     Top of Page
Software installation and maintenance is necessary on any running system, and Linux is no exception. There are two broad methods for installation of software on Linux:
  1. Source code which must be compiled into the binaries for execution on the system
  2. Pre-compiled packages through a package manager
Each of these two methods has advantages and disadvantages. Source code must be complied, and this is a machine-specific method. There are several steps involved in compiling the code, and the process may present challenges. Pre-compiled packages are often obtained through a package manager, and are already machine specific for the machine architecture. These packages typically have dependencies which must be resolved prior to successful installation. The sections below outline these two methods.
Installing Linux Software from Source Code     Top of Page
The following are typical steps when installing Linux software from source code files.
  1. Download the software from a mirror site or other location.
  2. Uncompress or unpack the software from the downloaded file per the file type downloaded, be it .tar, .tgz, .bz2, etc. The unpacked software typically creates a subdirectory in the directory where it is uncompressed. Look for a README file, and read it. Also look for an INSTALL file.
  3. Verify the integrity of the download by comparing the MD5 hash provided with the sum filename output.
  4. After all issues and steps are considered from the README file, the software will need to be configured with the ./configure command. This will perform a system search and create a Makefile that will establish the parameters necessary to configure, build, and install the software on the particular system.
  5. Run the make command, which will create the binaries specific to the system.
  6. Run the make install command, which will install the software. This will copy all the necessary files to the appropriate directory on the system, which should be in the system PATH.
  7. The source files can be deleted when the process has completed successfully.
Most Linux programs install to /usr/local/software directory. The Makefile is human readable, and can be altered if necessary to customize the installation. It is good form to read the Makefile after the installation is configured, as some lines may need to be commented or uncommented to complete the installation. The binaries are typically compiled with the gcc (Gnu C Compiler), which may need to (or should) be updated to perform the compile successfully.
Installing Linux Software from Package Managers     Top of Page
A package manager in Linux is comparable to the Add & Remove Programs applet in Windows. There are several package managers available in Linux userland, such as:
  • RPM, the Redhat Package Manager, typically the default in Redhat & Fedora
  • YUM - Yellowdog Update Modified - used in Yellow Dog Linux
  • YAST Package Manager - used on SUSE Linux
  • APT Package Manager - which is not a package manager itself, but an add-on to RPM typically used in Debian
Additionally, there are several sources of packages available. Here is a simple beginning:
There are added benefits to using a package manager for updating software. The packages are typically the latest releases, and the installation and configuration is done automatically. In some instances, the package manager may contain an automatic update utility that will prompt the user or administrator when updated packages are available. The Red Hat Package Manager is the most popular package manager used today. The manager stores data about all the installed packages in a database that is located in /var/lib/rpm. The manager queries this database for information about the installed packages, as well as the dependencie for a package.
Options to the  rpm  Utility
Command Option Description
 -a, --all  Use with the -q option to display the names of all packages installed on the system.
 -e, --erase  Erases (removes) a package from the system.
 -F, --freshen  Will check for a newer version and upgrade only if necessary.
 -f, --file  Use with the -q option to display which package the specified file belongs to.
 -h, --hash  Use with the -i option to display hash marks on the screen as a progress indicator.
 -i, --install  Cannot be used with the -q option. Installs the specified package.
 -i, --info  Use with the -q option to display full information about the package.
 -l, --list  Use with the -q option to display a list of filenames for the specified package.
 -q, --query  Queries the package database for information about the packages installed on the system.
 --test  Use with the -i option to perform a test install.
 -U, --upgrade  Will upgrade a package, or install the package if it is not installed on the system.
 -V, --verify  Verifies the files that are required for the specified package.
 -v  Prints lots of helpful verbose information about the package install.
 
Other Documents in this Series      Top of Page
  1. Introduction and History
  2. Installation, Advanced Installation, and Usage
  3. The Linux Kernel and the Boot Process
  4. Filesystems - Management & Administration
  5. The BASH and Other Shells
  6. System Initialization and the X Environment
  7. Linux Processes
  8. Linux Administration, Peripherals, and Hardware
  9. Software Installation and Management
  10. Backups and Log Files
  11. Performance and Problems
  12. Network Configuration
  13. Security
  14. Key Linux Commands
  15. Essential Linux Definitions
webpointmorpheus Home       Technical Pages Site Map      This page was last modified: Wednesday January 03, 2007 10:53 AM