ServersUpgrading Multiple Machines With approx

Upgrading Multiple Machines With approx

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.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories