LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


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




Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: