Impossible de mettre les machines virtuel à l’heure indépendamment de votre dom0 ?
Le serveur physique qui héberge votre machine virtuel n’est pas à l’heure ?
Le serveur domO qui héberge votre DomU est au antipode ou au USA et vous souhaitez avoir l’heure française ?

Ajouter :

xen.independent_wallclock = <span style="color: #000000;">1</span>

au fichier /etc/sysctl.conf. Puis lancer la commande suivante

sysctl -p

Reconfigurer la zone de fuseau horaire en choisissant Europe / Paris

dpkg-reconfigure tzdata

Relancer ntpdate

ntpdate fr.pool.ntp.org

Et voila

 

Suite à mes articles sur la configuration eZ publish pour l’utilisation des caches web, sur l’optimisation des reverse proxy squid j’ai tenté de faire la démonstration de l’intérêt de l’ optimisation web cache et des performance des reverses proxys. Je vais apporter quelques preuve de plus dans cet article.

Tenir les versions des logiciels à jours

L’optimisation de ces web cache et la performance des reverses proxys passe tout simplement pas la mise à jour régulière du système et des logiciels. Dans l’exemple ci dessous le gains de performance est flagrant entre une configuration Debian Sarge avec Squid 2.5 et une configuration Debian Etch avec Squid 2.6. Au mois d’octobre 2008 le taux d’utilisation du cpu par le système à chuté, un goulot d’étranglement à été supprimé.

Squid de Sarge a Etch

Soigner la configuration eZ et apache pour squid

Suite à la mort de Michael Jackson Gala.fr et principalement Voici.fr ont connu un très fort pic de charge. Durant cette épisode d’audience intense nous avons poussé en production différente optimisation que nous avions précédemment préparé. Ces optimisations porte sur la configuration de eZ Publish 4 et de Apache pour l’utilisation des caches web. L’effet principale étant obtenue en allongeant le temps de rétentions des images et en instaurant la compression pour les fichiers css et javascript.

Squid Modif conf

Affiner la configuration système des serveurs squid

Une configuration optimum des squid passe également par une adaptation du système à leur mission de reverse proxy tel que nous l’avons réalisé récemment. Le résultat est la et guère discutable pour un charge CPU légèrement supérieur nous desservons plus de client et stockons plus d’objet ce qui conduit à une plus faible sollicitation des frontaux.

Squid.Cpu.Utilisation.png
Squid.Number.Of.Client.png
Squid.Nombre.Objet.Cache.png

 

Si la gestion de cache web est pour vous une notion vague je vous invite à lire cette excellente documentation de Mark Nottingham en français.

J’ai appliqué les techniques d’optimisation un site web pour les caches web dont je parlais dans un billet précédent à mon propre blog propulsé par Dotclear 2.

Dans mon cas l’hébergement est réalisé sur un serveur Debian Lenny avec les briques suivante

  • Apache 2.2.9
  • Php5 5.2.11
  • Mysql 5.0.75

Dotclear 2 déjà optimisé

DC2 comporte déjà des optimisations pour la mise en cache des pages générées par l’application. Si vous étudier les header HTTP d’un dotclear fraichement installé avec un outil comme firebug pour firefox ou les outils développeur web de Safari ou Chrome vous pourrez en faire la constatation.

En effet DC2 utilise le framework clearbricks qui comporte quelque fonction, entre autre dans la lib php suivante

<span style="color: #000000; font-weight: bold;">/</span>dotclear<span style="color: #000000; font-weight: bold;">/</span>inc<span style="color: #000000; font-weight: bold;">/</span>clearbricks<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>lib.http.php

Les lignes, 207 a 210 de ce fichier génère les headers HTTP d’instruction de mise en cache. Personnellement souhaitant maitrisé les hearder depuis mon vhost apache j’ai mis en commentaire la ligne 209.

<span style="color: #000000;">207</span> <span style="color: #808080; font-style: italic;"># Common headers list</span> <span style="color: #000000;">208</span> <span style="color: #007800;">$headers</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> = <span style="color: #ff0000;">'Last-Modified: '</span>.gmdate<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'D, d M Y H:i:s'</span>,<span style="color: #007800;">$ts</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #ff0000;">' GMT'</span>; <span style="color: #000000;">209</span> <span style="color: #808080; font-style: italic;"># $headers[] = 'Cache-Control: must-revalidate, max-age='.abs((integer) self::$cache_max_age);</span> <span style="color: #000000;">210</span> <span style="color: #007800;">$headers</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> = <span style="color: #ff0000;">'Pragma:'</span>;

Vhost apache, interdir les .htacess

Comme je l’expliquais dans un commentaire htaccess est un tueur de performance pour le site à forte audience. Ceci n’est pas le cas de mon blog, dommage, mais je garde la bonne pratique de bloquer l’utilisation des htaccess dans mon vhost avec la directive AllowOverride None.

&lt;Directory /home/karles/public_html/&gt;            <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">FollowSymLinks</span>             <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">None</span>         &lt;/Directory&gt;

mod_deflate, régime pour les fichiers texte

Le mod_deflate est le module apache apportant les fonctions de compression des fichiers avant leur distribution. L’installer est des plus facile

a2enmod deflate <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache stop <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache start

Sous apache2 l’antique Mod_gzip à fait la place au mod_deflate bien moins compliqué dans sa configuration. J’ai fais le choix de compresser les fichier qui sont sous forme de texte. C’est à dire les fichiers xml, css et javascript.

&lt;IfModule mod_deflate.c&gt;             &lt;Location /&gt;                 AddOutputFilterByType DEFLATE text/xml                 AddOutputFilterByType DEFLATE text/css                 AddOutputFilterByType DEFLATE text/javascript                 AddOutputFilterByType DEFLATE text/html                 AddOutputFilterByType DEFLATE text/plain                 AddOutputFilterByType DEFLATE application/xml                 AddOutputFilterByType DEFLATE application/xhtml+xml                 AddOutputFilterByType DEFLATE application/rss+xml                 AddOutputFilterByType DEFLATE application/javascript                 AddOutputFilterByType DEFLATE application/x-javascript &nbsp;                 SetOutputFilter DEFLATE &nbsp;                 <span style="color: #adadad; font-style: italic;"># Make sure proxies don't deliver the wrong content</span>                 <span style="color: #00007f;">Header</span> append Vary User-Agent env=!dont-vary             &lt;/Location&gt;         &lt;/<span style="color: #00007f;">IfModule</span>

Attention, l’utilisation du mod_deflate avec la ligne d’instruction Header append Vary User-Agent env=!dont-vary impose d’avoir le module mod_headers et le module mod_setenvif d’activé.

mod_expires, mise en cache

le mod_expires est tout aussi facile à installé que le mod_deflate. J’ai fait le choix de tout mettre en cache au minimum 30 secondes, Le contenue html restera valide deux minutes avant qu’une nouvelle interrogation de mon serveur soit nécessaire. La mise en page avec les fichiers javascript et css j’autorise une semaine de mise en cache. Quand aux images, plus lourde et moins volatile c’est carrément un mois de validité que je souhaite.

&lt;IfModule mod_expires.c&gt;                 <span style="color: #00007f;">ExpiresActive</span> <span style="color: #0000ff;">on</span>                 <span style="color: #00007f;">ExpiresDefault</span> <span style="color: #7f007f;">&quot;access plus 30 seconds&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> text/html <span style="color: #7f007f;">&quot;access plus 120 seconds&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> text/css <span style="color: #7f007f;">&quot;access 1 weeks&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> text/javascript <span style="color: #7f007f;">&quot;access 1 weeks&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> application/x-javascript <span style="color: #7f007f;">&quot;access 1 weeks&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> application/javascript <span style="color: #7f007f;">&quot;access 1 weeks&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> image/gif <span style="color: #7f007f;">&quot;access 1 months&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> image/jpeg <span style="color: #7f007f;">&quot;access 1 months&quot;</span>                 <span style="color: #00007f;">ExpiresByType</span> image/png <span style="color: #7f007f;">&quot;access 1 months&quot;</span>         &lt;/IfModule&gt;

Conclusion

Si vous ajouter à ces technique celle d’optimisation des images pour l’accélération d’un site web vous allez sensiblement accélérer l’affichage de votre blog et par la même son référencement.

Vous pouvez également consulté la documentation du chaosklub en trois partie (1 2 3 ) qui s’attaque au même chantier mais de façon moins performante à mes yeux car utilisant les .htaccess et des scripts php de configuration des headers. Cette approche est nécessaire dans le cas ou vous le maitrisé par votre hébergement.

 

Une architecture de reverse proxy et après ?

Vous avez configuré votre application pour tirer partie le mieux possible des possibilités offertes par les caches web comme nous l’avons fait dans notre utilisation de eZ Publish pour les sites web du groupe Prisma-Presse.

Mais après cette optimisation ? Kathryl a publié un billet sur l’optimisation des performances de SQUID utilisé en reverse proxy. Il ce base sur notre expérience commune dans la gestion de l’hébergement des sites web du groupe Prisma Presse. Les sites à très forte audience comme Voici.fr, Gala.fr, Femmeactuelle.fr bénéficie des optimisations qu’il présente dans sa documentation.

J’ai souhaité ajouter quelques précisions sur le sujet et expliquer comment vous arrivions à répondre a 92,23% des requêtes HTTP avec nos reverses proxys comme je l’avais annoncé dans un commentaire sur un billet précédent. Kathryl et moi versons parfois dans la bataille d’expert mais c’est par ce jeu de confrontation technique que nous avons trouvé des solutions aux défis qui ce présentaient à nous. Le principal de ces défis relevé est d’avoir trouvé comment soutenir l’audience montante des site du groupe sans la moindre aquisition de matériel depuis un an, mais ceci fera l’objet d’un billet sur le cost killing dans le web hosting.

L’OS : Debian Lenny 64bits

Pourquoi le 64Bits ? Parce que nous recherchons les performance et que c’est l’architecture qui offre la possibilité d’affectation d’un gros volume de mémoire à un même processus. Dans la cas présent nos services squid joues avec plus de 3Go rien que pour le cache mémoire je pense que c’était indispensable.

Gestion de la mémoire RAM avec Squid

La FAQ de squid proxy est très claire au sujet de la mémoire. Plus squid est configuré avec un stockage disque important via la directive cache_dir plus il aura besoin de mémoire pour en ordonné l’utilisation. Mais en outre plus vous allouez d’espace de mémoire pour squid via la directive cache_mem plus squid aura besoin de mémoire vive, en dehors du quota alloué par cette directive, pour ordonner la aussi les objets stocker dans ce cache.

En résumé plus vous allouez de mémoire de cache, en RAM ou sur Disque, plus vous devez prévoir de mémoire vivre à la disposition de l’application.

Kathryl dans son billet propose un rapport de 1 à 4 entre la mémoire cache alloué via la directive cache_mem et la mémoire RAM total disponible. Le rapport n’est que de 1 à 1,3 actuellement en production sur l’étage reverse proxy. Dans tout les cas surveiller bien que la machine n’utilise pas le swap dans le cas contraire les ralentissements arrivent et vous avez tout faux, il faut revoir vos valeurs. Nous avions fait cette erreur d’allouer trop de mémoire via la directive cache_mem et nous avons ralentis nos reverse proxys du fait de l’utilisation du swap.

Taille des objets en cache mémoire

Kathryl avance la question suivante a la quelle je souscris totalement: En quoi est il pertinent d’accepté en mémoire cache RAM des objets volumineux ? Dans le cas des sites qui nous occupe cela n’a pas d’utilité le réglage du backoffice assurant de ne pas avoir des objets trop gros dans le storage de l’application. Dans notre cas nous avons limité la taille des objets présent dans la mémoire vive de cache pour les cantonner au cache disque via la directive maximum_object_size_in_memory. Vous pouvez aussi via la directive maximum_object_size limité en disque également la taille des objets

Si vous diffusez des objets volumineux comme des pdf ou des archives zip il est intéressant d’accepter de relativement gros objets dans votre cache. Dans tout les cas ne pas négligé ces paramètres, il vous permettrons de mettre en évidence la présence de gros objet sur votre site si vous les refuser car vos frontaux web seront sollicité directement ou au contraire vous offrirons la solution pour leur diffusion.

Espace de cache disque

Dans le cas de notre architecture reverse proxy nous avons fait les choix suivant pour l’accueil de l’espace disque alloué avec la directive cache_dir :

  1. Un filesystem dédié
  2. Ext2 pour évité les opérations de journalisation et gagné quelque I/O
  3. Un volume de 15Go pour une occupation de 12Go soit 80%
  4. option noatime dans /etc/fstab

Si vous disposez d’un gros disque SSD je vous invite à l’utiliser dans ce cadre, personnellement je rêve de voir les performances possible. De même si vous avez la possibilité de raid0 sur un paquet de disque rapide ne vous privez par surtout. Je vous recommande la lecture de la documentation squid cache disk io performance enhancements qui vous apportera beaucoup d’information. Le benchmark de FileSystem suivant vous apportera quelque informations. Personnellement je préfère la solution ext2 à tout autre. Attention Kathryl est mono-maniac de XFS mais cela tiens, je pense à ces habitues de feignant consistant à faire de dump pour migré ces données :)

Les logs

Comme le souligne Kathryl lorsque l’on fait très forte audience, les logs par leur écriture ralentisse les serveurs (apache ou squid). Personnellement si je le pouvais je les désactiverais complètement et constamment. Dans quelque cas nous avons trouvé avec cette solution la bouffé d’air frais pour re-stabilisé une architecture ou répondre ponctuellement à une surcharge. Mais, bon, c’est mal et juridiquement interdit car il y a une obligation légale de fournir aux autorités sur présentation d’une réquisition judiciaire les ip des internautes visiteurs.

Il vous reste à étudier

Méthode de cache de Squid

Liser les préconisations de Kathryl sur le sujet, il à un préférence pour DISKD. Nous utilisons UFS en production . Je découvre le passage sur les méthode de cache disque de la documentation de Funkywizard qui lui préfère COSS

Connexions

Kathryl est partisans du « lâché moi la jambe ». Les serveurs de cache ne sont pas la pour garder des sockets ouverts trop longtemps. Il préconise de refuser les connections persistantes. C’est un chose que nous n’avons pas testé plus en avant.

 

Vous souhaiter utiliser un système Debian mixte qui combinerais des paquets Stable / Oldstable ou Stable / Testing. ? Personnellement je souhaitais installer une version récente de Fail2ban sur un serveur tournant avec une Debian Etch[1]. Pour des raisons de maintenance pas question de faire une installation depuis les sources. J’ai donc souhaité installer le paquet Fail2ban de Debian Lenny [2] sur cette Debian Etch.

APT::Default-Release

Pour ceci il est nécessaire de configurer Apt pour définir votre version principale de Debian. Ceci passe par l’ajout d’un paramètre dans l’arborescence de configuration de APT.

Créé un fichier 01Default-Release. Préfix en 01 pour qu’il soit charger dans les premiers

vi etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> apt.conf.d<span style="color: #000000; font-weight: bold;">/</span>01Default-Release

Ajouter l’instruction suivante dans le fichier 01Default-Release pour que la version principale de Debian reste en Oldstable / Etch

APT::Default-Release <span style="color: #ff0000;">&quot;oldstable&quot;</span>;

Dans la branche /etc/apt/apt.conf.d/ vous avez maintenant les fichiers suivant

<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dweb2 <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> apt.conf.d<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dweb2 <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>apt.conf.d<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> -l total <span style="color: #000000;">16</span> -rw-r--r-- <span style="color: #000000;">1</span> root root  <span style="color: #000000;">40</span> <span style="color: #000000;">2007</span><span style="color: #000000;">-04</span><span style="color: #000000;">-10</span> <span style="color: #000000;">11</span>:<span style="color: #000000;">45</span> 00trustcdrom -rw-r--r-- <span style="color: #000000;">1</span> root root  <span style="color: #000000;">34</span> <span style="color: #000000;">2009</span><span style="color: #000000;">-09</span><span style="color: #000000;">-16</span> <span style="color: #000000;">11</span>:<span style="color: #000000;">25</span> 01Default-Release -rw-r--r-- <span style="color: #000000;">1</span> root root <span style="color: #000000;">182</span> <span style="color: #000000;">2009</span><span style="color: #000000;">-09</span><span style="color: #000000;">-16</span> <span style="color: #000000;">11</span>:<span style="color: #000000;">21</span> 70debconf

Reste à modifier le source.list de apt en ajoutant le dépot main de lenny en plus de celuis de etch.

deb <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> etch main deb-src <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> etch main &nbsp; deb http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> etch<span style="color: #000000; font-weight: bold;">/</span>updates main deb-src http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> etch<span style="color: #000000; font-weight: bold;">/</span>updates main &nbsp; deb <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> lenny main contrib non-<span style="color: #c20cb9; font-weight: bold;">free</span>

Une mise à jour des paquets disponible s’impose avec un apt-get update.

<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dweb2 <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #7a0874; font-weight: bold;">&#93;</span> apt-get update Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch Release.gpg Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny Release.gpg Réception de : <span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch Release <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">67</span>,8kB<span style="color: #7a0874; font-weight: bold;">&#93;</span> Réception de : <span style="color: #000000;">2</span> http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates Release.gpg <span style="color: #7a0874; font-weight: bold;">&#91;</span>835B<span style="color: #7a0874; font-weight: bold;">&#93;</span> Atteint http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates Release Réception de : <span style="color: #000000;">3</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny Release <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">73</span>,6kB<span style="color: #7a0874; font-weight: bold;">&#93;</span> Réception de : <span style="color: #000000;">4</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">5</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Sources<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Sources<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Packages Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Sources Réception de : <span style="color: #000000;">6</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">7</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>contrib Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>contrib Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">8</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>non-<span style="color: #c20cb9; font-weight: bold;">free</span> Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>non-<span style="color: #c20cb9; font-weight: bold;">free</span> Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main Packages Ign http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Sources<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>contrib Packages Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>non-<span style="color: #c20cb9; font-weight: bold;">free</span> Packages Atteint http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Packages Atteint http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Sources 141ko réceptionnés en 0s <span style="color: #7a0874; font-weight: bold;">&#40;</span>1380ko<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> Lecture des listes de paquets... Erreur <span style="color: #000000; font-weight: bold;">!</span> E: Dynamic MMap ran out of room E: Erreur apparue lors <span style="color: #c20cb9; font-weight: bold;">du</span> traitement de tcptraceroute <span style="color: #7a0874; font-weight: bold;">&#40;</span>NewVersion2<span style="color: #7a0874; font-weight: bold;">&#41;</span> E: Problem with MergeList <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>lists<span style="color: #000000; font-weight: bold;">/</span>mir1.ovh.net_debian_dists_lenny_main_binary-i386_Packages E: Les listes de paquets ou le fichier « status » ne peuvent être analysés ou lus.

APT::Cache-Limit

ZUT !
le message d’erreur final indique un manque d’espace de cache. Nous allons donc configuré apt et luis augmenter son espace de travail. Pour cela on autre comme précédemment un fichier dans l’arborescence de configuration de APT.

vi etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> apt.conf.d<span style="color: #000000; font-weight: bold;">/</span>02Cache-Limit

On ajoute le paramètre Cache-Limit sur l’exemple suivant

APT::Cache-Limit <span style="color: #000000;">20000000</span>;<span style="color: #ff0000;">&quot;;</span>

La mise à jour des paquets disponible s’impose toujours avec un apt-get update.

<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dweb2 ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> apt-get update Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch Release.gpg Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny Release.gpg Réception de : <span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch Release <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">67</span>,8kB<span style="color: #7a0874; font-weight: bold;">&#93;</span> Réception de : <span style="color: #000000;">2</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny Release <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">73</span>,6kB<span style="color: #7a0874; font-weight: bold;">&#93;</span> Réception de : <span style="color: #000000;">3</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">4</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Sources<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Sources<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">5</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">6</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>contrib Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>contrib Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Réception de : <span style="color: #000000;">7</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>non-<span style="color: #c20cb9; font-weight: bold;">free</span> Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>non-<span style="color: #c20cb9; font-weight: bold;">free</span> Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Packages Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net etch<span style="color: #000000; font-weight: bold;">/</span>main Sources Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main Packages Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>contrib Packages Atteint <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>non-<span style="color: #c20cb9; font-weight: bold;">free</span> Packages Réception de : <span style="color: #000000;">8</span> http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates Release.gpg <span style="color: #7a0874; font-weight: bold;">&#91;</span>835B<span style="color: #7a0874; font-weight: bold;">&#93;</span> Atteint http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates Release Ign http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Packages<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Ign http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Sources<span style="color: #000000; font-weight: bold;">/</span>DiffIndex Atteint http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Packages Atteint http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org etch<span style="color: #000000; font-weight: bold;">/</span>updates<span style="color: #000000; font-weight: bold;">/</span>main Sources 141ko réceptionnés en 0s <span style="color: #7a0874; font-weight: bold;">&#40;</span>546ko<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> Lecture des listes de paquets... Fait <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dweb2 ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>

apt-get install -t stable

Par de soucis cette fois
Dans la foulé on installe la version de fail2ban provenant du déport Debian stable avec la commande suivante qui précise par le -t la version à utiliser.

apt-get <span style="color: #c20cb9; font-weight: bold;">install</span> -t stable fail2ban

En vrais cela donne

<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dweb2 <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span> apt-get <span style="color: #c20cb9; font-weight: bold;">install</span> -t stable fail2ban Lecture des listes de paquets... Fait Construction de l<span style="color: #ff0000;">'arbre des dépendances... Fait Les paquets supplémentaires suivants seront installés :   python-central Paquets suggérés :   python-gamin Les paquets suivants seront mis à jour :   fail2ban python-central 2 mis à jour, 0 nouvellement installés, 0 à enlever et 307 non mis à jour. Il est nécessaire de prendre 127ko dans les archives. Après dépaquetage, 188ko d'</span>espace disque supplémentaires seront utilisés. Souhaitez-vous continuer <span style="color: #7a0874; font-weight: bold;">&#91;</span>O<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span> ? o Réception de : <span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main python-central <span style="color: #000000;">0.6</span><span style="color: #000000;">.8</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">40</span>,4kB<span style="color: #7a0874; font-weight: bold;">&#93;</span> Réception de : <span style="color: #000000;">2</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>mir1.ovh.net lenny<span style="color: #000000; font-weight: bold;">/</span>main fail2ban <span style="color: #000000;">0.8</span><span style="color: #000000;">.3</span>-2sid1 <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">86</span>,2kB<span style="color: #7a0874; font-weight: bold;">&#93;</span> 127ko réceptionnés en 0s <span style="color: #7a0874; font-weight: bold;">&#40;</span>486ko<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Lecture de la base de données... <span style="color: #000000;">32770</span> fichiers et répertoires déjà <span style="color: #c20cb9; font-weight: bold;">install</span>és.<span style="color: #7a0874; font-weight: bold;">&#41;</span> Préparation <span style="color: #c20cb9; font-weight: bold;">du</span> remplacement de python-central <span style="color: #000000;">0.5</span><span style="color: #000000;">.12</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>en utilisant ...<span style="color: #000000; font-weight: bold;">/</span>python-central_0<span style="color: #000000;">.6</span>.8_all.deb<span style="color: #7a0874; font-weight: bold;">&#41;</span> ... Dépaquetage de la mise à jour de python-central ... Préparation <span style="color: #c20cb9; font-weight: bold;">du</span> remplacement de fail2ban <span style="color: #000000;">0.7</span><span style="color: #000000;">.5</span>-2etch1 <span style="color: #7a0874; font-weight: bold;">&#40;</span>en utilisant ...<span style="color: #000000; font-weight: bold;">/</span>fail2ban_0<span style="color: #000000;">.8</span><span style="color: #000000;">.3</span>-2sid1_all.deb<span style="color: #7a0874; font-weight: bold;">&#41;</span> ... Dépaquetage de la mise à jour de fail2ban ... Paramétrage de python-central <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.6</span><span style="color: #000000;">.8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ... &nbsp; Paramétrage de fail2ban <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span><span style="color: #000000;">.3</span>-2sid1<span style="color: #7a0874; font-weight: bold;">&#41;</span> ...

Voila tout baigne, fail2ban est installé depuis le depot lenny.

A lire également chez d’autre

Notes

[1] Version Oldstable depuis le 14 février 2009

[2] la version stable courante depuis le 14 février 2009

© 2012 Karlesnine Suffusion theme by Sayontan Sinha