Common Tasks

Setting Up a Local Apt Mirror


Our school network is behind a firewall that does content filtering on port 80. I'm not sure if this is why, but connections are often dropped when running the update manager or apt-get dist-upgrade. Additionally, we have dozens of computers which we need to update, so we wanted a way to do this faster.


We decided that a local package mirror was the solution to our problem. Here is what we did to create it:

  1. Choose a local machine with a big enough hard drive (ours is 120 Gig).
  2. Install Ubuntu on to this machine using the alternate install disk:
    • create a 1 gig swap partition, a 30 gig root partition, and an 89 gig partition mounted on /opt.

    • modify /etc/apt/sources.list so that it looks like this:

      deb feisty main restricted universe multiverse
      deb feisty-updates main restricted universe multiverse
      deb feisty-backports main restricted universe multiverse
      deb feisty-security main restricted universe multiverse
    • after updating and dist-upgrading, run: apt-get install debmirror apache2

  3. Create the mirror by running the following command:

    debmirror /opt/ubuntu-mirror -nosource -v -m --passive --root=:ubuntu --method=rsync --progress --dist=feisty,feisty-security,feisty-updates,feisty-backports --ignore-release-gpg --section=main,restricted,universe,multiverse --arch=i386,amd64

EdubuntuDocumentation/EdubuntuCookbook/CommonTasks (last edited 2008-06-27 10:15:31 by localhost)