Outils pour utilisateurs

Outils du site


issue54:tuto_apt-catcher-ng

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.

Je n'ai jamais eu que deux ordinateurs sous Ubuntu et, d'une manière ou d'une autre, j'acceptais le besoin de télécharger les mêmes paquets deux fois. Maintenant, cependant, j'ai l'intention d'en ajouter deux autres. Et cela me semble un tel gâchis de temps et de bande passante ! J'ai donc commencé à chercher une solution et j'ai trouvé le programme aptcacher. Je l'ai installé et étais assez satisfait des résultats…, jusqu'au moment où j'ai fait une mise à niveau de ma machine serveur vers Ubuntu 11.04. Alors qu'apt-cacher était activé, toutes les mises à jour retournaient des erreurs. Alors, j'ai recommencé à chercher une solution et j'ai rencontré un autre proxy deb-package - aptcacher-ng. J'ai remplacé le vieux proxy paquet avec le nouveau et maintenant les mises à jour sur ma deuxième machine sont très vite faites.

Bien. Qu'est-ce qu'apt-cacher-ng et pourquoi en avez-vous besoin ? C'est le programme qui cache tous les fichiers .deb que vous avez téléchargés et les distribue à tous les ordinateurs dans votre réseau local, ce qui élimine le besoin de télécharger le même paquet maintes et maintes fois.

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.

Je vais décrire ci-dessous ce que j'ai fait, étape par étape, pour l'installer et le configurer sur mon réseau.

Comme source de la procédure, j'ai utilisé les suggestions de la discussion suivante : http://ubuntuforums.org/showthread.php?t=1327179.

Apt-cacher était déjà installé ; j'ai donc : * copié tous les fichiers deb stockés dans le cache d'apt-cacher (folder - /var/cache/apt-cacher/packages) vers un dossier temp sur ma partition home. * désinstallé apt-cacher complètement.

Si vous n'avez pas installé apt-cacher, vous pouvez sauter ces deux étapes, car vous n'êtes pas concerné.

Puis installez le paquet apt-cacher-ng sur votre serveur avec la méthode qui vous convient le mieux.

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

Lancez le programme. Dans un terminal, exécutez la commande : sudo /etc/init.d/apt-cacher-ng start

Configurez les routines paquet sur les autres ordinateurs pour qu'elles utilisent apt-cacher-ng comme proxy. Il y a plusieurs façons de faire ceci. Ce qui a fonctionné pour moi, et qui me semble la plus simple, utilise le fichier de configuration /etc/apt/apt.conf. Éditez ce fichier ou créez-le s'il n'existe pas. Dans le terminal, vous pouvez utiliser la commande suivante : 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.

Vous pouvez remplacer nano par le nom de votre éditeur de texte préféré, par exemple gedit. Ajoutez la ligne suivante au fichier : Acquire::http { Proxy “http://192.168.2.11:3142”; };

Remplacez le 192.168.2.11 par l'adresse IP de votre serveur. Vous devrez faire la même chose sur chaque ordinateur sous Ubuntu, sur votre réseau.

Ensuite, exécutez « update » avec le gestionnaire de paquets. Par exemple, dans un terminal, vous pouvez utiliser la commande suivante : sudo apt-get update

Ceci permet d'être certain que aptcacher-ng crée l'index des paquets. Il saura maintenant quels paquets il faudra stocker dans le 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

En fait, à ce stade, le proxy est prêt à fonctionner, mais le cache est vide et il faudra du temps pour y mettre des paquets. Attendez un peu - j'ai déjà stocké des fichiers deb exprès. Le moment est venu d'utiliser tous les fichiers deb que j'ai sauvegardés. * Allez au dossier /var/cache/apt-cacherng et créez un sous-dossier _import. * Copiez tous les fichiers deb stockés dans le dossier temp de votre partition home vers /var/cache/apt-cacher-ng/_import (puis supprimez le dossier temp et son contenu). * J'ai également des paquets dans les apt caches locaux sur mes deux ordinateurs sous Ubuntu. J'ai donc copié tous les fichiers deb sur les deux ordinateurs à partir de /var/cache/apt/archives vers le dossier /var/cache/apt-cacher-ng/_import sur l'ordinateur serveur.

C'est maintenant le moment de lancer le processus d'importation. Le programme est contrôlé à partir d'une page Web. Ouvrez donc http:<IP_address_of_server>:3142 et vous aurez la page qui explique comment utiliser apt-cacher-ng et qui contient le petit lien « Statistics report and configuration page » (rapport et page de configuration des statistiques) dans la section « Related links » (liens connexes). Si vous cliquez sur le lien, vous arriverez à : 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.

Faites défiler la page vers le bas et cliquez sur le bouton « Start Import » (Commencer l'importation). Cela ouvrira une autre page qui rend compte du processus d'importation des paquets au fur et à mesure. Cela prendra pas mal de temps selon le nombre de paquets à importer.

Et maintenant, vous n'aurez plus besoin de télécharger le même paquet plusieurs fois pour des ordinateurs différents. Pour aller plus loin, vous pouvez ouvrir la documentation installée avec apt-cacher-ng et disponible à http://localhost/doc/apt-cacherng/html/index.html sur votre ordinateur serveur. Remarquez que vous aurez besoin de modifier la configuration par défaut du serveur apache2 pour rendre la documentation disponible sur tous les ordinateurs sur le réseau. Pour ce faire : * Ouvrez le fichier http://localhost/doc/apt-cacherng/html/index.html et éditez-le en tant que root. Vous pouvez, par exemple, utiliser cette commande : sudo nano /etc/apache2/sitesenabled/000default. Vous pouvez, bien entendu, remplacer nano par un autre éditeur de texte, si tel est votre souhait. * Trouvez la section commençant par Alias /doc/ Modifier l'entrée « Allow from » pour permettre à tous les ordinateurs sur votre réseau d'y accéder. Par exemple : « Allow from 10.1.0.0/255.255.0.0 » donnera accès au répertoire de la documentation à toutes les adresses IP dans la tranche 10.1.x.y, en passant par votre serveur-web apache2.

J'espère que ce guide vous aidera à configurer votre réseau domestique pour plus d'efficacité.

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.

Critique de livre « Barefoot into Cyberspace » (Pieds nus dans le cyberespace) de Becky Hogge Écrite par Robin Catling

Sera-t-il possible que l'Internet reste un outil ouvert, démocratique, libre et gratuit pour l'amélioration de l'humanité ? Pieds nus dans le cyberespace étudie cette question. Écrit par une invitée récente sur le Podcast Full Circle, Becky Hogge est journaliste et ancienne directrice du « Open Rights Group ». Dans son livre, Hogge recherche les hackers radicaux qui sont contre les vieilles institutions qui se rassemblent pour contrôler l'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.

Afin de décrire son voyage personnel dans le milieu de l'« hacktivism », Hogge commence et termine aux conférences annuelles du « Chaos Computer Club » en 2009 et 2010, accompagnée de quatre guides récurrents ; Stewart Brand, Cory Doctorow (auteur, bloggeur et militant pour le « copyleft »), Phil Booth de No2ID et Rop Gonggrijp, co-fondateur du ISP XS4ALL hollandais. Sur son chemin, Hogge interviewe Julian Assange de Wikileaks et Ethen Zuckerman, fondateur de Global Voices.

Abordant les questions de « copyright » contre « copy left », la vie privée, la société de surveillance, la liberté d'information, la censure et la prise de contrôle de l'Internet par et pour le commerce, c'est une étude des individualistes contre les institutions qui pose la question de comment s'opposer aux intérêts particuliers des entités bien nanties dont les lignes de conduite sont, pour la plupart, amoraux.

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.

Vous avez droit aussi à l'histoire - qui a perdu un peu de sa charge dramatique - de comment Hogge n'a pas voulu rejoindre Wiki-leaks, même si c'était en reconnaissant le fort engagement qu'il faut pour devenir ce genre de militant. Cette suite continuelle de rencontres met en exergue la seule faiblesse d'un livre qui ne rassemble jamais tout à fait tous ses thèmes dans une seule histoire cohérente, mais vous pourriez faire remarquer que la vie est comme ça, amplifiée par l'effet déstructurant de la technologie et du rythme soutenu des changements.

Suite page 26

Si vous voulez un grand exposé de sombres activités, de la théorie des conspirations et de l'insurrection armée, dans le style de 60 Minutes, alors ce n'est pas un livre pour vous. Il est beaucoup plus doux que cela. Vous bénéficierez d'une rétrospective sur le mouvement « hacker » et les origines de la contre-culture des années 70 ; des gens vivant ensemble en petits groupes à la recherche de la liberté, la paix et l'amour, puis les premiers exemples de Brand, Stallman, Lessig et les pionniers du mouvement hacker qui, il faut s'en souvenir, demandait beaucoup plus que des trucs gratuits.

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

Rop Gonggrijp bénéficie des meilleures phrases - en fait, c'est bien lui qui les a dites : « Je pense que nous nous battons encore aujourd'hui, en majeure partie contre l'incompétence dans ce monde. Nous luttons en majeure partie contre les bêtises et, peut-être, contre un peu d'opportunisme. Il y a aussi les intérêts des grandes entreprises qui cherchent à tout contrôler et ça, c'est inquiétant. »

L'illustration sur la couverture rappelle Alice sur le seuil du Pays des merveilles, ce qui correspond bien au sous-titre du livre « Aventures in Search of Techno Utopia » (À la recherche d'une utopie technologique). La voix littéraire de Hogge est petite et tranquille, celle d'une Mme Tout le monde, certes, pas celle d'une candide, mais dans l'esprit des hacktivistes, qui luttent pour suivre les chemins brumeux et potentiellement dangereux, qui mènent à l'Utopie clinquante que l'on nous promet. Gonggrijp de nouveau : « Nous venons en paix. On ne nous appelle pas le “Chaos Computer Club” parce que nous créons le chaos. En fait, une grande partie de notre travail collectif a évité le chaos en faisant remarquer qu'il faudrait peut-être poser de bonnes fondations virtuelles avant de construire davantage de tours virtuelles. »

Barefoot into Cyberspace est disponible sur Amazon, au téléchargement ou en livre de poche.

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) Il y a un entretien avec Becky Hogge dans l'Épisode dix du Side-Pod Full Circle : Dansant pieds nus.

issue54/tuto_apt-catcher-ng.txt · Dernière modification : 2011/12/22 21:37 de amstram