Using the mirror disk with an Out-Of-the-Box Ubuntu Precise

  1. 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.

  2. 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 -

  3. root@justinstalled:/# cp /srv/scaramanga-itself/local-ubuntu-precise.list /etc/apt/sources.list.d/

  4. 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)

  5. root@justinstalled:/# apt-get update
    root@justinstalled:/# apt-get install scaramanga

    This will also install apache2 and rsync

  6. root@justinstalled:/# service restart apache2
    root@justinstalled:/# service restart rsync

  7. 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