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:
- Choose a local machine with a big enough hard drive (ours is 120 Gig).
- 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 http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu feisty-security main restricted universe multiverse
after updating and dist-upgrading, run: apt-get install debmirror apache2
Create the mirror by running the following command:
debmirror /opt/ubuntu-mirror -nosource -v -m --passive --host=us.archive.ubuntu.com --root=:ubuntu --method=rsync --progress --dist=feisty,feisty-security,feisty-updates,feisty-backports --ignore-release-gpg --section=main,restricted,universe,multiverse --arch=i386,amd64