Ceci est une ancienne révision du document !
I've only ever had two computers running Ubuntu, I somehow tolerated the need to download the same packages twice. But, now I'm planning to add one or two more. And it seems such a waste of time and traffic. So, I started looking for a solution, and found the aptcacher program. I have installed it and was rather satisfied with the results… till I upgraded my server machine to Ubuntu 11.04. While apt-cacher was enabled, all my updates were returning errors. So, I started again looking for a solution, and have encountered another deb-package proxy – aptcacher-ng. I have replaced my old package proxy with the new one, and now updates on my second machine take no time at all.
So, what is apt-cacher-ng, and why do you need it? This is the program that caches all your downloaded .deb files, and shares them among all your computers in the LAN - eliminating the need to download the same package again and again.
Below, I will describe the stepby-step procedure I followed to install and configure it in my network.
As a source for the procedure, the tips from the following discussion were used: http://ubuntuforums.org/showthread.php?t=1327179.
I had apt-cacher already installed, so: • I copied all my deb-files stored in the apt-cacher cache (folder - /var/cache/apt-cacher/packages) to a temp folder on my home partition. • removed apt-cacher completely.
If you do not have apt-cacher installed, you'll just skip these two steps as not relevant.
Next, install the apt-cacher-ng package on your server using your preferred package install method.
Start the program. In terminal mode, run the command: sudo /etc/init.d/apt-cacher-ng start
Configure the package routines on your other computers to use apt-cacher-ng as a proxy. There are several approaches to do this. The one that worked for me, and seems to be the simplest, uses the /etc/apt/apt.conf configuration file. Edit this file, or create it if it does not exist. You can use the following command in terminal mode: sudo nano /etc/apt/apt.conf
You can replace nano with the name of your favorite text editor, for example, gedit. Add the following line to the file: Acquire::http { Proxy “http://192.168.2.11:3142”; };
Replace the 192.168.2.11 with the IP Address of your server computer. The same action should be done on each Ubuntu computer in your network.
Next, run the “update” using your package management software. For example, in terminal mode, you can use the following command sudo aptget update
This ensures that the aptcacher-ng builds the package index. Now it will know which packages it should store in the cache.
Actually, at this point the proxy is ready to work, but the cache is empty, and it will take time to populate it with packages. But wait – I have already stored some debfiles just for this moment. So now is a good time to make use of all the deb-files I have saved: • Go to the /var/cache/apt-cacherng folder, and create _import subfolder. • Copy all deb-files stored in your temp home folder to /var/cache/apt-cacher-ng/_import (and delete the temp folder and its contents). • I also have some packages in the local apt caches on both my Ubuntu computers. So I also copied all deb-files from /var/cache/apt/archives on both my computers to the /var/cache/apt-cacher-ng/_import folder on my server computer.
Now it is time to actually run the import process. The program is controlled through a web page. So open http:<IP_address_of_server>:3142 and you will get the page explaining the usage of apt-cacherng, and with the small link “Statistics report and configuration page” in the “Related links” section. Clicking on the link will bring you to: http:<IP_address_of_server>:3142/acngreport.html
Scroll down and click the “Start Import” button. This will open another page detailing the package import process as it goes. It will take some time depending on the number of packages you want to import.
From now on there will be no need to download the same packet several times for different computers. For further reading, you can open the documentation installed with apt-cacher-ng and available through http://localhost/doc/apt-cacherng/html/index.html on your server computer. Note that you will need to change the default configuration of the apache2 server to make the server documentation available on all your LAN computers. To do so: • open the /etc/apache2/sitesenabled/000-default file for editing as root. For example use the following command sudo nano /etc/apache2/sitesenabled/ 000default Replace nano with your favorite text editor if you wish. • Find the section that starts with Alias /doc/ Modify the entry 'Allow from' to give access to all computers in your LAN. For example: Allow from 10.1.0.0/255.255.0.0 will give access to the documentation directory through your apache2 web-server from all IPs in the range 10.1.x.y
I hope this guide will help you set your home network for more efficient use.
Book Review Barefoot into Cyberspace by Becky Hogge Written by Robin Catling
Can we keep the Internet an open, democratic and free tool for the betterment of mankind? Barefoot into Cyberspace tackles this question. Written by a recent guest of ours on the Full Circle Podcast, Becky Hogge is a journalist and former director of the Open Rights Group. In it, Hogge seeks out the radical hackers opposing the old institutions gathering to control the Internet.
Documenting a personal journey into 'hack-tivism,' Hogge begins and ends at the Chaos Computer Club's annual conferences in 2009 and 2010, in the company of four recurring guides; Stewart Brand, Cory Doctorow (author, blogger and copyleft campaigner), Phil Booth of No2ID and Rop Gonggrijp, co-founder of the Dutch ISP XS4ALL. Along the way, Hogge interviews Wikileaks' Julian Assange and Global Voices founder Ethan Zuckerman.
Touching the issues of copyright versus copyleft, personal privacy, the surveillance society, freedom of information, censorship and the commercial takeover of the Internet, this is a study of individualists against institutions, questioning how we might oppose the vested interests of moneyed entities with largely amoral agendas.
You also get the slightly anti-climactic story of how Hogge declined to join Wiki-leaks, albeit in recognition of the commitment it takes to be that kind of activist. This running series of encounters highlights the one weakness of a book that never quite ties together all its themes into one coherent narrative, but you could argue that's how life is, amplified by the disjointing effect of rechnology and the rapid pace of change.
CONT ON PAGE 26…
If you want a grand 60 Minutes-style expose of dark deeds, conspiracy theory and armed insurrection - this won't be the book for you. It's altogether gentler than that. Enjoy the retrospective of the “hacker” movement and origins of the 1970's counter-culture; communes seeking freedom, peace and love, through the early examples of Brand, Stallman, Lessig and the pioneers of the hacker movement, which, remember, is about more than just getting free stuff.
Rop Gonggrijp gets all the best lines - well, they are his lines: “I think most of what we're fighting still today in the world is incompetence. Most of what we’re fighting is stupidity, and maybe a little bit of opportunism. There is also the ominous, control-seeking large corporate interests.“
The cover illustration invokes Alice on the threshold of Wonderland, which chimes with the book's sub-title Adventures in Search of Techno Utopia. Hogge writes with the small, quiet voice of an Everyman, certainly no innocent, but in the spirit of the hacktivists, struggling to navigate foggy and potentially dangerous roads to the neon Utopia we are still promised. Gonggrijp again:
"We come in peace. We’re not called Chaos Computer Club because we cause chaos. If anything, a lot of our collective work has actually prevented chaos by pointing out that maybe we should lay some decent virtual foundations before we build anymore virtual skyscrapers." Barefoot into Cyberspace is available as a download and as a paperback on Amazon.
Barefoot into Cyberspace: Adventures in search of techno-Utopia by BeckyHogge illustrated by Christopher Scally ISBN 978-1-906110-50-5 (print) | 978-1-906110-51-2 (Kindle) Becky Hogge is interviewed in Full Circle Side-Pod Episode Ten: Dancing in Bare Feet