sources.list
Dateiaptitude
, apt-get
, and apt
Commandsapt-cache
aptitude
, synaptic
/etc/apt/sources.list
will list the different repositories (or “sources”) that publish Debian packages. APT will then import the list of packages published by each of these sources. This operation is achieved by downloading Packages.xz
or a variant using a different compression method (such as Packages.gz
or .bz2
) files (in case of a source of binary packages) and Sources.xz
or a variant (in case of a source of source packages) and by analyzing their contents. When an old copy of these files is already present, APT can update it by only downloading the differences (see sidebar TIPP Inkrementelle Aktualisierung).
/etc/apt/sources.list
enthält die Beschreibung einer Quelle, bestehend aus drei, durch Kommata getrennten, Teilen.
deb
” für Binärpakete,
deb-src
” für Quellpakete.
Packages.gz
files, it must give a full and valid URL): this can consist in a Debian mirror or in any other package archive set up by a third party. The URL can start with file://
to indicate a local source installed in the system's file hierarchy, with http://
to indicate a source accessible from a web server, or with ftp://
for a source available on an FTP server. The URL can also start with cdrom:
for CD-ROM/DVD-ROM/Blu-ray disc based installations, although this is less frequent, since network-based installation methods are more and more common.
./
”, was das Fehlen eines Unterverzeichnisses anzeigt — die Pakete befinden sich dann direkt an der angegebenen URL). Aber üblicherweise sind die Repositorien wie ein Debian Spiegel gegliedert, bestehend aus mehreren Distributionen, jede mit mehreren Komponenten. In diesen Fällen gibt man die gewählte Distribution an (mit ihrem "Codenamen" — siehe die Liste in der Seitenleiste GEMEINSCHAFT Bruce Perens, ein umstrittener Leiter — oder mit dem Namen der zugehörigen "Suite" — stable
, testing
, unstable
), dann die Komponenten (oder Abschnitte), die aktiviert werden sollen (zur Auswahl stehen main
, contrib
, und non-free
auf einem typischen Debian Spiegel).
cdrom
entries describe the CD/DVD-ROMs you have. Contrary to other entries, a CD-ROM is not always available since it has to be inserted into the drive and since only one disc can be read at a time. For those reasons, these sources are managed in a slightly different way, and need to be added with the apt-cdrom
program, usually executed with the add
parameter. The latter will then request the disc to be inserted in the drive and will browse its contents looking for Packages
files. It will use these files to update its database of available packages (this operation is usually done by the apt update
command). From then on, APT can require the disc to be inserted if it needs one of its packages.
sources.list
für ein System, auf welchem eine Stable-Version von Debian läuft:
Beispiel 6.1. /etc/apt/sources.list
-Datei für Debian Stable
# Security updates deb http://security.debian.org/ jessie/updates main contrib non-free deb-src http://security.debian.org/ jessie/updates main contrib non-free ## Debian mirror # Base repository deb http://ftp.debian.org/debian jessie main contrib non-free deb-src http://ftp.debian.org/debian jessie main contrib non-free # Stable updates deb http://ftp.debian.org/debian jessie-updates main contrib non-free deb-src http://ftp.debian.org/debian jessie-updates main contrib non-free # Stable backports deb http://ftp.debian.org/debian jessie-backports main contrib non-free deb-src http://ftp.debian.org/debian jessie-backports main contrib non-free
stable
, stable-updates
, stable-backports
) because we don't want to have the underlying distribution changed outside of our control when the next stable release comes out.
sources.list
aufgeführte verwendet wird. Aus diesem Grund werden nicht offizielle Bezugsquellen üblicherweise ans Ende der Liste gesetzt.
security.debian.org
(einer kleinen Gruppe von Maschinen, die von den Debian System Administratoren betreut werden). Dieses Archiv enthält Sicherheitsaktualisierungen (erstellt vom Debian Security Team und/oder von den Paketbetreuern) für die Stable-Distribution.
proposed-updates
-Repositories, sorgfältig ausgewählt von den Betreuern des Stable Release.
proposed-updates
-Repository werden die vorgesehenen Aktualisierungen vorbereitet (kontrolliert von den Stable-Release-Betreuern).
jessie-proposed-updates
alias which is both more explicit and more consistent since wheezy-proposed-updates
also exists (for the Oldstable updates):
deb http://ftp.debian.org/debian jessie-proposed-updates main contrib non-free
stable-backports
-Repository enthält "rückportierte Pakete". Der Ausdruck beschreibt ein Paket mit kürzlich erschienener Software, das für eine ältere Distribution neukompiliert wurde, im Allgemeinen für Stable.
stable-backports
-Repository ist inzwischen auf den normalen Debian-Spielgeln verfübar. Die Rückportierungen für Squeeze werden weiterhin auf dem dafür eingerichteten Server (backports.debian.org
) vorgehalten und deshalb wird folgener Eintrag in sources.list
benötigt:
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
stable-backports
werden immer aus Paketen erzeugt, die in Testing vorhanden sind. Das stellt sicher, dass alle installierten Rückportierungen auf die zugehörige Stable-Version aktualisierbar sind, sobald das nächste Stable-Release verfügbar ist.
$
sudo apt-get install package/jessie-backports
$
sudo apt-get install -t jessie-backports package
sources.list
für ein System, auf welchem entweder die Version Testing oder Unstable läuft:
Beispiel 6.2. Beispoieldatei /etc/apt/sources.list
für Debian-Anwender von Testing/Unstable
# Unstable deb http://ftp.debian.org/debian unstable main contrib non-free deb-src http://ftp.debian.org/debian unstable main contrib non-free # Testing deb http://ftp.debian.org/debian testing main contrib non-free deb-src http://ftp.debian.org/debian testing main contrib non-free # Stable deb http://ftp.debian.org/debian stable main contrib non-free deb-src http://ftp.debian.org/debian stable main contrib non-free # Security updates deb http://security.debian.org/ stable/updates main contrib non-free deb http://security.debian.org/ testing/updates main contrib non-free deb-src http://security.debian.org/ stable/updates main contrib non-free deb-src http://security.debian.org/ testing/updates main contrib non-free
sources.list
wird APT Pakete von Unstable installieren. Ist das nicht gewollt, verwenden Sie die Einstellung APT::Default-Release
(siehe Abschnitt 6.2.3, „Das System aktualisieren“) um APT anzuweisen, Pakete von einer anderen Distribution auszuwählen (in diesem Fall vermutlich Testing).
sources.list
-Datei nicht dazu führt, dass diese Pakete systematisch benutzt werden. Die hinzuzufügende Zeile ist:
deb http://ftp.debian.org/debian experimental main contrib non-free
mentors.debian.net
site is interesting (although it only provides source packages), since it gathers packages created by candidates to the status of official Debian developer or by volunteers who wish to create Debian packages without going through that process of integration. These packages are made available without any guarantee regarding their quality; make sure that you check their origin and integrity and then test them before you consider using them in production.
sources.list
von APT bleibt unverändert, aber APT ist so konfiguriert, dass es diese als Proxies für ausgehende Anfragen nutzt.
/etc/approx/approx.conf
gespeichert:
# <name> <repository-base-url> debian http://ftp.debian.org/debian security http://security.debian.org
inetd
“) und erwartet von den Anwendern, sources.list
anzupassen, so dass er auf den Server "approx" zeigt:
# Sample sources.list pointing to a local approx server deb http://apt.falcot.com:9999/security jessie/updates main contrib non-free deb http://apt.falcot.com:9999/debian jessie main contrib non-free