                 	apt-proxy INSTALL

              Chris Halls <chris.halls@gmx.de>

These are manual installation instructions for apt-proxy.  They should only
be necessary if you are trying to install apt-proxy on a non Debian system.

Thanks to Oliver Bornet for providing feedback.  He was able to successfully
run apt-proxy on a RedHat system.

Programs required to run apt-proxy:

    - ash (0.3 or above) or bash.  ash is faster.  If you don't have ash, change
      the first line of apt-proxy from #!/bin/ash to the path to bash on your
      system (probably /bin/bash).

    - wget (if you use http/ftp backends)
    - rsync (if you use rsync backends)

    Optional programs:
    - grep-dctrl (for cache cleaning and optimise transfers with HTTP keep-alive)
    - dpkg (for cache cleaning and to optimise rsync transfers)
    - stat (needs to accept parameters -tl.  Again, improves performance a little)

To set up apt-proxy as a partial mirror, you need to do the following:

1. Copy the apt-proxy script to /usr/local/sbin or somewhere of your
choosing.

2. Create a user for apt-proxy, e.g. aptproxy.

3. Create a logfile owned by the user:

   # touch /var/log/apt-proxy.log
   # chown apt-user /var/log/apt-proxy.log

4. Add a line in /etc/inetd.conf which calls apt-proxy, like so:

 9999 stream tcp nowait.400 aptproxy /usr/sbin/tcpd /usr/local/sbin/apt-proxy /var/log/apt-proxy.log

The final argument is the apt-proxy log file: if not specified, no log is
kept. The `nowait.400' allows up to 400 invocations a minute: the default of
40 is usually not enough for a reasonable size server (and inetd will
disable apt-proxy for 5 minutes when it detects more than this many
connections a minute).

5. Configure apt-proxy (see apt-proxy.conf(5))

6. You will have to make the root cache directory specified in
apt-proxy.conf, and ensure it is writable by the user nominated in
inetd.conf. Once this is done, you are ready to use it.

7. Configure apt clients (see apt-proxy(8))
Note: I do not recommend exposing the apt-proxy to malicious users: if so
you should run it within a chroot jail.

April 2002
