Jun 052009
 

Sponsored Link

Approx is an HTTP-based Debian archive server.  It fetches packages from remote repositories on demand, and caches them for local use.

Approx saves time and network bandwidth if you need to install or upgrade Debian software for a number of machines on a local network.  Each package is downloaded from a remote site only once, regardless of how many local clients install it.  The approx cache typically requires a few gigabytes of disk space.

Approx also simplifies the administration of client machines: repository locations need only be changed in approx's configuration file, not in every client's /etc/apt/sources.list file.

Install approx in debian

#apt-get install approx

Configuring approx Server

You need to edit /etc/approx/approx.conf file

#vi /etc/approx/approx.conf

Make you you have similar to the following options

interval 120
max_wait 10
debian          http://http.uk.debian.org/debian
security        http://security.debian.org/debian-security
non-us        http://non-us.debian.org/debian-non-US

Save and exit the file

Now restart approx server using the following command

#/etc/init.d/approx restart

Clients Configuration

edit /etc/hosts to set localproxy to the IP address of your approx server

#vi /etc/hosts

add your approx server ip and name

172.30.8.3 approx-server

Save and exit the file

Then edit /etc/apt/sources.list to work via your approx server

#vi /etc/apt/sources.list

add following lines

deb http://approx-server:9999/debian stable main non-free contrib
deb-src http://approx-server:9999/debian etch main non-free contrib
deb http://approx-server:9999/security stable/updates main non-free contrib
deb-src http://approx-server:9999/security etch/updates main contrib non-free
deb http://approx-server:9999/non-us stable main non-free contrib

save and exit

Now run the following command to start upgrade

#apt-get update

Initially you may get time-out problems: Try again if you need to. After the first run, subsequent runs should be much faster.

Sponsored Link

 Posted by at 12:56 am
  • softwareregisterac

    Hi

    I’m a newbie, trying to learn and find your web-site is a gold mine of
    info. For people like it’s a great resource.

    I have a few questions regarding approx.

    I configured both my systems according to your tutorial. But I still see
    that the whenever I try to install something on my client. I see that
    the client is going through the proxy but downloading from the ftp site instead of from the archives in the cache on my server.

    Could you please help me in figuring out what mistake I’m doing.

    Will be very obliged.

    Thanks