Comments on How To Create A Local Debian/Ubuntu Mirror With apt-mirror

How To Create A Local Debian/Ubuntu Mirror With apt-mirror This tutorial shows how to create a Debian/Ubuntu mirror for your local network with the tool apt-mirror. Having a local Debian/Ubuntu mirror is good if you have to install multiple systems in your local network because then all needed packages can be downloaded over the fast LAN connection, thus saving your internet bandwidth.

10 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

If you have both 32bit (i386) and 64 bit (amd64) you can have apt-mirror get the packages for both architectures. Just add the architecture after deb on each line.

Example:

deb-amd64 http://ftp.osuosl.org/pub/ubuntu gutsy main restricted universe multiverse

deb-i386 http://ftp.osuosl.org/pub/ubuntu gutsy main restricted universe multiverse

 

By: Anonymous

Thanks for the info. We just create a repo.

 

Thanks,
Ivu Loto Team

By: TCPMeta

I followed your guide to the T for the mirror portion. I am also using the mirror as a PXE server to load the debian install image. My clients do not like the mirror. I select HTTP and point it to my server's IP 192.168.1.100, point it to /debian/ and it asks what version I want and after I select Wheezy it fails. Might give it a shot with FTP next.

By: steven schuit

 Steven faggot loves to be lazy

By: Tom

My apt-mirror download finishes, but it still says that it needs to get 26.4 GiB, even after the script completes. Is this normal? I can keep re-running the script, but it finishes without downloading anything. In total I've downloaded 95GiB so far, it says it still has 26.4 GiB to download, but completes at 26.4 GiB.

 

26.4 GiB will be downloaded into archive.Downloading 394 archive files using 20 threads...Begin time: Tue Aug 23 08:20:22 2016[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... End time: Tue Aug 23 08:26:18 2016

By: i386 and AMD64 architectures

I found the apt-mirror command would not replicate the folders for other CPU architectures - ie - installed a 16.10 64 bit system, and it only replicated the binary-amd64 folders. Apt-get update would complain the i386 folders were missing. I had to add

[ arch=amd64 ]

to the subscribing clients sources.list files.

 

 

By: jhebert

Hi! I have followed this process all the way through and am working on keeping a couple virtual servers up to date via a virtual lan switch. When I pull an "apt update" from the target machine I get the following:

Ign http://192.168.0.10 jessie InRelease

Ign http://192.168.0.10 jessie Release.gpg

Ign http://192.168.0.10 jessie Release

Err http://192.168.0.10 jessie/main i386 Packages 404 Not Found

Err http://192.168.0.10 jessie/contrib i386 Packages 404 Not Found

Err http://192.168.0.10 jessie/non-free i386 Packages 404 Not Found

Ign http://192.168.0.10 jessie/contrib Translation-en_US

Ign http://192.168.0.10 jessie/contrib Translation-en

Ign http://192.168.0.10 jessie/main Translation-en_US

Ign http://192.168.0.10 jessie/main Translation-en

Ign http://192.168.0.10 jessie/non-free Translation-en_US

Ign http://192.168.0.10 jessie/non-free Translation-en

W: Failed to fetch http://192.168.0.10/debian/dists/jessie/main/binary-i36/Packages 404 Not Found

W: Failed to fetch http://192.168.0.10/debian/dists/jessie/contrib/binary-i36/Packages 404 Not Found

W: Failed to fetch http://192.168.0.10/debian/dists/jessie/non-free/binary-i36/Packages 404 Not Found

E: Some index files failed to download they have been ignored, or old ones used instead.

 

Any suggestions would be very helpful!

By: sneha

Hey, how can I use https. How to use private IP for that purpose.

By: brun0

dpkg --remove-architecture i386

 

By: Adam Felson

I run ubuntu.  In order to mirror multiple repositories, I have one link, in /var/www/html:

lrwxrwxrwx 1 root root  28 Dec 29 11:52 mirror -> /var/spool/apt-mirror/mirror

I then updated the sources.list on my mirror user to be of the form: deb http://package-cache/mirror/archive.ubuntu.com/ubuntu/ disco restricted mainwhere package-cache is the hostname of my mirror.

I did a search and replace in sources.list to change http:// to http://package-cache/mirror/

An example of a non-ubuntu repo after the substitution is:

deb http://package-cache/mirror/apt.mopidy.com/ buster main contrib non-free