Apt-mirror

Inhaltsverzeichnis

apt-mirror

Beschreibung

apt-mirror (http://apt-mirror.sourceforge.net/) benötigt nur wget, Perl und gunzip. Dabei wird die spezielle Debian-Paketstruktur (dists mit den Paketbeschreibungsdateien, pool mit den eigentlichen Debian-Paketen) runtergeladen.

Installation

apt-mirror ist in Debian/Ubuntu enthalten und kann normal installiert werden:

apt-get install apt-mirror

Konfiguration

Die Konfiguration erfolgt über die Konfigurationsdatei /etc/apt/mirror.list. Dort werden die Quellen ganz normal im Format aus der Datei /etc/apt/sources.list eingetragen.

Wer möchte, kann die Anzahl der gleichzeitigen Herunterladevorgänge angeben:

set nthreads 20

Den Pfad des Mirrors im Verzeichnisbaum lässt sich auch anpassen:

set base_path /var/spool/apt-mirror

Bestimmte Verzeichnisse lassen sich beim Löschen ignorieren:

skip-clean http://ftp.us.debian.org/debian-cd/

Weiterhin kann man angeben, welche Verzeichnisse bereinigt werden sollen (wenn nicht mehr im Index vorhanden):

clean http://security.debian.org/

Hier eine Beispielkonfiguration:

set base_path    /var/spool/apt-mirror
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
#
# set defaultarch  <running host architecture>
set nthreads     20

# lenny's section
deb http://ftp.us.debian.org/debian lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian lenny main contrib non-free

# this source required for network installation ability (udebs)
deb http://ftp.us.debian.org/debian lenny main/debian-installer

# security updates is always good thing to install
deb http://security.debian.org/debian-security lenny/updates main contrib  non-free
deb-src http://security.debian.org/debian-security lenny/updates main contrib non-free

# lenny-proposed-updates's section
deb http://ftp.us.debian.org/debian lenny-proposed-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian lenny-proposed-updates main contrib non-free

# What directories should we clean up
clean http://security.debian.org/
clean http://ftp.us.debian.org/

# But exclude this directories
skip-clean http://ftp.us.debian.org/debian-cd/
skip-clean http://ftp.us.debian.org/debian/dists/lenny/main/installer-i386/
skip-clean http://ftp.us.debian.org/debian/doc/
skip-clean http://ftp.us.debian.org/debian/tools/
skip-clean http://ftp.us.debian.org/debian/project/

apt-mirror wird einfach mit apt-mirror aufgerufen, normalerweise via cron. Der Eintrag ist in /etc/cron.d/apt-mirror zu finden.

Von "http://www.lug-wr.de/wiki/index.php/Apt-mirror"

Diese Seite wurde bisher 4231 mal abgerufen. Diese Seite wurde zuletzt geändert um 18:41, 25. Mai 2011. Inhalt ist verfügbar unter der GNU Free Documentation License 1.2.