All of the configuration for media or repositories resides in /etc/apt, in a file called sources . list and any files in /etc/apt/sources .list.dwith a .list extension. These files can be modified manually using your preferred editor, manipulated by various API utilities such as apt-add-repository or apt-spy, or via a menu item in the Synaptic Gill. Details on how each method works are available in various man pages, such as those for sources . list, apt-add-repository and apt-spy, and so on, or in the help files for Synaptic. However, since they all depend on the same configuration files and format, the required entries are all similar.
Each line includes an indicator of whether the repository contains binary packages or source packages (from which binary packages can be built), the location of the repository, the identity of the release, and the sections from which software may be selected. Generally, an entry for the media from which you installed Debian has already been made during the installation process, along with an entry for the online repositories if they were used during installation as well.
All package sources are identified by a URI, described in the sources . list man page. The release is identified by its release name (such as squeeze for Debian 6, or wheezy for Debian 7) or by a generic term such as stable, which refers to whatever the current stable release is.
The current Debian stable release is Debian 7, code named wheezy, released on 4 May, 2013. At the time of writing, stable is a synonym for wheezy. Debian releases are named in order to make the mirroring of various distributions easier. The code names to date are all taken from the movie Toy Story. This tradition apparently began in 1996 when Bruce Perens, who worked for Pixar at that time, took command of the Debian Project.
Taking all these together, a set of repositories as they might appear in /etc/apt/ sources . list would look like the following:
i deb cdram:Debian GNU/Linux 7.0.0 -Wheezy· -Official amd64 \
NETINST Binary-l 20130504-14.4311 stable main
deb http://ftp.ua.debian.org/debian/ wheezy main non-free contrib
deb-arc http://ftp.ua.debian.org/debian/ wheezy main non-free \
contrib
deb http://security.debian.org/ wheezy/updates main contrib \
non-free
deb-arc bttp://security.debian.org/ wheezy/updates main contrib \ non-free
wheezy-updates, previously known as •volatile,
deb http://ftp.us.dabian.org/debian/wheezy-update.main contrib \ non-free
deb-arc http://ftp.us.debian.org/debian/ wheezy-updatea main \
contrib non-free
Some of the lines in the example are too long for the page and are split into two lines, using the common convention of adding a backslash (\) at the end of the first line to indicate it is continued. In reality, these
lines should not be split in the APT sources configuration illes.
Let's take the lines one at a time.
The first line begins with a #, meaning this entry is disabled. This entry was made by a network installation, wherein a minimal CD is mounted, and basic software is installed to allow the remainder of the software to be installed from online repositories as listed in the later lines. Only the main section is required, as shown at the end of the line.
The next two lines are for binaries (deb) and source packages (deb-src), to be obtained from an HTTP server (http://ftp .us. debian. org/debian). The release is wheezy, and all three sections-main, contrib, and non-free-will be available. Following the main repository lines are two lines for binary and source package updates. This is where security updates to the stable release are available.
Even if you prefer to use media for the release, rather than online repositories, you should include the update repositories, as this is the only way to obtain security fixes that are released as necessary.
Finally, there is a comment, and two lines for what used to be called the 'volatile' repository, and is now just referred to by the release code name followed by -updates. This repository contains packages that are routinely updated throughout the life of the release, much more often than the security update repository. Packages that include virus definitions are examples of software included in this repository.
While the various methods of configuring the repositories have slight differences, the same basic infonnation will be required, no matter which method you use. Also, since all of the utilities use the same configuration files and fonnat, information entered, deleted, or modified by one method will be immediately visible to all of the utilities.
All of the previous lines were pre-configured by the installation procedure, and did not need to be modified. However, there are often reasons to modify or add repositories. You may want to add repositories for software that isn't available directly from Debian, or modify the URL to use a different, better performing server, or different access method.
For example, HITP is more resistant to network delays or error, while FfP is somewhat faster. Also, not all mirrors support both methods, so if you change servers, you may need to change the access method as well.
There are a number of non-Debian repositories that contain software that is not included in the standard Debian release. Usually, this is due to licensing issues, or because development takes place outside of the Debian Project policies and there is no sponsor to integrate it into Debian. Some of the more useful ones are as follows:
- Deb Multimedia: As it says, this is primarily a multimedia package that can't be included in the normal distribution
- Webmin: This is a web-based system administration software
- Oracle: This provides Oracle Express software
- Skype: This provides the Skype software
- MongoDB: This is a software from the NoSQL MongoDB project
As an example, the following is a /etc/apt/sources .list.d/webmin.list file for the Webmin archive just mentioned:
dab http://download.wabmin.com/download/rapoBitory Barga contrib
deb http://wabmin.mirror.aameraettech801utioDB.co.uk/repo8itory \ Barge cOlltrib
Generally, sites that offer such repositories will include instructions for configuring the sources list file for their repository.