To use the mirror disk on a freshly installed Ubuntu Precise...
Mount its third partition (will often be /dev/sdc3) under /srv
:
root@justinstalled:/# mount /dev/sdc3 /srv
Much configuration depends on that mount point being correct.
Add the local scaramanga repository to apt
root@justinstalled:/# cp /srv/scaramanga-itself/scaramanga.list /etc/apt/sources.list.d/
root@justinstalled:/# cat /srv/scaramanga-itself/key.deb.rug.nl|apt-key add -
Add the mirror itself to apt
root@justinstalled:/# cp /srv/scaramanga-itself/local-ubuntu-precise.list /etc/apt/sources.list.d/
If no bandwidth, remove other apt sources
If you have limited or no bandwidth to the rest of the world, you may want to remove all http:// entries from all apt sources (including the one in scaramanga.list):
root@justinstalled:/# sudo sed -i.http-still-available.$(date +%s) '/http:/ s%^%# no bandwidth # %g' $(find /tmp/apt -type f -iname \*.list)
Install scaramanga
root@justinstalled:/# apt-get update
root@justinstalled:/# apt-get install scaramanga
This will also install apache2 and rsync
Turn on apache (and rsync)
root@justinstalled:/# service restart apache2
root@justinstalled:/# service restart rsync
Prevent the mirror from syncing
On a classroom mirror, you may not want to sync at night. In that case:
root@justinstalled:/# sed 's%^%#%g' /etc/crond.d/sca-update-mirror