Apt-mirror

From PostgreSQL_wiki
Revision as of 16:05, 14 October 2014 by Martin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Een apt-mirror is effectief in situaties waarin je op grote schaal servers installeert. Het belangrijkste meest zichtbare voordeel is de hoge snelheid van het ophalen van de packages over het lokale netwerk, daarnaast is er een lagere belasting van de externe lijn. Er bestaan twee versies: apt-cacher en apt-cacher-ng.

Goede hulp bij installatie:

apt-cacher draait in standard mode. de proxy mode levert performance nadelen op vanwege de configuratie van hosts in /etc/hosts Bekijk installatie: http://mirror.webhuis.nl:3142/apt-cacher Bekijk rapportage: http://mirror.webhuis.nl:3142/apt-cacher/report

apt-mirror server

1. Opzet Opzetten centrale transparante mirror / cache voor packages met apt-cacher. 2. Uitwerking Goede hulp bij installatie: http://www.howtoforge.com/debian-packages-proxy-with-apt-cacher en nog beter man apt-cacher apt-get install apache2 apt-cacher Configuratie apt-cacher.conf allowed_locations=ftp.nl.debian.org,security.debian.org,packages.webhuis.nl Voor lenny is hieraan toegevoegd: volatile.debian.org apt-cacher draait in standard mode 3. apt-cacher-ng in offline modus Bij demonstrties van onder ander CFEngine, waarin je veel installeert heb je bij voorkeur een mirror in de buurt. apt-cacher-ng vereist Dit kan in de configuratie van apt-cacher-ng: /etc/apt-cacher-ng/acng.conf

# Forbid outgoing connections, work around them or respond with 503 error
offlinemode:0
# offlinemode:1

1 = true 4. ToDo

cache_dir=/var/cache/apt-cacher
admin_email=root@localhost
daemon_port=3142
group=www-data
user=www-data
allowed_hosts=*
denied_hosts=
allowed_hosts_6=fec0::/16
denied_hosts_6=
allowed_locations=ftp.nl.debian.org,security.debian.org,packages.webhuis.nl,volatile.debian.org/debian-volatile
generate_reports=1
clean_cache=1
logdir=/var/log/apt-cacher
expire_hours=0
use_proxy=0
limit=0
debug=0

apt-mirror client

#
#  /etc/apt/sources.list
#     
#                                                                                                                                         
# etch
#
deb http://mirror.webhuis.nl:3142/ftp.nl.debian.org/debian etch main
#deb http://ftp.nl.debian.org/debian etch main
deb-src http://mirror.webhuis.nl:3142/ftp.nl.debian.org/debian etch main
#deb http://yourcache.example.com:3142/ftp.au.debian.org/debian unstable main contrib non-free
deb http://mirror.webhuis.nl:3142/security.debian.org etch/updates main
deb-src http://mirror.webhuis.nl:3142/security.debian.org/ etch/updates main contrib non-free
##  Packages Webhuis
#deb     http://mirror.webhuis.nl:3142/packages.webhuis.nl/debian     etch non-free 

Terug naar: Webhuis Infrastructuur