/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 TIP Peningkatan pembaharuan).
/etc/apt/sources.list
berisi penjelasan sebuah sumber, dibuat 3 bagian dipisahkan dengan spasi.
deb
” untuk paket biner,
deb-src
” untuk paket sumber
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.
./
” yang mengacu pada subdirektori yang ada - paket kemudian secara langsung pada URL yang ditentukan). Namun kasus yang paling umum, repositori akan terstruktur seperti sebuah mirror Debian, dengan banyak distribusi masing-masing memiliki banyak komponen. Dalam kasus ini, nama distribusi yang terpilih (dengan “namakode”-nya — lihat daftar di bilah tepi KOMUNITAS Bruce Perens, seorang pemimpin kontroversial — atau dengan “suites” yang sesuai — stable
, testing
, unstable
), kemudian komponen (atau bagian) untuk diaktifkan (pilih antara main
, contrib
, dan non-free
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
untuk sistem menjalankan versi Debian Stable:
Contoh 6.1. Berkas /etc/apt/sources.list
untuk pengguna 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
akan digunakan. Untuk alasan ini, sumber tak-resmi biasanya ditambahkan di akhir berkas.
security.debian.org
(pada seperangkat mesin kecil yang dikelola oleh Administrator Sistem Debian). Arsip ini berisi pembaharuan keamanan (dipersiapkan oleh Tim Keamanan Debian dan/atau oleh maintainer paket) untuk distribusi Stable.
proposed-updates
, dipilih oleh Manajer Rilis Stable dengan hati-hati.
proposed-updates
merupakan di mana pembaharuan yang diharapkan dipersiapkan (di bawah supervisi Manajer Rilis Stable).
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
menghost “backport paket”. Istilah tersebut mengacu pada paket beberapa perangkat lunak terkini yang telah dokompilasi untuk distribusi lama, umumnya untuk Stable.
stable-backports
sekarang tersedia pada mirror Debian biasanya. Namun backport untuk Squeeze masih dihost pada dedicated server (backports.debian.org
), dan memerlukan entri berikut pada sources.list
:
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
stable-backports
selalu dibuat dari paket yang tersedia di Testing. Ini untuk memastikan bahwa seluruh backport terinstall akan dapat dimutakhirkan berdasarkan versi stabil sekali rilis stabil Debian berikutnya tersedia.
$
sudo apt-get install package/jessie-backports
$
sudo apt-get install -t jessie-backports package
sources.list
untuk sistem yang menjalankan versi Debian Testing atau Unstable.
Contoh 6.2. Berkas /etc/apt/sources.list
untuk pengguna Debian 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
ini APT akan menginstall paket dari Unstable. Jika bukan itu yang diinginkan, gunakan pengaturan APT::Default-Release
(see Bagian 6.2.3, “Pembaharuan Sistem”) untuk menunjuk APT untuk mengambil paket dari distribusi lain (kemungkinan besar dalam kasus ini Testing).
sources.list
APT tidak membawa ke penggunaan sistematis paketnya. Baris yang ditambahkan ialah:
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
milik APT tidak diubah, namun APT dikonfigurasi untuk menggunakannya sebagai proxy permintaan keluar.
/etc/approx/approx.conf
:
# <name> <repository-base-url> debian http://ftp.debian.org/debian security http://security.debian.org
inetd
Super-Server”) dan pengguna perlu mengatur berkas sources.list
mengarah ke server approx:
# 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