Setting up apt-cacher on Ubuntu 10.04

On repository server:

  1. Download:
    apt-get install apt-cacher apache2
  2. Get it to auto-start by editing /etc/default/apt-cacher and change autostart to 1
  3. Modify any config options in /etc/apt-cacher/apt-cacher/conf (not required)
  4. Restart apt-cacher – this will create the log files
    /etc/init.d/apt-cacher restart
  5. Import any existing apt-get cache (not sure exactly what this is for, but the documentation mentions it)
    /usr/share/apt-cacher/ -s /var/cache/apt/archives

On client server:

  1. Modify the sources list at /etc/apt/sources.list, like so:
    cp /etc/apt/sources.list /etc/apt/sources.list.bak
    vi /etc/apt/sources.list
  2. Reload the apt list
    apt-get update
  3. Try and install something

Leave a Reply

Your email address will not be published. Required fields are marked *