SHARE
Facebook X Pinterest WhatsApp

Upgrading Multiple Machines With approx

Written By
thumbnail Juliet Kemp
Juliet Kemp
Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



If you have multiple Debian machines to administer, approx can
help you get them updated and upgraded more quickly and using less bandwidth.
approx is an archive/proxy server for Debian repositories, fetching
packages on demand and caching them locally. This means that you only have to
grab the package once for your entire local network: after that, other
machines can get it from the approx server.

Tip of the Trade: Multiple Debian machines to administer? approx can help you get them updated and upgraded more quickly, and it uses less bandwidth.

Install the package on the machine you want to use as a server, via
apt-get with sudo apt-get install approx. Once it’s
installed, edit /etc/approx/approx.conf to set your repository names:

debian          http://http.uk.debian.org/debian
security        http://security.debian.org/debian-security
non-us			http://non-us.debian.org/debian-non-US

On your client machine, edit /etc/hosts to set localproxy to the IP address of your server:

10.0.0.3 approx	

Then edit /etc/apt/sources.list to work via the server:

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

Note: you could avoid editing /etc/hosts and just use the name or IP
address of your approx server directly in
/etc/apt/sources.list. Doing it this way means that if you move
the server, you need to edit only a single line in /etc/hosts on each
machine. If you use LDAP or similar for local lookup, even better!

Finally, restart the approx server with /etc/init.d/approx
restart
, and run apt-get update on the client machine. Note
that initially you may get time-out problems: Try again if you need to. After
the first run, subsequent runs should be much faster.

thumbnail Juliet Kemp

Juliet Kemp is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.