debian,ubuntu,linux,howtos,manuals,notes,manpages

setup a debian apt-mirror

February 15, 2009
By

mirror.cipar.net (192.168.1.18)

Installation

newvserver --vsroot /VSERVERS --hostname mirror --domain cipar.net --ip 192.168.1.18/24 --dist etch --mirror http://192.168.1.12:3142/debian.apt-get.eu/debian  --interface dummy0 
Your current time zone is set to Unknown
Do you want to change that? [n]:

Enter for default
 Enable shadow passwords?
<Yes> 
enter the root password
Create a normal user account now?
 <No>    
Choose software to install:
<Ok> 
nano /etc/vservers/mirror/apps/init/mark
default
vserver mirror start
vserver mirror enter
nano /etc/apt/sources.list
deb http://192.168.1.12:3142/security.debian.org/ etch/updates main contrib
deb http://192.168.1.12:3142/ftp.nl.debian.org/debian/ etch main contrib non-free
apt-get update
apt-get upgrade
apt-get install apt-mirror apache2
nano /etc/apt/mirror.list
# apt-mirror configuration file

##
## The default configuration options (uncomment and change to override)
##
#
# 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
# set nthreads     20
#

##
## Example sources
##

# etch section
deb-amd64 http://ftp.nl.debian.org/debian etch main contrib non-free
deb-amd64 http://security.debian.org/ etch/updates main contrib non-free

# Ubuntu Hardy Heron
deb-i386 http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb-i386 http://security.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-i386 http://packages.medibuntu.org/ hardy free non-free

##
## Cleaner configuration example
##
#
# set cleanscript $var_path/clean.sh
#

# Cleaning section
clean http://ftp.nl.debian.org/
clean http://security.debian.org/
clean http://archive.ubuntu.com/
clean http://packages.medibuntu.org/
su - apt-mirror -c apt-mirror
nano /etc/cron.d/apt-mirror
#
# Regular cron jobs for the apt-mirror package
#
0 23    * * 6   apt-mirror      /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log

Tags: , ,

2 Responses to setup a debian apt-mirror

  1. Kelly Brown on June 13, 2009 at 2:34 am

    The article is usefull for me. I’ll be coming back to your blog.

  2. JaneRadriges on June 13, 2009 at 7:54 pm

    Hi, interest post. I’ll write you later about few questions!

Leave a Reply

Your email address will not be published. Required fields are marked *

*