LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

Installing Software on Debian
Pages: 1, 2, 3

How It Works

Understanding the sources.list file is the key to Debian happiness.

As part of the Debian installation process, you will have archive sources set up. View them by reading the file /etc/apt/sources.list. Unless you're running without a network connection, the sources will include the main and the security update archives. The typical contents of sources.list for a new installation include:



deb cdrom:[Debian GNU/Linux stable _Sarge_ - i386 Binary-1]/
    unstable contrib main

deb http://http.us.debian.org/debian stable main
deb-src http://http.us.debian.org/debian stable main
deb http://security.debian.org/ stable/updates main contrib

The official repository of Debian software is known as the archive. The deb lines in the sources.list file instruct APT as to where to find the archive, and which distribution and sections of the archive to access. In this example, the cdrom source refers to the CD used to start the installation, and the http sources refer to the network-accessible Debian archive. The deb-src lines tell APT where to find source code for the software.

Use the netselect-apt package to automatically configure your system to use the fastest possible Debian mirrors.

Debian maintains three concurrent distributions: stable, the official stable release, and testing and unstable, used for development purposes. Within the distributions are three sections of the archive. The vast majority of the software is in main, which contains software deemed free by the Debian Free Software Guidelines and depends only on other software in main. The nonfree section includes software not deemed free by the Debian Free Software Guidelines, and contrib includes free software but has dependencies on other software in contrib or nonfree.

There's another section called non-US, containing software that is problematic to distribute in the United States, usually for patent reasons. You can find a list of non-US Debian packages online. Since the relaxation of U.S. laws on cryptography export, the non-US section has become less important to the typical Debian user.

The aptitude update command causes APT to reread the sources from sources.list and update the system's list of available packages. Run this command at least once a week in order to get updates from the security archive. The other stable sources will not vary, apart from when stable update releases occur. Stable update releases do not make major changes to the system. Instead, they fix serious bugs and include any essential updates. See the "What about" section for an explanation of how to keep your system up to date against security and stable update releases.

Interrogate the system's index of packages with aptitude. The aptitude show command displays a package description:

$ aptitude show sudo
Package: sudo
State: not installed
Version: 1.6.7p5-2
Priority: optional
Section: admin
Maintainer: Bdale Garbee <bdale@gag.com>
Uncompressed Size: 369k
Depends: libc6 (>= 2.3.2.ds1-4), libpam0g (>= 0.76), libpam-modules
Description: Provide limited super user privileges to specific users
 Sudo is a program designed to allow a sysadmin to give limited root privileges
 to users and log root activity.  The basic philosophy is to give as few
 privileges as possible but still allow people to get their work done.
The maintainer listed in the package information is the Debian developer who looks after the package. Don't report problems straight to him, though! Read more about how to report Debian bugs here.

The Depends line of the descriptions shows which other packages need installing for sudo to run. If they're not already installed when you install a package, aptitude will install the dependencies too. If a package is installed as a dependency rather than being installed explicitly, aptitude will remove it when other packages don't depend on it anymore. As well as dependencies, packages can also recommend and suggest other packages. If a package recommends another, it means that although the package will work without the recommendation installed, in all ordinary uses it should be there. Suggestions are more an indication of usefulness than dependency. By default, aptitude automatically installs all the dependencies and recommendations along with the package itself.

Some software packages simply can't coexist with others. There aren't many of these in Debian, but there are a few. In this case the package information also includes the conflicts relationship. When you ask for a package to be installed that conflicts with one you already have on your system, aptitude will remove the conflicting package. The most common usage of conflicts in Debian is when a package reorganization or renaming occurs, so that the new package must replace its predecessors when upgraded.

You may not always know which package you need to install in order to get the software you want. Debian package names don't always exactly match the original software. The aptitude search command searches through the index and displays a list of suitable matches. Use the ~d option to search the description:

$ aptitude search sudo
p   dpsyco-sudo                     - Automate administration of sudo privileges
p   gnome-sudo                      - dumb package to provide smooth upgrade to 
p   sudo                            - Provide limited super user privileges to s
$ aptitude search ~d"super user"
p   calife                          - Provides super user privileges to specific
p   sudo                            - Provide limited super user privileges to s
Many more searching options are available, documented in the aptitude user manual, details of which are at the end of this article.

Pages: 1, 2, 3

Next Pagearrow




Tagged Articles

Post to del.icio.us

This article has been tagged:

debian

Articles that share the tag debian:

Installing Debian (36 tags)

Installing Software on Debian (17 tags)

Use Your Digital Camera with Linux (4 tags)

View All

linux

Articles that share the tag linux:

Managing Disk Space with LVM (74 tags)

Use Your Digital Camera with Linux (60 tags)

mdadm: A New Tool For Linux Software RAID Management (59 tags)

Asterisk: A Bare-Bones VoIP Example (43 tags)

View All

howto

Articles that share the tag howto:

Rolling with Ruby on Rails (258 tags)

From Weblog to CMS with WordPress (98 tags)

Top Ten Digital Photography Tips (92 tags)

Top Ten Mac OS X Tips for Unix Geeks (79 tags)

View All

sysadmin

Articles that share the tag sysadmin:

Building a FreeBSD Build System (30 tags)

Best Windows Admin Downloads (30 tags)

Managing Disk Space with LVM (26 tags)

The Ultimate Free Windows Toolkit (21 tags)

Six Things First-Time Squid Administrators Should Know (20 tags)

View All

software

Articles that share the tag software:

What Is Web 2.0 (185 tags)

Rolling with Ruby on Rails (97 tags)

How Does Open Source Software Stack Up on the Mac? (79 tags)

Calculating the True Price of Software (68 tags)

Delve into DEVONthink (30 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com