You are on page 1of 13

Linux Package Management

Without package management…


Without package management, users must ensure that all of the
required dependencies for a piece of software are installed and up to
date, compile the software from the source code (which takes time and
introduces compiler-based variances from system to system), and
manage configuration for each piece of software. Additionally, without
package management, application files are located in the (hopefully)
standard locations for the system to which the developer(s) are
accustomed, regardless of what system you’re using. In short, this
becomes an utter mess.
Features
Package downloading: operating system projects provide repositories
of packages which allow users to download their packages from a
single, cryptographically-trusted provider. 
Dependency resolution: packages contain meta-data which provides
information about what other packages are required by the package in
question.
A standard binary package format: packages are prepared in a uniform
way across the system in order to make installation easier and more
coherent.
Features cont…
• Common installation and configuration locations: System developers
often have conventions for how applications are configured and the
layout of files in the /etc/ and /etc/init.d/ directories; by using packages,
systems are able to enforce this conformity.
• Additional system-related configuration and functionality: Occasionally,
operating system developers will develop patches and helper scripts for
their software which get distributed in the packages.
• Quality control. Operating system developers use the packaging process
to test and ensure that the software is stable and free of bugs that might
encroach upon product quality, and that the software doesn’t cause the
system to become unstable. 
• For newcomers, the easiest level to work at is the GUI Package Tool
• That is what we looked at in the first presentation
• But a GUI is just a front-end for what you can do on the command line
• The command line is much more powerful
• Anything you can do with a GUI you can do on a command line
• But the command line will let you do more than the GUI will
• When the GUI has trouble with a package install you will generally
need to use the command line to fix the problem
• These are all administrative tasks, so run them as root or use sudo
• While we looked at three GUI tools in the previous presentation, here
we will only look at two sets of command line tool
• They are YUM (and RPM) and APT (and DPKG)
• They work with RPM and Debian packages respectively
• There are others, but once you learn the basic principles you can pick
up the others pretty easily should you need to
RPM
• RPM stands for Red Hat Package Manager
• Red Hat is the major distro for corporate and server center
environments
• Many major distros have adopted RPM as well: OpenSUSE, Mandriva,
etc.
• RPM can be run by itself from the command line, or you can use an
intermediate tool like YUM (Yellowdog Updater, Modified)
Yum
“Yum is an automatic updater and package installer/remover for rpm
systems. It automatically computes dependencies and figures out what
things should occur to install packages. It makes it easier to maintain
groups of machines without having to manually update each one using
rpm.”
http://yum.baseurl.org/
APT
The other major package management system is APT (Advanced
Package Tool), which is used in Debian and related distros (Ubuntu
being a major one here)

This works a lot like yum, which is not surprising since they are doing
the same things
APT
Just as with YUM, you need to maintain your repository information when using
APT

This is kept in a file


/etc/apt/sources.list

Here, each repo has a line in this single file

For example, here is the main Debian repo


deb http://http.us.debian.org/debianstable main contrib non-free
Repositories

These are online collections of software packages that you can download and install

You will have the best results using repositories that are designed for your distro

These can be created by the distro itself, or by third-parties (e.g. Miro)

Adding a repository is easiest with the GUI front-ends because they do so much of it for
you

But you can add one if you know how to use a text editor

You might also like