Local Ubuntu Mirror Notes

My notes on configuring a local repository for Ubuntu that hosts on private internal LAN will use to update packages. I installed apt-mirror package on the "master" server. Also a proxy server is in place to protect the LAN.

apache conf file for sharing

Listen 192.168.0.64:8888

  DocumentRoot /storage/aptmirror/repo/mirror
  ErrorLog /var/log/apache2/aptmirror/error_log
  CustomLog /var/log/apache2/aptmirror/access_log common

Environment Variables - /etc/profile

export no_proxy="master"
export http_proxy="http://proxy.domain.com:8080"
export https_proxy="http://proxy.domain.com:8080"
export ftp_proxy="http://proxy.domain.com:8080"

add keys for installing packages

gpg --keyserver keyserver.ubuntu.com --keyserver-option http-proxy --recv 2EBC26B60C5A2783
gpg --export --armor 0C5A2783 | sudo apt-key add -

gpg --keyserver keyserver.ubuntu.com --keyserver-option http-proxy --recv 327574EE02A818DD
gpg --export --armor 327574EE02A818DD | sudo apt-key add -

apt-mirror config file mirror.list on master

deb http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu lucid partner
deb http://packages.medibuntu.org/ lucid free non-free
deb http://archive.cloudera.com/debian lucid-cdh3 contrib

sources.list config file on master

deb file:/storage/aptmirror/repo/mirror/archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb file:/storage/aptmirror/repo/mirror/archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb file:/storage/aptmirror/repo/mirror/archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
deb file:/storage/aptmirror/repo/mirror/archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse
deb file:/storage/aptmirror/repo/mirror/archive.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse
deb file:/storage/aptmirror/repo/mirror/archive.canonical.com/ubuntu lucid partner
deb file:/storage/aptmirror/repo/mirror/packages.medibuntu.org/ lucid free non-free
deb file:/storage/aptmirror/repo/mirror/archive.cloudera.com/debian lucid-cdh3 contrib

sources.list config file on slaves

deb http://master:8888/archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb http://master:8888/archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb http://master:8888/archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
deb http://master:8888/archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse
deb http://master:8888/archive.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse
deb http://master:8888/archive.canonical.com/ubuntu lucid partner
deb http://master:8888/packages.medibuntu.org/ lucid free non-free
deb http://master:8888/archive.cloudera.com/debian lucid-cdh3 contrib