<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Renoir Boulanger &#187; Linux</title>
	<atom:link href="http://renoirboulanger.com/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://renoirboulanger.com</link>
	<description>Un geek social et Linuxien de nature</description>
	<lastBuildDate>Sun, 29 Apr 2012 20:29:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>devLAB Montréal c&#8217;est maintenant parti!</title>
		<link>http://renoirboulanger.com/blog/2011/02/devlab-montreal-cest-maintenant-parti/</link>
		<comments>http://renoirboulanger.com/blog/2011/02/devlab-montreal-cest-maintenant-parti/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 21:04:31 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[GeekNight]]></category>
		<category><![CDATA[Accessibilité]]></category>
		<category><![CDATA[evenements]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Projets]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[Vulgarisation]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2416</guid>
		<description><![CDATA[devLAB Montréal c&#8217;est maintenant parti!
Geek by *recycledwax on deviantART
Je l&#8217;avait annoncé. Nous avons particié a des événements, joints d&#8217;autres. Maintenant, depuis Janvier 2011, à tous les mercredis, nous vous invitons a vous joindre a nos rencontres. Donc,depuis cinq semaines maintenant nous hébergeons au public nos ateliers de travail qu&#8217;on appelait nos GeekNights maintenant surnommé devLAB.
Comment devLAB a commencé?
Tout [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2011/02/devlab-montreal-cest-maintenant-parti/' class='retweet '  style='display:block;margin:10px 0px;' >devLAB Montréal c&#8217;est maintenant parti!</a><div style="float: right; margin: 0px 0px 5px 5px; background: #e4eae4padding;"><img class="alignleft size-full wp-image-2434" style="border: none;" title="Geek_by_recycledwax_on_DeviantArt" src="http://renoirboulanger.com/wp-content/uploads/2011/01/Geek_by_recycledwax_on_DeviantArt.png" border="0" alt="Geek by recycledwax on DeviantArt" width="321" height="414" /><br />
<a href="http://www.deviantart.com/deviation/91362367/">Geek</a> by *<a class="u" href="http://recycledwax.deviantart.com/">recycledwax</a> on <a href="http://www.deviantart.com">deviant</a><a href="http://www.deviantart.com">ART</a></div>
<p>Je l&#8217;avait <a href="http://renoirboulanger.com/blog/2010/03/introduction-de-notre-nouveau-projet-evenement-intitule-devlab/">annoncé</a>. Nous avons <a href="http://renoirboulanger.com/blog/2010/06/retour-sur-la-semaine-des-logiciels-libres-mondev-et-de-la-conference-make-web-not-war-2010/">particié a des événements</a>, <a title="WordCamp WordPress developper_meetup()" href="http://wordcampmontreal.org/">joints</a> <a title="ConFoo Web Techno Conference" href="http://renoirboulanger.com/blog/2010/09/lancement-de-lannee-2011-pour-la-conference-confoo/">d&#8217;autres</a>. Maintenant, depuis Janvier 2011, <strong>à tous les mercredis</strong>, nous vous invitons a vous joindre a nos rencontres. Donc,depuis cinq semaines maintenant nous hébergeons au public nos ateliers de travail qu&#8217;on appelait nos <a title="Quelques billets qui parlent de ces soirées de GeekNights" href="http://renoirboulanger.com/blog/category/geeknight/">GeekNights</a> maintenant surnommé <a href="http://devlabmtl.org">devLAB</a>.</p>
<h3>Comment devLAB a commencé?</h3>
<p>Tout a commencé en 2006. Le besoin est né après plusieurs mois à discuter de technologie a deux (avec <a href="http://etiennelachance.com">Etienne</a>) a prendre une bière au 3Brasseurs et de parler de binaire, netmask&#8230; vous savez, des trucs de Geeks. Nous avons joins notre  vieil ami <a href="http://stephanchampagne.com/">Stephan</a> et nous avons officialisé le pacte que nous avons tenu de 2006-2009. Une fois par semaine tous les Mercredis soir nous suivions ce concept:</p>
<ol>
<li>Se rencontrer peu importe la charge de travail au bureau</li>
<li>Faire avancer une idée</li>
<li>Utiliser quelque chose qu&#8217;on a jamais utilisé avant</li>
<li>Pratiquer les méthodologies pour prendre les plis qu&#8217;on ne pouvait pas toujours prendre au bureau</li>
</ol>
<p>Parfois nous en faisions des CodeFests qui duraient une fin de semaine complète. D&#8217;autres fois nous invitions des amis a jouer avec nous sur des sujets divers.</p>
<p><span id="more-2416"></span></p>
<h3>Quelques sujets que nous avons couverts</h3>
<p>Nous discutions d&#8217;a peu près tout ce qui nous tentait. Parfois nous étions inspirés par ce que nous faisions au bureau, d&#8217;autres fois, des amis venaient nous montrer leus trucs qui les &#8220;faisaient tripper&#8221;  (!)</p>
<p>Entre autres&#8230;</p>
<ol>
<li>Le Test Driven Development avec Visual Studio</li>
<li>Environnement généré en Javascript avec ExtJS</li>
<li>Des processus d&#8217;auto installation avec CentOS 5 (Kick start)</li>
<li>Monter un serveur SMTP avec Debian Etch et Exim connecté avec un backend MySQL</li>
<li>Faire des routines de déploiement en XML avec Apache Ant</li>
<li>Monter une librairie de <a title="Script bash pour transférer une base de donnée MySQL d’un serveur à l’autre" href="http://renoirboulanger.com/blog/2010/02/script-bash-pour-transferer-une-base-de-donnee-mysql-dun-serveur-a-lautre/">migration de base de donnée d&#8217;un serveur a l&#8217;autre</a></li>
<li><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i/">Monter un &#8220;Une VM Linux qui sert au développement&#8221; et utiliser un tunnel X pour afficher localement ce qui est exécuté dans la VM</a></li>
<li><a title="Installer une Machine Virtuelle Linux roulant dans VMware Fusion sous Mac OS X" href="http://renoirboulanger.com/blog/2010/07/installer-une-machine-virtuelle-linux-roulant-dans-vmware-fusion-sous-mac-os-x/">Monter une sandbox&#8230;  sous Mac OS X</a></li>
<li>Un projet de gestion de parc informatique</li>
<li>Un projet de gestion de menu utilisant le &#8220;<a href="http://webprod.hc-sc.gc.ca/cnf-fce/index-fra.jsp">Fichier canadien sur les éléments nutrritifs</a>&#8220;</li>
<li>&#8230; et plusieurs autres.</li>
</ol>
<h3>Pourquoi avons nous lancé un <em>autre</em> événement a Montréal</h3>
<p>Étant donné qu&#8217;aucun événement a Montréal n&#8217;avait ce type de concept, nous l&#8217;avons ouverts au public. Surtout que les gens autour de nous aimaient  l&#8217;idée de nos rencontres.</p>
<p>Notre objectif est clair:</p>
<blockquote><p>devLAB est  une occasion de partager avec d&#8217;autres passsionnés en faisant des rencontres hebdomadaires de travail ou on &#8220;met la main à la pâte&#8221;.</p></blockquote>
<p>Parceque ce qu&#8217;on veut depuis toujours c&#8217;est un endroit ou essayer des trucs. Peu importe la techno. Des chose qu&#8217;on peut pas nécessairement faire au bureau, ou chez soi. C&#8217;est de se donner une occasion d&#8217;améliorer ses capacités.</p>
<h3>Evocatio : L&#8217;oeuf ou la Poule?</h3>
<p>Pour les gens qui se le demandent. Evocatio a commencé A CAUSE des GeekNights.</p>
<p>Pas le contraire.</p>
<p>En fait, nous sommes ouverts a l&#8217;aide pour en faire une entité a part entière.</p>
<h3>La direction de devLAB</h3>
<p>&#8230; notre manifeste, en quelque sorte. Pas nécessairement officiel mais va comme suit:</p>
<ol>
<li>Rencontre tous les mercredis 18h30-22h00</li>
<li>Avancer un projet de logiciel Libre</li>
<li>Ne pas se coincer qu&#8217;a une seule technologie ou langage de programmation</li>
<li>Travailler en équipe (code pairing) pour apprendre des interventions de son pair</li>
<li>Ajouter des facteurs d&#8217;inconnus coté technologique</li>
<li>Tout le monde est là pour apprendre et jouer a la technologie</li>
<li>But non lucratif. Aucune entreprise ne peut être promu par devLAB. Le contraire n&#8217;est pas interdit par contre.</li>
<li>Bilinguisme from the ground up (Except that my blog is for a french only audience. sorry)</li>
</ol>
<h3>C&#8217;est quand?</h3>
<p>CE Mercredi, ou le prochain!</p>
<p>Le détail des annonces sur <a href="http://techentreprise.com/Montreal/users/renoirb">Techentreprise</a> (voir le lien devLAB Montréal), Twitter via <a href="http://twitter.com/devLABMtl">@devLABmtl</a> et  dans le <a href="http://www.facebook.com/home.php?sk=group_191829357497601">groupe Facebook</a>.  Vous pouvez aussi être fan de la <a href="http://www.facebook.com/devlabmtl">Page Facebook</a>.</p>
<p>Vous pouvez aussi  <a href="http://devlabmtl.org/">devlabmtl.org</a> et qui n&#8217;est pas aussi à jour mais qui le sera éventuellement. <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Vous voulez vous joindre a nous? Pas de problème! Si vous avez des questions vous pouvez envoyer un courriel a <strong>info A dev LAB mtl POINT org</strong></p>
<p>Au plaisir de vous y croiser.</p>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2011/02/devlab-montreal-cest-maintenant-parti/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Comment remplacer les caract√®res bizzares dans WordPress lorsqu&#8217;on a mal fait la conversion</title>
		<link>http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/</link>
		<comments>http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 01:07:40 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sc]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2232</guid>
		<description><![CDATA[Comment remplacer les caract√®res bizzares dans WordPress lorsqu&#8217;on a mal fait la conversionAccrocheur mon titre n&#8217;est-ce pas? Je trouve ça tellement pas drôle lorsque ça m&#8217;arrive ce genre de situation avec les caractères accentués. Le problème n&#8217;arrive pas tout le temps qu&#8217;avec WordPress. 
Voici, enfin, une suite a mon billet Pourquoi tout ces caractères bizzares. [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/' class='retweet '  style='display:block;margin:10px 0px;' >Comment remplacer les caract√®res bizzares dans WordPress lorsqu&#8217;on a mal fait la conversion</a><p>Accrocheur mon titre n&#8217;est-ce pas? Je trouve ça tellement pas drôle lorsque ça m&#8217;arrive ce genre de situation avec les caractères accentués. Le problème n&#8217;arrive pas tout le temps qu&#8217;avec WordPress. </p>
<p>Voici, enfin, une suite a mon billet <a href="http://renoirboulanger.com/blog/2009/09/pourquoi-tout-ces-caracteres-bizzares/">Pourquoi tout ces caractères bizzares</a>.  Je devais travailler sur un problème de conversion de caractères pour un client dus a une conversion non réussie et/ou terminée entre <tt>latin1</tt> et <tt>utf-8</tt> puis je me suis remis a penser a ce problème. Pourquoi ne pas le régler, et documenter! </p>
<p>Voilà pourquoi ce billet <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>La situation</h3>
<p>Mon cas était bien simple. J&#8217;avait mal fait ma sauvegarde lors d&#8217;un transfert et j&#8217;avait tout mes commentaires, billets, et autres données qui avait des accents &#8220;<tt>transform√©s comme √áa</tt>&#8221; (transformés comme ça).</p>
<p>Ce genre de problème arrive pour toutes sortes de raisons. Mais le symptôme est le même. Si vous avez des<br />
Je partage avec vous mon bout de code a «copier-coller» dans <tt>phpmyadmin</tt> pour votre blogue WordPress si vous avez ces problèmes (oubliez-pas de faire des sauvegardes là(!)).</p>
<p>Plusieurs tutoriels existent pour régler la situation mais mon cas était assez unique. J&#8217;ai conservé le problème puis j&#8217;ai publié plusieurs billets (qui sortent bien) et laissé ceux &#8220;<tt>ab√Æm√©s</tt>&#8221; là. <strong>Il n&#8217;était plus question d&#8217;extraire, convertir et ré-importer</strong>.</p>
<h3>Pourquoi?!</h3>
<p>C&#8217;est une réponse assez complexe. L&#8217;article <a href="http://tikiwiki.org/UTF-8"><strong>UTF-8</strong> sur TikiWiki.org</a> l&#8217;explique en détail.</p>
<blockquote><p>In short, UTF-8 is a character encoding that uses 1 to 3 bytes for each character.<br />
It is one of the existing character encodings of the UCS (Universal Character Set), that contains nearly a hundred thousand abstract characters (including ASCII characters).</p>
<p>UTF-8 greatly simplifies the task of internationalization by replacing multiple alternative encodings (such as ISO8859-15 Latin-9, which encodes those English, French, German, Spanish and Portuguese characters not available in ASCII).</p></blockquote>
<p>En simple, le UTF-8 est un format d&#8217;encodage qui utilise 1 a 3 bytes pour chaque caractère. C&#8217;est un format d&#8217;encodage qui comprend près de plusieurs centaines de milliers de caractères (Incluant ceux du ASCII).</p>
<p>UTF-8 est fait pour contenir tout les caractères existants pour simplifier l&#8217;internationalisation. </p>
<p>C&#8217;est un standard qui est pas nécessairement jeune mais qui n&#8217;était pas non plus supporté partout.</p>
<p>MySQL a commencé a le supporter qu&#8217;a partir de la version 4.1.</p>
<p>Ce qui arrive c&#8217;est qu&#8217;avec le temps, les gens prennent de plus en plus soin de rendre accessible pour toutes les langues leur applications. Ainsi un russe pourrait écrire en cyrillic et un Japonais en Kanji dans la même base de donnée. Le coup est difficile! Surtout que les versions de MySQL et PHP et Java offrent maintenant le choix par défaut en UTF-8&#8230; lorsqu&#8217;on fait pas attention: on se fait coincer!</p>
<p><span id="more-2232"></span></p>
<h3>Comment j&#8217;ai opéré</h3>
<p>Comme il n&#8217;y a pas que WordPress qui peut avoir ce type de problème j&#8217;ai fait un petit script qui génère pour chaque table et colone affectée. J&#8217;ai passé dans chaque table et colone où je voyait des choses bizzares et j&#8217;ai représenté dans un array a deux dimensions. Avec cette méthode on peut faire la même chose avec n&#8217;importequel schéma de base de donnée.</p>
<h4>Exemple: Représenter les tables et les colones</h4>
<p>Avec ce format, en exemple, j&#8217;ai représenté les tables (<tt>wp_posts</tt>, etc&#8230;) et chaque array représente une colone où des caractères accentués sont mal convertis.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$tables</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'wp_posts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_content'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_title'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_excerpt'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_usermeta'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'meta_value'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_term_taxonomy'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_comments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_content'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Utiliser le script</h3>
<p>Le script a été utilisé pratiquement tel quel sur ma base de donnée WordPress de ce site. </p>
<p>Seuls ajustements a faire. </p>
<ul>
<li>Remplacer les &#8220;&lt;&nbsp;pre&nbsp;&gt;&#8221; par &#8220;&lt;pre&gt;&#8221;. Vous comprenez le principe <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Afficher le contenu généré via un serveur Web avec PHP installé</li>
<li>Aller dans <tt>phpmyadmin</tt>, <strong>faire une copie de la base de donnée à affecter</strong> (Voir dans onglet &#8220;<tt>Opérations</tt>&#8221; et &#8220;<tt>Copier la base de données vers:  </tt>&#8220;)</li>
<li>Aller dans cette base de donnée là dans phpmyadmin (!!)</li>
<li>Exécuter le code généré (copier-coller) dans la fenêtre <tt>SQL</tt> de la base de donnée de tests</li>
<li>Faire pareil avec la vraie si vous êtes satisfaits du résultat</li>
</ul>
<h4>Le code</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type:text/html;charset=utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tables</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'wp_posts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_content'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_title'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_excerpt'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_usermeta'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'meta_value'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_term_taxonomy'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_comments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_content'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$chars</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√Ä'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|À'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√¥'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ô'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√Ç'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|â'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√á'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ç'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√©'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|é'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√â'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|É'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√†'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|à'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√®'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|è'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√™'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ê'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√¢'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|â'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'‚Äô'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|‘'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'¬´'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|«'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'¬ª'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|»'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√ß'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ç'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√π'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ù'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√ª'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|û'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√Æ'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|î'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tables</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$table</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$elements</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$elements</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$col</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chars</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$elc</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|'</span><span style="color: #339933;">,</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$update_line</span><span style="color: #339933;">.=</span> <span style="color: #0000ff;">'update '</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' set '</span><span style="color: #339933;">.</span><span style="color: #000088;">$col</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' = REPLACE('</span><span style="color: #339933;">.</span><span style="color: #000088;">$col</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', UNHEX(\''</span><span style="color: #339933;">.</span><span style="color: #000088;">$elc</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'\'), \''</span><span style="color: #339933;">.</span><span style="color: #000088;">$elc</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'\') ;'</span><span style="color: #339933;">.</span>PHP_EOL<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt; pre &gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$update_line</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt; / pre &gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Procédure pour créer un serveur FTP sécurisé SSL forcé avec usager virtuels sous Ubuntu Linux avec vsFTPd</title>
		<link>http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd/</link>
		<comments>http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 19:12:12 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[Sécurite]]></category>
		<category><![CDATA[Tutoriels]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2162</guid>
		<description><![CDATA[Procédure pour créer un serveur FTP sécurisé SSL forcé avec usager virtuels sous Ubuntu Linux avec vsFTPdJe ne sais pas si vous êtes comme moi mais je n&#8217;aime pas laisser non crypté l&#8217;accès a un service qui me demande un mot de passe. Je devait monter un serveur cette semaine qui doit avoir les accès [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd/' class='retweet '  style='display:block;margin:10px 0px;' >Procédure pour créer un serveur FTP sécurisé SSL forcé avec usager virtuels sous Ubuntu Linux avec vsFTPd</a><p>Je ne sais pas si vous êtes comme moi mais je n&#8217;aime pas laisser non crypté l&#8217;accès a un service qui me demande un mot de passe. Je devait monter un serveur cette semaine qui doit avoir les accès FTP.</p>
<p>J&#8217;ai pris l&#8217;initiative de sécuriser la machine avec du SSL car je crois qu&#8217;aujourd&#8217;hui c&#8217;est notre devoir de faire ce genre de chose. Ce n&#8217;est pas la première fois que je configure un serveur FTP over SSL mais je n&#8217;avait jamais pris de notes vraiment à ce jour. Je l&#8217;ai fait cette fois-ci!</p>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Cequecetteproc%C3%A9durefait..."></a>Ce que cette procédure fait&#8230;</h3>
<ol>
<li>Pouvoir créer des comptes FTP sans avoir a créer un utilisateur local (donc pas accès shell (SSH)).</li>
<li>Permet les connections FTP over SSL de façon EXPLICITE sur un port non standard  (cet exemple utilisera le port <tt>6123</tt>)</li>
<li>Ne permet pas d&#8217;utilisateur ni de connexions anonymes</li>
<li>Bannit les hôtes qui tentent de se connecter (LOGIN FAILED)	via <strong>fail2ban</strong></li>
<li>Utilise le system PAM interne pour l&#8217;authentification</li>
<li>Ne requiert pas d&#8217;usager local (pas de risque de tentative de connection SSH, usager séparés)</li>
<li>Le serveur FTP roule sur son propre usager</li>
</ol>
<p><span id="more-2162"></span></p>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Proc%C3%A9dure"></a>Procédure</h3>
<ol>
<li>Vérifier quelle version de serveur FTP est installé

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># dpkg --list | grep ftp</span>
~
ii  <span style="color: #c20cb9; font-weight: bold;">ftp</span>                               <span style="color: #000000;">0.17</span>-<span style="color: #000000;">19</span>                      The FTP client
ii  lftp                              3.7.15-1ubuntu2              Sophisticated command-line FTP<span style="color: #000000; font-weight: bold;">/</span>HTTP client p
ii  vsftpd                            2.2.0-1ubuntu1               lightweight, efficient FTP server written fo</pre></td></tr></table></div>

<p><strong>Note</strong> vsftpd est ce qu&#8217;on veut. Dans ce cas-ci il est déjà installé (ii).</li>
<li>Assurer que les prérequis sont installés

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># aptitude install vsftpd libpam-pwdfile openssl</span></pre></td></tr></table></div>

</li>
<li>Modifier le fichier de config <strong>vsftpd.conf</strong>.<br />
<strong>Note</strong> Modifiez pour ces valeurs (ci-bas) et conservez les autres valeurs par défaut.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi /etc/vsftpd.conf</span>
~
<span style="color: #007800;">anonymous_enable</span>=NO
<span style="color: #007800;">local_enable</span>=YES
<span style="color: #007800;">write_enable</span>=YES
<span style="color: #007800;">local_umask</span>=022
<span style="color: #007800;">chroot_local_user</span>=YES
<span style="color: #007800;">ftpd_banner</span>=Un nom Quelconque FTP
<span style="color: #007800;">nopriv_user</span>=vsftpd
&nbsp;
<span style="color: #666666; font-style: italic;"># renoirboulanger.com 2010-04-29 we will force usage on an other port</span>
<span style="color: #666666; font-style: italic;">#connect_from_port_20=YES</span></pre></td></tr></table></div>

</li>
<li>Ajouter ou corriger (étaient pas présents lorsque j&#8217;ai crée la procédure)

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># 2010-04-28 accès usager</span>
<span style="color: #007800;">virtual_use_local_privs</span>=YES
<span style="color: #007800;">guest_enable</span>=YES
<span style="color: #007800;">user_sub_token</span>=<span style="color: #007800;">$USER</span>
<span style="color: #007800;">local_root</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ibottin<span style="color: #000000; font-weight: bold;">/</span>FTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
<span style="color: #007800;">hide_ids</span>=YES</pre></td></tr></table></div>

<p><strong>Note</strong> Ajuster le <tt>local_root</tt> a l&#8217;endroit	ou envoyer les fichiers.</li>
<li>Activer le SSL
<ol>
<li>Créer le certificat

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /etc/ssl</span>
<span style="color: #666666; font-style: italic;"># /usr/bin/openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout vsftpd.pem -out vsftpd.pem</span></pre></td></tr></table></div>

</li>
<li>Ajouter au <tt>/etc/vsftpd.conf</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi /etc/vsftpd.conf</span>
~
<span style="color: #666666; font-style: italic;"># renoirboulanger.com 2010-04-30 SSL configuration</span>
<span style="color: #007800;">listen_port</span>=<span style="color: #000000;">6123</span>
<span style="color: #007800;">ftp_data_port</span>=<span style="color: #000000;">6122</span>
<span style="color: #007800;">pasv_min_port</span>=<span style="color: #000000;">6000</span>
<span style="color: #007800;">pasv_max_port</span>=<span style="color: #000000;">6100</span>
&nbsp;
<span style="color: #007800;">ssl_enable</span>=YES
<span style="color: #666666; font-style: italic;"># Allow anonymous users to use secured SSL connections</span>
<span style="color: #007800;">allow_anon_ssl</span>=YES
<span style="color: #666666; font-style: italic;"># All non-anonymous logins are forced to use a secure SSL connection in order to</span>
<span style="color: #666666; font-style: italic;"># send and receive data on data connections.</span>
<span style="color: #007800;">force_local_data_ssl</span>=NO
<span style="color: #666666; font-style: italic;"># All non-anonymous logins are forced to use a secure SSL connection in order to send the password.</span>
<span style="color: #007800;">force_local_logins_ssl</span>=YES
<span style="color: #007800;">ssl_tlsv1</span>=YES
<span style="color: #007800;">ssl_sslv2</span>=YES
<span style="color: #007800;">ssl_sslv3</span>=YES
<span style="color: #007800;">rsa_cert_file</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>vsftpd.pem</pre></td></tr></table></div>

</li>
</ol>
</li>
<li><strong>Remplacer</strong> le contenu du fichier <tt>pam.d/vsftpd</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi /etc/pam.d/vsftpd</span>
~
auth required pam_pwdfile.so pwdfile <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vsftpd.passwd
account required pam_permit.so</pre></td></tr></table></div>

<p><strong>Note</strong> Il est important de remplacer le reste du fichier par ce contenu ci-haut.</li>
<li>Modifier permissions sur le fichier .pem

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># chown vsftpd /etc/ssl/vsftpd.pem</span></pre></td></tr></table></div>

</li>
<li>Redémarrer vsftpd

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/init.d/vsftpd restart</span></pre></td></tr></table></div>

</li>
<li>Créer le unix user qui va rouler le démon

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># adduser --system --no-create-home --disabled-login -s /usr/sbin/nologin --home /var/ftp vsftpd</span></pre></td></tr></table></div>

</li>
<li>Modifier les permissions pour l&#8217;utilisateur qui roule vsftpd (ajuster)

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># chown -R ftp:ftp /var/ftp/</span>
<span style="color: #666666; font-style: italic;"># chmod -R 740 /var/ftp</span></pre></td></tr></table></div>

</li>
<li><strong><a href="http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd#ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-AjouterunutilisateurFTP">Ajouter un utilisateur FTP</a></strong></li>
<li>Ajuster <tt>fail2ban</tt>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><strong>Ajuster le bloc [vsftpd]</strong></div>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi /etc/fail2ban/jail.conf</span>
~
<span style="color: #7a0874; font-weight: bold;">&#91;</span>vsftpd<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
enabled  = <span style="color: #c20cb9; font-weight: bold;">true</span></pre></td></tr></table></div>

<p><strong>Note</strong> par defaut <tt>enabled</tt> est a false&#8230;	il faut l&#8217;activer.</p>
</div>
</li>
<li>Redémarrer vsftpd

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/init.d/vsftpd restart</span>
 <span style="color: #000000; font-weight: bold;">*</span> Stopping FTP server: vsftpd
   ...done.
 <span style="color: #000000; font-weight: bold;">*</span> Starting FTP server: vsftpd
   ...done.
<span style="color: #666666; font-style: italic;"># ps aux|grep vsftpd</span>
vsftpd   <span style="color: #000000;">18771</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">28904</span>  <span style="color: #000000;">1300</span> ?        Ss   <span style="color: #000000;">17</span>:09   <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>vsftpd
vsftpd   <span style="color: #000000;">18772</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">29100</span>  <span style="color: #000000;">1608</span> ?        S    <span style="color: #000000;">17</span>:09   <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>vsftpd
<span style="color: #c20cb9; font-weight: bold;">ftp</span>      <span style="color: #000000;">18773</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">28928</span>   <span style="color: #000000;">924</span> ?        S    <span style="color: #000000;">17</span>:09   <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>vsftpd
root     <span style="color: #000000;">18795</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">22628</span>  <span style="color: #000000;">1712</span> ?        S    <span style="color: #000000;">17</span>:<span style="color: #000000;">14</span>   <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>vsftpd
...</pre></td></tr></table></div>

<p><strong>Note</strong> les deux premiers <tt>vsftpd</tt> est le résultat attendu</li>
<li>Nous allons forcer le FTP over SSL sur le port <strong>6122</strong>, pour ça il faut autoriser le Firewall

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># iptables -A INPUT -m state --state ESTABLISHED,RELATED</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -m tcp -p tcp --dport 6122 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -m state --state NEW,ESTABLISHED</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -m tcp -p tcp --dport 6123 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp --dport 6000:6100 -j ACCEPT</span></pre></td></tr></table></div>

<p><strong>Source</strong>: <a href="http://my.afterdawn.com/ketola/blog_entry.cfm/1262/vsftpd_ssl_and_iptables">vsftpd SSL and iptables</a></li>
<li>Sauvegarder le Firewall

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># iptables-save &amp;gt; /etc/iptables.rules</span></pre></td></tr></table></div>

</li>
<li>Tester de l&#8217;extérieur avec un client FTP (Filezilla, etc)
<p>Voir les options suivantes a la connection</p>
<ol>
<li>port: 6123</li>
<li>Forcer le SSL</li>
</ol>
</li>
</ol>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-AjouterunutilisateurFTP"></a>Ajouter un utilisateur FTP</h3>
<p>On utilise le truc simple de htpasswd pour l&#8217;authentification. Pas de gossage <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Cr%C3%A9erunnouveaucompte"></a>Créer un nouveau compte</h3>
<ol>
<li>Créer le <em>premier compte</em>, sinon, <strong>passer	a la directive suivante</strong>! ou Utiliser mon script <a href="http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd#ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Scriptpourcr%C3%A9eruncompteutilisateur">Script pour créer un compte utilisateur</a>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># htpasswd -c /etc/vsftpd.passwd ftpuser</span>
New password:
Re-type new password:
Adding password <span style="color: #000000; font-weight: bold;">for</span> user ftpuser</pre></td></tr></table></div>

<p><strong>Note</strong> l&#8217;option <strong><tt>-c</tt></strong> est	pour créer le fichier la première fois.</li>
<li>Voir les directives de *<a href="http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd#ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Scriptpourcr%C3%A9eruncompteutilisateur">Script pour créer un compte utilisateur</a></li>
</ol>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Ajouteroumodifierunutilisateur"></a><strong>Ajouter ou modifier un utilisateur</strong></h3>
<ol>
<li>Utiliser le script <strong><tt>evo-vsftpd-user</tt></strong>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> evo-vsftpd-user foo
Création d<span style="color: #ff0000;">'un nouvel usager dans /etc/vsftpd.passwd ...
New password:
Re-type new password:
Adding password for user foo
 ... OK
 * Création du dossier /home/ibottin/FTP/foo ...  OK
 * Changement des permissions du dossier ...  OK
Terminé!</span></pre></td></tr></table></div>

<p>Voir les directives de <strong><a href="http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd#ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Scriptpourcr%C3%A9eruncompteutilisateur">Script pour créer un compte utilisateur</a></strong></li>
</ol>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Scriptpourcr%C3%A9eruncompteutilisateur"></a>Script pour créer un compte utilisateur</h3>
<ol>
<li>Créer le fichier

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi /usr/sbin/evo-vsftpd-user</span></pre></td></tr></table></div>

</li>
<li>Coller le contenu

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Aucun argument usager fourni&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;usage: sudo evo-vsftpd-user foo&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(whoami)</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">'root'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Vous n'avez pas les permisions utilisateur requises.&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Création d'un nouvel usager dans /etc/vsftpd.passwd ... &quot;</span>
htpasswd <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vsftpd.passwd $<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; ... OK &quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot; * Création du dossier /home/ibottin/FTP/$1 ... &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ibottin<span style="color: #000000; font-weight: bold;">/</span>FTP<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; OK&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot; * Changement des permissions du dossier ... &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #c20cb9; font-weight: bold;">ftp</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ibottin<span style="color: #000000; font-weight: bold;">/</span>FTP<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">740</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ibottin<span style="color: #000000; font-weight: bold;">/</span>FTP<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; OK&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Terminé!&quot;</span></pre></td></tr></table></div>

</li>
<li>Rendre exécutable

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># chmod +x /usr/sbin/evo-vsftpd-user</span></pre></td></tr></table></div>

</li>
</ol>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Tester"></a>Tester</h3>
<ol>
<li>Installer le paquet pour tester
<div class="code panel" style="border-width: 1px;">
<div class="codeContent panelContent">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># aptitude install ftp-ssl</span></pre></td></tr></table></div>

</div>
</div>
</li>
<li>Tester

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ftp-ssl someserver.net 6123</span>
Connected to someserver.net.
<span style="color: #000000;">220</span> Un nom Quelconque FTP
Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>someserver.net:renoirboulanger<span style="color: #7a0874; font-weight: bold;">&#41;</span>: ftpuser
<span style="color: #000000;">234</span> Proceed with negotiation.
<span style="color: #7a0874; font-weight: bold;">&#91;</span>SSL Cipher DES-XXXX-SHA<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000;">331</span> Please specify the password.
Password:
<span style="color: #000000;">230</span> Login successful.
Remote system <span style="color: #7a0874; font-weight: bold;">type</span> is UNIX.
Using binary mode to transfer files.
<span style="color: #c20cb9; font-weight: bold;">ftp</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;</pre></td></tr></table></div>

<p><strong>Note</strong> [SSL Cipher DES-XXXX-SHA] est ce qu&#8217;on attend <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ol>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Pourd%C3%A9boguer"></a>Pour déboguer</h3>
<p>Le feedback est assez difficile a avoir de la part de vsftpd, mais pour en voir plus:</p>
<ol>
<li>Pour le debug

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi /etc/vsftpd.conf</span>
~
<span style="color: #666666; font-style: italic;"># for debuging</span>
<span style="color: #007800;">log_ftp_protocol</span>=YES</pre></td></tr></table></div>

</li>
</ol>
<h3><a name="ComptesFTPvirtuel%28sansutilisateurlocal%29sousUbuntuavecvsFTPdetcryptoSSL-Ressources"></a>Ressources</h3>
<ul>
<li><a href="http://wjholden.com/vsftpd-help.html">vsftpd help</a></li>
<li><a href="http://vsftpd.beasts.org/vsftpd_conf.html">vsftpd.conf manpages</a></li>
<li><a href="http://my.afterdawn.com/ketola/blog_entry.cfm/1262/vsftpd_ssl_and_iptables">vsftpd SSL and iptables</a></li>
<li><a href="http://www.ubuntututorials.net/installing-vsftpd-using-text-file-for-virtual-users/">Installing vsftpd using text file for virtual users</a></li>
<li><a href="http://www.cyberciti.biz/tips/configure-vsfptd-secure-connections-via-ssl-tls.html">Vsftpd SSL / TLS FTP Server Configuration</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/04/procedure-pour-creer-un-serveur-ftp-securise-ssl-force-avec-usager-virtuels-sous-ubuntu-linux-avec-vsftpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment dire à Apache le mime-type d&#8217;un document Office 2007</title>
		<link>http://renoirboulanger.com/blog/2010/04/comment-dire-a-apache-le-mime-type-dun-document-office-2007/</link>
		<comments>http://renoirboulanger.com/blog/2010/04/comment-dire-a-apache-le-mime-type-dun-document-office-2007/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 13:22:49 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sécurite]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2078</guid>
		<description><![CDATA[Comment dire à Apache le mime-type d&#8217;un document Office 2007J&#8217;ai entendu parler de certains Problèmes avec les documents .docx qui son considérés comme étant des fichiers zip. J&#8217;ai pensé partager avec vous comment j&#8217;ai réparé la situation.
Il est possible que le serveur apache ne considère pas les fichiers doc sur le serveur comme étant des [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/04/comment-dire-a-apache-le-mime-type-dun-document-office-2007/' class='retweet '  style='display:block;margin:10px 0px;' >Comment dire à Apache le mime-type d&#8217;un document Office 2007</a><p>J&#8217;ai entendu parler de certains Problèmes avec les documents <strong>.docx</strong> qui son considérés comme étant des fichiers zip. J&#8217;ai pensé partager avec vous comment j&#8217;ai réparé la situation.</p>
<p>Il est possible que le serveur apache ne considère pas les fichiers doc sur le serveur comme étant des fichiers office. Normalement un navigateur téléchargera le fichier et ouvrira avec le programme qu&#8217;il considère comme étant le bon.</p>
<p>A moins que l&#8217;ordinateur du visiteur ait pas de bonne association de fichier, dans ce cas, on peut rien y faire.</p>
<p>Pour aider, on peut annoncer au serveur web les associations MIME.</p>
<p>Le problème avec cette méthode qui ne sert presque a rien, c&#8217;est que ça ne changera rien si</p>
<ol>
<li>Le visiteur n&#8217;a pas de bonne association sur son système d&#8217;exploitation</li>
<li>Le visiteur n&#8217;a pas Microsoft Office 2007 ou Open Office</li>
</ol>
<p><span id="more-2078"></span></p>
<h3>Procédure</h3>
<p>Copier-coller ce bloc dans un ou encore dans l&#8217;un ou l&#8217;autre:</p>
<ul>
<li>le <tt>.htaccess</tt> du site qui contient les fichiers a télécharger, exemple: <tt>public_html/</tt></li>
<li>le <tt>&lt;VirtualHost/&gt;</tt> dans le <tt>&lt;Directory&gt;</tt> associé.</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="htaccess" style="font-family:monospace;">AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx</pre></td></tr></table></div>

<p><strong>source:</strong><a href="http://www.webdeveloper.com/forum/showthread.php?t=162526">Webdeveloper.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/04/comment-dire-a-apache-le-mime-type-dun-document-office-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Les différentes versions du service de tâches planifié CRON</title>
		<link>http://renoirboulanger.com/blog/2010/04/les-differentes-versions-du-service-de-taches-planifie-cron/</link>
		<comments>http://renoirboulanger.com/blog/2010/04/les-differentes-versions-du-service-de-taches-planifie-cron/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 13:04:07 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Outils]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Vocabulaire]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2086</guid>
		<description><![CDATA[Les différentes versions du service de tâches planifié CRONSuite a mon article «Comment automatiser une tâche avec CRON en utilisant Vim» je me suis venu aux questions sur les différences essentielles entre les versions de CRON.
Le concept de CRON est, un «lanceur de commandes» planifié pour les systèmes UNIX. Le nom est inspiré du dieu [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/04/les-differentes-versions-du-service-de-taches-planifie-cron/' class='retweet '  style='display:block;margin:10px 0px;' >Les différentes versions du service de tâches planifié CRON</a><p><img class="size-full wp-image-2104" style="float: right; border: 0px;" title="Une horloge" src="http://renoirboulanger.com/wp-content/uploads/2010/04/Clock-icon.png" alt="" width="205" height="205" />Suite a mon article «<a href="http://renoirboulanger.com/blog/2010/04/comment-automatiser-une-tache-avec-cron-en-utilisant-vim/">Comment automatiser une tâche avec <em>CRON</em> en utilisant Vim</a>» je me suis venu aux questions sur les différences essentielles entre les versions de <em>CRON</em>.</p>
<p>Le concept de <em>CRON</em> est, un «lanceur de commandes» planifié pour les systèmes UNIX. Le nom est inspiré du dieu grec Chronos.</p>
<p>Ayant déjà utilise Gentoo Linux j&#8217;avait vu qu&#8217;il était possible d&#8217;utiliser plus d&#8217;une version de CRON mais je ne m&#8217;était jamais penché sur les différences. Je l&#8217;ai fait aujourd&#8217;hui.</p>
<p><span id="more-2086"></span></p>
<h3>Une question de choix et de distribution</h3>
<p>Généralement chaque distribution de système d&#8217;exploitation UNIX (Linux, Unix, Qnx, etc) a son lot d&#8217;outils standards dont CRON fait partie. Chaque éditeur de distribution choisit sa version préférée mais permet d&#8217;interchanger (avec <a href="http://wiki.debian.org/DebianAlternatives">Alternatives sous Debian</a>, par exemple).</p>
<h3>Versions de <em>CRON</em></h3>
<h4>Anacron</h4>
<p>La différence d&#8217;<em>Anacron</em> avec <em>cron</em> (traditionnel) est le fait qu&#8217;Anacron ne roule pas en permanence comme un démon en arrière plan. Il est idéal sur des système qui ne roule pas nécessairement 24 heures par jour ou avec peu de ressources processeur.</p>
<p><a href="http://anacron.sourceforge.net/">site officiel</a></p>
<h4>vixie-cron</h4>
<p>La version de cron la plus utilisée (selon mon expérience, notamment sous les installation par défaut de Ubuntu, Debian et Red Hat et CentOS)</p>
<p><a href="http://troy.jdmz.net/cron/">site officiel</a></p>
<h4>bcron</h4>
<p>L&#8217;auteur a crée cette version car il avait besoin de précision concernant les délais entre les commandes et les changements de saisons (Heure d&#8217;été).</p>
<p>J&#8217;ai remarqué plusieurs autres outils intéressant que l&#8217;auteur a publié. Je l&#8217;ai ajouté a mes marque-pages.</p>
<h4>fcron</h4>
<p>L&#8217;auteur a crée cette version de cron dans l&#8217;optique que la machine peut ne pas être allumée 24/24 et 7 jours/7. fcron se base plutôt sur le temps que le système fonctionne (le «uptime») plutot qu&#8217;un moment précis. L&#8217;auteur dit que fcron veut remplacer Vixie-cron et anacron mais en <em>mieux</em>.</p>
<p>Le genre de tâche qu&#8217;on peut faire est:</p>
<ul>
<li>Lance une commande aux chaque 3heures que le système est allumé</li>
<li>Lance une commande au moins une fois entre 3h00 am et 6h00 am tout les jours.</li>
</ul>
<p><a href="http://fcron.free.fr/">site officiel</a></p>
<h4>incron</h4>
<p>incron est une fonctionnalité cron a l&#8217;application inotify qui est un système basé sur le système de fichiers plutôt que sur des plages de temps. Un cas d&#8217;utilisation serait, par exemple, de pouvoir lancer une commande lorsqu&#8217;un logrotate a été lancé ou si un fichier a été ajouté dans un dossier.</p>
<p><a href="http://linux.die.net/man/5/incron.conf">pages manuel</a> &#8211; <a href="http://inotify.aiken.cz/">site officiel</a></p>
<p><strong>Autres versions</strong></p>
<p>Avez-vous utilisé l&#8217;un d&#8217;eux dans vos projets?</p>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/04/les-differentes-versions-du-service-de-taches-planifie-cron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script bash pour transférer une base de donnée MySQL d&#8217;un serveur à l&#8217;autre</title>
		<link>http://renoirboulanger.com/blog/2010/02/script-bash-pour-transferer-une-base-de-donnee-mysql-dun-serveur-a-lautre/</link>
		<comments>http://renoirboulanger.com/blog/2010/02/script-bash-pour-transferer-une-base-de-donnee-mysql-dun-serveur-a-lautre/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 21:39:42 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[GeekNight]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Tranche de vie]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=1764</guid>
		<description><![CDATA[Script bash pour transférer une base de donnée MySQL d&#8217;un serveur à l&#8217;autreJe travaillait sur un mandat récemment pour transférer plusieurs dizaines de sites web vers une nouvelle infrastructure. Dans ce billet j&#8217;expliquerai le processus que j&#8217;ai utilisé pour en finir par produire un script bash qui pourrait vous être utile.
&#160;
A propos du projet
Considérant que [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/02/script-bash-pour-transferer-une-base-de-donnee-mysql-dun-serveur-a-lautre/' class='retweet '  style='display:block;margin:10px 0px;' >Script bash pour transférer une base de donnée MySQL d&#8217;un serveur à l&#8217;autre</a><p>Je travaillait sur un mandat récemment pour transférer plusieurs dizaines de sites web vers une nouvelle infrastructure. Dans ce billet j&#8217;expliquerai le processus que j&#8217;ai utilisé pour en finir par produire un script bash qui pourrait vous être utile.</p>
<p>&nbsp;</p>
<h3>A propos du projet</h3>
<p>Considérant que certains sites avaient plus d&#8217;une base de donnée il était hors de question de faire a bras les lignes <em>mysqldump</em>, <em>ssh</em> (en fait le transfert se fait en compressant le fichier et le copiant via une redirection gzip avec cat), <em>mysql</em> pour, en ordre, dumper la base de donnée, la transférer, et la restaurer&#8230;. sans oublier les <em>create users</em> pour chaque.</p>
<p>Je me suis dit: <em>faisons-en un script</em>!</p>
<p>&nbsp;</p>
<p><span id="more-1764"></span></p>
<h3>Les prérequis</h3>
<p>Nous voulions&#8230;</p>
<ul>
<li>Faciliter le travail car on savait qu&#8217;il faudrait souvent r<em>e-re-transférer</em> chacune des bases de données;<br />
         Car nous devions faire fonctionner le site sur le nouveau serveur <em>avant</em> de transférer les DNS.</li>
<li>Entrer une commande <em>minimale</em> et en conserver les configurations;</li>
<li>Que le <em>nouveau</em> serveur réalise la tâche a lui-seul, sans prérequis sur le serveur distant;</li>
<li>Utiliser les commandes minimales et pouvoir réutiliser le scripts dans ma propre librairie de script bash;</li>
<li>Éviter de répéter, parceque c&#8217;est «<em>con</em>» <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
<p>&nbsp;</p>
<h3>Ce que le script fait</h3>
<h4>1. <em>Transférer</em> la base de donnée</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ migratemysql transfer</pre></td></tr></table></div>

<ol>
<li>Lire le fichier de configuration <em>migratemysql.conf </em> dans le dossier courrant (ou en créer un)</li>
<li>Se connecter en SSH</li>
<li>Lancer <tt>mysqldump</tt> en conservant le <tt>tmp</tt> paramétrable (éviter de remplir le disque)</li>
<li>Compresser le <tt>.sql</tt> en <em>gzip</em> (<tt>.sql.gz</tt>)</li>
<li>Transférer via <tt>scp</tt></li>
</ol>
<p>&nbsp;</p>
<h4>2. <em>Import</em>er dans le serveur local</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ migratemysql import</pre></td></tr></table></div>

<ol>
<li>Lire le fichier de configuration<em> migratemysql.conf </em>dans le dossier courrant</li>
<li>Véfirier si le <tt>.sql.gz</tt> existe&#8230;<br />
<!--   -----  --></p>
<ol>
<li>oui: le décompresser
<ol>
<li>si le <tt>.sql</tt><em> existe déja</em>, écrire par dessus?  (<strong>attente d&#8217;une réponse a l&#8217;usager</strong>)
<ol>
<li>oui: overwrite, continuer&#8230;</li>
<li>non: DIE!</li>
</ol>
<ol>
            </ol>
</li>
</ol>
</li>
<li>non: continuer</li>
</ol>
</li>
<li>Véfirier si le <tt>.sql</tt> existe&#8230;
<ol>
<li>oui: continuer</li>
<li>non: DIE!</li>
</ol>
</li>
<p><!--   -----  --></p>
<li>Se connecter au serveur précisé, si erreur&#8230; DIE!</li>
<li>Véfirier si la <em>database</em> existe sur le serveur
<ol>
<li>oui&#8230;
<ol>
<li><em>Retenir</em> de ne pas <em>effacer</em> le compte de base de donnée (PRIVILEGES) (variable &#8220;<tt>OVERRIDEUSERCREATION</tt>&#8220;)</li>
<li>Effacer pour ré-insérer? (<strong>attente d&#8217;une réponse a l&#8217;usager</strong>)</li>
<li>Créer les drop statements? (oui ou non&#8230; une switch &#8220;<tt>ALT_PURGE</tt>&#8221; dans le fichier de config)
<ol>
<li>oui: générer le script, puis <em>continuer</em></li>
<li>non: <em>continuer</em> (utile si le fichier SQL a les <tt>DROP</tt> statements)</li>
</ol>
</li>
</ol>
</li>
<li>non: <em>continuer</em>&#8230;</li>
</ol>
</li>
<li>(si &#8220;<tt>OVERRIDEUSERCREATION</tt>&#8221; existe, ne pas faire) Créer les PRIVILEGES spécifique pour la table a créer</li>
<li>Exécuter le <tt>.sql</tt></li>
<li>Afficher a l&#8217;écran un snippet de code PHP pour le fichier de config (format WordPress)</li>
</ol>
<p>&nbsp;</p>
<h3>Le script</h3>
<p>Pour <a href="http://renoirboulanger.com/wp-content/uploads/scripts/migratemysql.gz">le télécharger</a></p>
<h4>Installer</h4>
<ol>
<li>Télécharger

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">renoirb<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>renoirboulanger.com<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>migratemysql.gz</pre></td></tr></table></div>

</li>
<li>Extraire

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">renoirb<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~$ <span style="color: #c20cb9; font-weight: bold;">gunzip</span> migratemysql.gz</pre></td></tr></table></div>

</li>
<li>Déplacer dans un dossier du <tt>PATH</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">renoirb<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$PATH</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>games:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>renoirb<span style="color: #000000; font-weight: bold;">/</span>scripts:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>renoirb<span style="color: #000000; font-weight: bold;">/</span>scripts</pre></td></tr></table></div>

<p>      <strong>Note</strong> Personnellement, j&#8217;ai mon propre dossier scripts dans mon home, mais c&#8217;est à vous de voir
  </li>
</ol>
<p>&nbsp;</p>
<h3>Sources</h3>
<p>Le script a été fait en collaboration avec <a href="http://etiennelachance.com">Etienne Lachance</a> qui est nettement plus rapide que moi dans le scripting BASH</p>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/02/script-bash-pour-transferer-une-base-de-donnee-mysql-dun-serveur-a-lautre/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie III</title>
		<link>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-iii/</link>
		<comments>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-iii/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 06:04:14 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[GeekNight]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=1060</guid>
		<description><![CDATA[Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie IIICe billet est le troisième d&#8217;une série d&#8217;articles décrivant la fabrication d&#8217;une Machine Virtuelle (VM) de développement pour une équipe de dévelopeurs.
Cette partie couvrira l&#8217;installation de Apache et de PHP 5.3 (la dernière version depuis Juin 2009) qui offre beaucoup d&#8217;avancées. Je [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-iii/' class='retweet '  style='display:block;margin:10px 0px;' >Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie III</a><p>Ce billet est le <strong>troisième</strong> d&#8217;une série d&#8217;articles décrivant la fabrication d&#8217;une Machine Virtuelle (VM) de développement pour une équipe de dévelopeurs.</p>
<p>Cette partie couvrira l&#8217;installation de Apache et de PHP 5.3 (la dernière version depuis Juin 2009) qui offre beaucoup d&#8217;avancées. Je pense que c&#8217;est devenu le juste minimum a cause de ces nouvelles fonctionnalités. Voir articles faits par  <span lang="en">IBM developerworks</span> &#8220;<span lang="en">What&#8217;s new in PHP 5.3 (<a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new1/index.html">part 1</a>, <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new2/index.html?S_TACT=105AGX44&#038;S_CMP=ART">part 2</a>, <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new3/index.html?S_TACT=105AGX44&#038;S_CMP=ART">part 3</a>, and <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new4/index.html?S_TACT=105AGX44&#038;S_CMP=ART">part 4</a>)</span>&#8220;.</p>
<p><span id="more-1060"></span></p>
<p>J&#8217;ai séparé cette série en quatre volets.</p>
<ol>
<li><strong><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i/">Description du concept</a></strong><br />
Ce que je vais discuter dans cette série d&#8217;articles n&#8217;est pas nécessairement connu de tous. Je vais donc vulgariser un peu avant de commencer.</li>
<li><strong><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-ii/">Installation du système</a></strong><br />
Je donne ici mon secret de magicien avec quelques configurations que je considère importantes pour un environement d&#8217;hébergement web pour améliorer la sécruité (le strict minimum pour cette série d&#8217;articles. Je pourrai en faire un plus poussé plus tard).</li>
<li><strong>Compilation de PHP 5.3</strong> (cet article)<br />
Comment installer Apache 2.x avec le dernier cutting-edge PHP.</li>
<li><strong>Installation de l&#8217;environnement de développement avec Eclipse PDT</strong> (à venir)<br />
La magie se passe par là! Avec ce setup votre équipe pourra répliquer l&#8217;installation de développement a volonté.</li>
</ol>
<h3>Avant tout, quelques précautions</h3>
<div style="background-color:#FFEEEE;border:1px solid #666600;color:#660000;margin:20px;padding:20px 30px;text-align:center;"><strong>Avertissement!  &#8211;  Changement environement:<br />
</strong>Faire des modifications avec Apache et PHP sur un serveur en production peut causer des problèmes sérieux!  Il est conseillé de planifier et de pratiquer le déploiement AVANT de l&#8217;appliquer dans un environnement de production. Vous aurez été avertis!</div>
<p><strong>Varia:</strong></p>
<div>
<ul>
<li>Désinstallez toutes les instances de PHP que vous avez installé. Il est recommandé d&#8217;avoir la version stable pour un environement de production et que l&#8217;environement de développement réflète la production.</li>
<li>Dans mes environements de travail j&#8217;ai choisi d&#8217;utiliser <strong>Debian Linux (stable)</strong> courrant.  J&#8217;ai déjà utilisé d&#8217;autres distributions Linux pour des serveurs mais ça dépasse l&#8217;objectif de cet article.</li>
<li>Chaque ligne de commande commence soit par &#8220;$&#8221; (dollar sign)  ou &#8220;#&#8221; (hash mark). Le # signifie que vous entrez la commande en tant que <strong>root</strong></li>
<li>Le retour de chariot est illustré par un anti-slash &#8220;\&#8221;  car je veut éviter de changer la largeur du billet! Vous pouvez simplement tout coller sur une ligne.</li>
</ul>
</div>
<h3>Compilation de PHP 5.3</h3>
<p><span> </span></p>
<h4>1 Installer Apache</h4>
<p>La première étape est d&#8217;installer Apache. Il est possible de le faire avec plusieurs autres serveurs (lighttpd par exemple) mais je ne l&#8217;utilise pas (lighttpd) pour autre chose que du caching statique ou du Proxying. Alors je ne couvrirai pas comment faire. <a href="http://www.howtoforge.com/lighttpd_mysql_php_debian_etch">Cet article le fait</a>, par contre.</p>
<p>Cette commande devrait faire le travail.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev \</span>
apache2-utils apache2.2-common</pre></td></tr></table></div>

<h4>2. Installer MySQL et/ou PostgreSQL</h4>
<p>L&#8217;engin de base de donnée utilisé est le choix de chacun. Je suis personnellement habitué avec MySQL mais pouvoir avoir les deux peut être utile.</p>
<h5>PostgreSQL</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install postgresql-8.3 postgresql-client-8.3 \</span>
postgresql-client-common postgresql-common postgresql-server-dev-<span style="color: #000000;">8.3</span></pre></td></tr></table></div>

<h5>MySQL</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install mysql-client mysql-client-5.0    mysql-common \</span>
mysql-server mysql-server-<span style="color: #000000;">5.0</span> mysql-server-core-<span style="color: #000000;">5.0</span></pre></td></tr></table></div>

<h5>3. Installer les librairies requises</h5>
<p>PHP en tant que tel est facile a configurer mais les librairies externes font que c&#8217;est plus compliqué&#8230; malheureusement.  Ce qui est bien c&#8217;est qu&#8217;avec Debian la documentation est entretenue fréquemment et il est facile de se reprendre.</p>
<p>Plusieurs heures peuvent être prises pour simplement préparer la commande &#8220;configure&#8221;.  Avec ces notes vous devriez vous en sortir pas pire <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Voici les packages que Debian fournit pour ce que PHP demande, comme ça vous pourrez éviter d&#8217;installer arbitrairement plusieurs dizaines de paquets!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install libtidy-dev curl libcurl4-openssl-dev libcurl3 \</span>
libcurl3-gnutls zlib1g zlib1g-dev libxslt1-dev libzip-dev libzip1 \
libxml2 libsnmp-base libsnmp15 libxml2-dev libsnmp-dev libjpeg62 \
libjpeg62-dev libpng12-<span style="color: #000000;">0</span> libpng12-dev zlib1g zlib1g-dev libfreetype6 \
libfreetype6-dev libbz2-dev libxpm-dev libmcrypt-dev libmcrypt4</pre></td></tr></table></div>

<p><strong>Note</strong>:  libxpm4-dev proposé dans <a href="http://www.brandonsavage.net/installing-php-5-3-on-ubuntu/">ma source d&#8217;information</a> n&#8217;est pas trouvé dans Debian Lenny mis a jour le 2009-09-09 j&#8217;ai donc rectifié (pour libxpm-dev) la commande ci-haut.</p>
<h4>4. Télécharger le code source de PHP</h4>
<p>Visiter <a href="http://www.php.net/">http://www.php.net</a> et télécharger la version désirée. Actuellement, la version production est la 5.3</p>
<p>Personnellement je recommande d&#8217;avoir les fichiers de compilation dans /usr/src quoi que j&#8217;ai pas la conaissance de la science infuse <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /usr/src/</span>
<span style="color: #666666; font-style: italic;"># wget http://us3.php.net/get/php-5.3.0.tar.gz/from/this/mirror</span>
<span style="color: #666666; font-style: italic;"># tar xvfz php-5-3-0.tar.gz</span>
<span style="color: #666666; font-style: italic;"># cd php-5.3</span></pre></td></tr></table></div>

<h4>5. La commande Configure.</h4>
<p>La commande configure peut etre difficile a configurer surtout avec les librairies qu&#8217;on veut généralement mettre&#8230; généralement une certaine mesure du minimum.</p>
<p>Personnellement. Je recommande de faire la commande dans un fichier et de l&#8217;exécuter par la suite.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi configure.sh</span>
 .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-apxs2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apxs2 \
   <span style="color: #660033;">--with-tidy</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-curl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin <span style="color: #660033;">--with-curlwrappers</span> \
   <span style="color: #660033;">--with-openssl-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-mbstring</span> \
   <span style="color: #660033;">--with-xpm-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-xsl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-ldap</span> <span style="color: #660033;">--with-xmlrpc</span> \
   <span style="color: #660033;">--with-iconv-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-snmp</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-exif</span> <span style="color: #660033;">--enable-calendar</span> \
   <span style="color: #660033;">--with-bz2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mcrypt</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-gd</span> <span style="color: #660033;">--with-jpeg-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr \
   <span style="color: #660033;">--with-png-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-freetype-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr \
   <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--enable-zip</span> <span style="color: #660033;">--with-pear</span></pre></td></tr></table></div>

<p>Je suggère d&#8217;ajouter les commande ci bas au configure plus bas en fonction de votre choix de gestionnaire de base de donnée.</p>
<h5>PostgreSQL</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">--with-pdo-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr</pre></td></tr></table></div>

<h5>MySQL</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #660033;">--with-pdo-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mysqli</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config <span style="color: #660033;">--with-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr</pre></td></tr></table></div>

<p>Sortir avec :wq puis exécuter le script.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /bin/bash ./configure.sh</span></pre></td></tr></table></div>

<p>L&#8217;écran devrait bouger beaucoup&#8230; généralement dans la doc on conseille ici d&#8217;aller prendre un café!</p>
<p>&#8230; Si tout va bien tout devrait terminer par quelque chose qui ressemble à &#8220;Thanks for using php&#8221;. Sinon&#8230;. je conseille ma <a href="http://renoirboulanger.com/blog/2009/08/processus-pour-regler-un-probleme-avec-un-ordinateur/">solution aux problèmes numéro un</a>. <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Faut pas s&#8217;en faire. Généralement c&#8217;est de tenter avec &#8220;<strong>apt-cache search</strong>&#8221; et &#8220;<strong>apt-get install</strong>&#8221; le nom de la librairie manquante.</p>
<h4>6. Make et Make Install</h4>
<p>Pour l&#8217;installer. Maintenant que PHP est &#8220;configure&#8221;-é  il faut le compiler et l&#8217;installer avec make.</p>
<p>La commande est bien simple.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># make</span></pre></td></tr></table></div>

<p>Beaucoup de sortie ici aussi. Ça risque même d&#8217;être plus long dépendamment de la force du processeur disponible.  C&#8217;est le temps de prendre une marche, encore.</p>
<p>Une fois que tout est terminé avec make, vous pouvez faire, accessoirement un &#8220;make test&#8221;.</p>
<p>La dernière étape est de faire le &#8220;install&#8221;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># make -i install</span></pre></td></tr></table></div>

<p>Pourquoi le -i? Parceque Ubuntu/Debian risque d&#8217;avertir pour certaines erreurs a cause de la différence d&#8217;installation d&#8217;Apache de Debian/Ubuntu, nous le ferons nous même a bras plus loin dans ce document.</p>
<h4>7. Ajouter le module PHP dans Apache</h4>
<p>Il faut ajouter le module dans Apache pour qu&#8217;il puisse interpreter&#8230; c&#8217;est logique. Étant donné que la commande make -i a surement fait son travail (sous Debian), nous devons nous assurer que tout est en ordre dans la configuration d&#8217;Apache.</p>
<p>Premièrement, copier la librairie compilée:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># updatedb</span>
<span style="color: #666666; font-style: italic;"># locate libphp5</span>
...
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>libphp5.so
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.3.0<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>libphp5.la
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.3.0<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>libphp5.so
...
<span style="color: #666666; font-style: italic;"># cp /usr/src/php-5.3.0/libs/libphp5.so /usr/lib/apache2/modules/libphp5_3.so</span></pre></td></tr></table></div>

<p>Je commencer par mettre a jour la base de donnée &#8220;locate&#8221;, ensuite je cherche où est disponible la librairie, puis ensuite j&#8217;utilise &#8220;cp&#8221; pour déplacer sous un autre nom la librairie.</p>
<p>Ensuite,  dans le dossier:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /etc/apache2/mods-available</span></pre></td></tr></table></div>

<p>Créez un nouveau fichier appelé php5.load et copiez-y le contenu suivant:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">LoadModule php5_module <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>libphp5_3.so</pre></td></tr></table></div>

<p>Enregistrer le fichier. Ensuite créez un fichier appelé php5.conf et collez-y ce contenu:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php .phtml .php3
AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php-source .phps</pre></td></tr></table></div>

<p>On est prêts! Il faut le charger dans Apache:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># a2enmod php5</span>
Enabling module php5.
Run <span style="color: #ff0000;">&quot;/etc/init.d/apache2 restart&quot;</span> to activate new configuration<span style="color: #000000; font-weight: bold;">!</span>
<span style="color: #666666; font-style: italic;"># invoke-rc.d apache2 restart</span>
<span style="color: #000000; font-weight: bold;">*</span> Restarting web server apache2
...waiting    ...done.</pre></td></tr></table></div>

<h4>8. Tester l&#8217;installation</h4>
<p>C&#8217;est assez simple rendus là.</p>
<p>On commence par le binaire en ligne de commande:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ php <span style="color: #660033;">-v</span>
PHP 5.3.0 <span style="color: #7a0874; font-weight: bold;">&#40;</span>cli<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>built: Aug  <span style="color: #000000;">17</span> <span style="color: #000000;">2009</span> <span style="color: #000000;">19</span>:08:<span style="color: #000000;">32</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">1997</span>-<span style="color: #000000;">2009</span> The PHP Group
Zend Engine v2.3.0, Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">1998</span>-<span style="color: #000000;">2009</span> Zend Technologies</pre></td></tr></table></div>

<p>Tout va bien!</p>
<p>Ensuite, voir un phpinfo() dans le docroot. (Généralement /var/www/index.php).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
  <span style="color: #990000;">phpinfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><img class="size-full wp-image-1113" style="border:none;" title="PHP 5.3 phpinfo()" src="http://renoirboulanger.com/wp-content/uploads/2009/09/phpinfo_php5_3.png" alt="PHP 5.3 phpinfo()" width="612" height="429" /></p>
<h3>Conclusion</h3>
<p>Je crois avoir bien réussi mon interprétation et ma traduction de l&#8217;article que j&#8217;ai utilisé. J&#8217;y ai ajouté mon grain de sel et rectifié ce qui a marché pour moi. Je vous conseille de documenter pour vos propres besoins ce que vous faites, on sait jamais quand on a besoin de refaire ce qu&#8217;on a déjà fait !</p>
<h3>Références</h3>
<ul>
<li><strong><a lang="en" href="http://www.brandonsavage.net/installing-php-5-3-on-ubuntu/">BrandonSavage.net : Installing PHP 5.3 on Ubuntu</a> </strong></li>
<li><strong><a href="http://www.php-experts.org/developpement-web/5-plugins-indispensables-pour-coder-en-php-avec-lide-eclipse-22">5 plugins indispensables pour coder en PHP avec l&#8217;IDE Eclipse</a></strong><br />Un article que j&#8217;ai beaucoup apprécié car il mentionne ses propres plugins et j&#8217;ai cru bon les ajouter ici.</li>
<li><span lang="en">IBM developerworks</span> &#8220;<span lang="en">What&#8217;s new in PHP 5.3 (<a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new1/index.html">part 1</a>, <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new2/index.html?S_TACT=105AGX44&#038;S_CMP=ART">part 2</a>, <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new3/index.html?S_TACT=105AGX44&#038;S_CMP=ART">part 3</a>, and <a href="http://www.ibm.com/developerworks/opensource/library/os-php-5.3new4/index.html?S_TACT=105AGX44&#038;S_CMP=ART">part 4</a>)</span>&#8220;.</li>
<p><strong> </strong></ul>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie II</title>
		<link>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-ii/</link>
		<comments>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-ii/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 19:14:05 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[GeekNight]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sécurite]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=1086</guid>
		<description><![CDATA[Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie IICe billet est le deuxième d&#8217;une série d&#8217;articles décrivant la fabrication d&#8217;une Machine Virtuelle (VM) de développement pour une équipe de dévelopeurs.
Ce billet expliquera comment j&#8217;installe un système Linux que je considère de base pour une infrastructure d&#8217;hébergement applicatif. Je ne couvrirai [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-ii/' class='retweet '  style='display:block;margin:10px 0px;' >Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie II</a><p>Ce billet est le <strong>deuxième</strong> d&#8217;une série d&#8217;articles décrivant la fabrication d&#8217;une Machine Virtuelle (VM) de développement pour une équipe de dévelopeurs.</p>
<p>Ce billet expliquera comment j&#8217;installe un système Linux que je considère de base pour une infrastructure d&#8217;hébergement applicatif. Je ne couvrirai pas les configurations plus avancés pour améliorer la sécurité. Je risque de le faire plus tard.<br />
<span id="more-1086"></span><br />
J&#8217;ai séparé cette série en quatre volets.</p>
<ol>
<li><strong><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i">Description du concept</a></strong> (article précédent)
<p>Ce que je vais discuter dans cette série d&#8217;articles n&#8217;est pas nécessairement connu de tous. Je vais donc vulgariser un peu avant de commencer.</li>
<li><strong>Installation du système</strong> (cet article)
<p>Je donne ici mon secret de magicien avec quelques configurations que je considère importantes pour un environement d&#8217;hébergement web pour améliorer la sécruité (le strict minimum pour cette série d&#8217;articles. Je pourrai en faire un plus poussé plus tard).</li>
<li><strong><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-iii">Compilation de PHP 5.3</a></strong>
<p>Comment installer Apache 2.x avec le dernier cutting-edge PHP.</li>
<li><strong>Installation de l&#8217;environnement de développement avec Eclipse PDT</strong> (à venir)
<p>La magie se passe par là! Avec ce setup votre équipe pourra répliquer l&#8217;installation de développement a volonté.</li>
</ol>
<h3><a name="BaseSystem"></a>Installation du système de base</h3>
<p>J&#8217;utilise personnellement Debian Linux depuis quelques années car je le trouve plus léger que Red Hat Enterprise Linux ou n&#8217;importe quelle saveur de RedHat (Fedora, CentOS, etc)</p>
<p><strong>Note: </strong>Je n&#8217;expliquerai pas comment faire pour  <a href="http://linux.justinhartman.com/Installing_a_Debian_Etch_base_system">installer Debian Linux de base (dans une VM)</a> car c&#8217;est un sujet déjà largement couvert.</p>
<p>Personnellement j&#8217;installe le système avec la version actuelle provenant d&#8217;un mini boot server que j&#8217;ai sur un réseau que je partage avec quelques amis.</p>
<p>Une installation simple <a href="http://linux.justinhartman.com/Installing_a_Debian_Etch_base_system">comme celle ci</a>, ferait très bien l&#8217;affaire.</p>
<ul>
<li>Utiliser le dernier Debian stable</li>
<li>à l&#8217;écran &#8220;<strong>Debian Software Installation</strong>&#8221; <strong>Je coche</strong> généralement ~<strong>rien</strong>~, car<strong> je vais donner plus de détails</strong> ici.</li>
</ul>
<p>Les étapes&#8230;</p>
<ol>
<li>Modifier le

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><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>sources.list</pre></td></tr></table></div>

<p>et <strong>Enlever la mention du CD-rom</strong> et <strong>Ajouter la mention &#8220;<tt>contrib</tt>&#8220;</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">deb http:<span style="color: #000000; font-weight: bold;">//</span>debian.savoirfairelinux.net<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> lenny main
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>debian.savoirfairelinux.net<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> lenny main
deb http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> lenny<span style="color: #000000; font-weight: bold;">/</span>updates main contrib
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> lenny<span style="color: #000000; font-weight: bold;">/</span>updates main contrib
&nbsp;
deb http:<span style="color: #000000; font-weight: bold;">//</span>ftp.debian.org<span style="color: #000000; font-weight: bold;">/</span>debian lenny contrib
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>ftp.debian.org<span style="color: #000000; font-weight: bold;">/</span>debian lenny contrib
&nbsp;
deb http:<span style="color: #000000; font-weight: bold;">//</span>debian-multimedia.org<span style="color: #000000; font-weight: bold;">/</span> lenny main
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>debian-multimedia.org<span style="color: #000000; font-weight: bold;">/</span> lenny main</pre></td></tr></table></div>

<p><strong>Note:</strong> Il s&#8217;agit de mon propre <tt>sources.list</tt> ayant trouvé <tt>savoirfairelinux</tt> comme étant le plus rapide en utilisant <a href="http://linuxhelp.blogspot.com/2007/05/using-netselect-apt-tip-to-select.html">netselect-apt</a> et la liste des <a href="http://www.debian.org/mirror/list">mirroirs Debian</a></li>
<li>Updater les sources

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get update</span></pre></td></tr></table></div>

</li>
<li>Installer les paquets essentiels

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install openssh-server mlocate screen sudo vim ntpdate linux-headers-$(uname -r) syslog-ng build-essential open-vm-tools</span></pre></td></tr></table></div>

<p><strong>Note:</strong> remarquez la présence de <tt>open-vm-tools</tt> il s&#8217;agit d&#8217;un package provenant de Debian contrib pour les VM <strong>VMware</strong> (n&#8217;installez pas si vous utilisez <tt>Xen</tt>)&#8230; au lieu de compiler vm-ware-tools pour le kernel&#8230; Debian s&#8217;en occupe (!!)</li>
<li>Ajouter les droits sudo à <tt>sudo</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># visudo</span></pre></td></tr></table></div>

<ol>
<li>Va ouvrir <tt><a href="http://en.wikipedia.org/wiki/Pico_%28text_editor%29">pico</a></tt></li>
<li>Décommenter <strong><tt>%sudo ALL=NOPASSWD: ALL</tt></strong></li>
<li>Pour quitter, faire CTRL+x y ENTER</li>
</ol>
</li>
<li>Updater la DB de mlocate

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># updatedb</span></pre></td></tr></table></div>

</li>
<li>Lier killall5 sous le nom legacy de <tt>killall</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ln -s /sbin/killall5 /sbin/killall</span></pre></td></tr></table></div>

</li>
<li>suivre <strong>Procédure de configuration de NTP pour les serveurs</strong>.<br />
<strong>Note</strong> L&#8217;idée est d&#8217;éviter d&#8217;utiliser en mémoire les démons le plus possible. Si utile soit-il (comme ajuster l&#8217;heure, ici). Il est plus pratique qu&#8217;elle soit ajustée aux heures et laisser l&#8217;espace mémoire pour son usage primaire.</p>
<ol>
<li>Entrer en édition dans le fichier

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>ntpdate</pre></td></tr></table></div>

</li>
<li>Trouver dans le fichier la variable <strong><tt>NTPSERVERS</tt></strong>, <strong>Remplacer</strong>, soit par&#8230;

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">NTPSERVERS</span>=<span style="color: #ff0000;">&quot;0.ca.pool.ntp.org 1.ca.pool.ntp.org 2.ca.pool.ntp.org&quot;</span></pre></td></tr></table></div>

</li>
<li>Faire i (pour Insert)</li>
<li>Ajouter a <tt>NTPOPTIONS</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">NTPOPTIONS</span>=<span style="color: #ff0000;">&quot;-u&quot;</span></pre></td></tr></table></div>

</li>
<li>Faire ESCAPE</li>
<li>:wq</li>
<li>Créer un fichier <tt>cron.hourly</tt>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.hourly<span style="color: #000000; font-weight: bold;">/</span>ntpdate</pre></td></tr></table></div>

</li>
<li>Ajouter le contenu

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>ntpdate ; <span style="color: #000000; font-weight: bold;">then</span>
        . <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>ntpdate
<span style="color: #000000; font-weight: bold;">else</span>
        <span style="color: #007800;">NTPSERVERS</span>=<span style="color: #ff0000;">&quot;0.ca.pool.ntp.org&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NTPSERVERS</span>&quot;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate <span style="color: #660033;">-s</span> <span style="color: #007800;">$NTPOPTIONS</span> <span style="color: #007800;">$NTPSERVERS</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">1</span>
<span style="color: #666666; font-style: italic;"># Exit with a succes anyway, avoids spamming root.</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

</li>
<li>Changer les permissions pour qu&#8217;il puisse être exécuté

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.hourly<span style="color: #000000; font-weight: bold;">/</span>ntpdate</pre></td></tr></table></div>

</li>
<li>Essayer

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.hourly<span style="color: #000000; font-weight: bold;">/</span>ntpdate</pre></td></tr></table></div>

</li>
<li>Voir dans syslog, ça devrait ressembler à&#8230;

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># tail /var/log/syslog</span>
...
Dec <span style="color: #000000;">30</span> <span style="color: #000000;">13</span>:<span style="color: #000000;">39</span>:<span style="color: #000000;">35</span> willow ntpdate<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1912</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: adjust <span style="color: #000000; font-weight: bold;">time</span> server 192.168.1.5 offset <span style="color: #000000;">0.005642</span> sec
...</pre></td></tr></table></div>

</li>
</ol>
</li>
<li>Installer le service d&#8217;envoi courriel&#8230;
<p>Question de pouvoir <strong>recevoir les avertissements</strong> par courriel</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install postfix</span></pre></td></tr></table></div>

<ol>
<li>Satellite System (On veut envoyer les courriels ailleurs et rien garder ici)</li>
<li>&#8220;Mail name?&#8221;&#8230;  <strong><tt>NOMDELAVM</tt></strong></li>
<li>&#8220;SMTP relay host?&#8221;&#8230;  votre relai SMTP fourni par votre fournisseur</li>
<li>&#8220;Other destinations&#8230;&#8221; Ajuster les noms</li>
<li>Enter</li>
<li>&#8220;Local networks?&#8221;&#8230; ENTER</li>
<li>&#8230;</li>
<li>Tester l&#8217;envoi<br />
(<strong>NOTE:</strong> vous pouvez aussi utiliser l&#8217;outil Debian <tt>swaks</tt>)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mail test@test.com</span>
Subject: Patate <span style="color: #000000;">1</span> am
Message, qui doit terminer avec une ligne seule et un point .
.
Cc:</pre></td></tr></table></div>

</li>
<li>Regarder les mails du destinataire.</li>
</ol>
</li>
</ol>
<h3>Références</h3>
<ul>
<li><a lang="en" href="http://www.vmware.com/products/server/">VMware Server</a> (anglais seulement)</li>
<li><a lang="en" href="http://linux.justinhartman.com/Installing_a_Debian_Etch_base_system">Installing a Debian Base system</a> (anglais seulement)</li>
<li><a lang="en" href="http://helpdeskgeek.com/virtualization/creating-a-virtual-machine-on-vmware-server/">Creating a Virtual Machine on VMware server</a> (anglais seulement)</li>
<li><a lang="en" href="http://linuxhelp.blogspot.com/2007/05/using-netselect-apt-tip-to-select.html">Using <tt>netselect-apt</tt> tip to select</a> (anglais seulement)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie I</title>
		<link>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i/</link>
		<comments>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 18:53:14 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=722</guid>
		<description><![CDATA[Pour développer, j'utilise depuis deux ans une <em>machine virtuelle</em> (VM) Linux (minimale) qui me sert de "bac à sable"... Le but de cette série d'articles. Dans cette VM il y a tout les outils nécessaires aux projets en-cours et ils sont configurés pour refléter l'environnement de production où je déploie mon travail.

Ce type d'installation est idéal car il permet d'avoir a installer les prérequis une seule fois et pouvoir les dupliquer pour tout les dévelopeurs. Sans oublier que vous n'avez plus de préoccupations de licences logicielles.

A la fin de cette série d'articles vous aurez accès a une VM qui représentera votre environement de production (ajuster à vos besoins de production, évidemment).]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i/' class='retweet '  style='display:block;margin:10px 0px;' >Une VM Linux qui sert au développement PHP 5.3 avec Eclipse &#8211; partie I</a><p><img class="size-medium wp-image-1082" style="border: none; float: right;" title="La Virtualisation c'est comme des roches en équilibre" src="http://renoirboulanger.com/wp-content/uploads/2009/09/virtualization-200x300.jpg" alt="La Virtualisation c'est comme des roches en équilibre" width="200" height="300" />Ce billet est le <strong>premier</strong> d&#8217;une série d&#8217;articles décrivant la fabrication d&#8217;une Machine Virtuelle (VM) de développement pour une équipe de dévelopeurs.</p>
<p>Je mentionne PHP 5.3 mais en fait ce type d&#8217;installation pourrait être utilisé pour n&#8217;importe quelle technologie web qui peut rouler sous Linux (<tt>Ruby on Rails</tt>, <tt>Java</tt>, <tt>Perl</tt>, etc).</p>
<p>J&#8217;ai séparé cette série en quatre volets.</p>
<ol>
<li><strong>Description du concept</strong> (cet article)Ce que je vais discuter dans cette série d&#8217;articles n&#8217;est pas nécessairement connu de tous. Je vais donc vulgariser un peu avant de commencer.</li>
<li><strong><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-ii/">Installation du système</a></strong>Je donne ici mon secret de magicien avec quelques configurations que je considère importantes pour un environement d&#8217;hébergement web pour améliorer la sécruité (le strict minimum pour cette série d&#8217;articles. Je pourrai en faire un plus poussé plus tard).</li>
<li><strong><a href="http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-iii">Compilation de PHP 5.3</a></strong>Comment installer Apache 2.x avec le dernier cutting-edge PHP.</li>
<li><strong>Installation de l&#8217;environnement de développement avec Eclipse PDT</strong> (à venir)La magie se passe par là! Avec ce setup votre équipe pourra répliquer l&#8217;installation de développement a volonté.</li>
</ol>
<div style="background: #ececec; margin: 5px 0px; padding: 18px 8px 8px 50px; border: 1px solid #333;">
<h4 style="color: #777; margin-bottom: 10px;">Mise à jour et façon différente de fonctionner</h4>
<p>Dans un billet plus récent (que celui-ci) <a href="http://renoirboulanger.com/blog/2010/07/installer-une-machine-virtuelle-linux-roulant-dans-vmware-fusion-sous-mac-os-x/">j&#8217;explique comment le faire pour un Mac</a>.</p>
</div>
<h3>Mise en contexte</h3>
<p>Pour développer, j&#8217;utilise depuis deux ans une <em>machine virtuelle</em> (VM) Linux (minimale) qui me sert de &#8220;bac à sable&#8221;&#8230; Le but de cette série d&#8217;articles. Dans cette VM il y a tout les outils nécessaires aux projets en-cours et ils sont configurés pour refléter l&#8217;environnement de production où je déploie mon travail.</p>
<p>Ce type d&#8217;installation est idéal car il permet d&#8217;avoir a installer les prérequis une seule fois et pouvoir les dupliquer pour tout les dévelopeurs. Sans oublier que vous n&#8217;avez plus de préoccupations de licences logicielles.</p>
<p>A la fin de cette série d&#8217;articles vous aurez accès a une VM qui représentera votre environement de production (ajuster à vos besoins de production, évidemment).<br />
<span id="more-722"></span></p>
<h3>Concept</h3>
<p>Comme j&#8217;<a href="http://renoirboulanger.com/blog/2007/11/mon-espace-de-travail/">en ai déjà parlé ici</a> une VM roule avec toutes les versions désirés pour pouvoir développer et tester live le code développé. Le code est envoyé au serveur de source (<tt>git</tt>, <tt>subversion</tt>, <tt>cvs</tt>, etc) de toute façon.  C&#8217;est ce qui rend cette VM &#8220;jettable&#8221; et facilement copiée pour des collègues.</p>
<p>C&#8217;est très utile car souvent, les outils utilisés (serveur applicatif, environement de développement, configuration de &#8220;debug&#8221;, scripts sur mesure de l&#8217;équipe infrastructure) doivent être reproduits le plus fidèlement au niveau développement pour s&#8217;assurer de ne pas tomber sur des coquilles rendu au jour &#8220;J&#8221;.</p>
<p>Ok. Trève de présentations!</p>
<h3>Versions de VMware</h3>
<p>Étant donné que tout roule dans une machine virtuelle, il faut savoir laquelle utiliser. Je résume ici leur usage recommandé. Personnellement j&#8217;ai seulement utilisé VMware comme outil de virtualisation. Vous êtes libres d&#8217;utiliser <a href="http://www.xen.org/">Xen</a> ou <a href="http://en.wikipedia.org/wiki/FreeBSD_jail">Jail (avec FreeBSD)</a> si vous avez plus d&#8217;Expérience.</p>
<p>Il y a aussi d&#8217;autres choix bien illustrés dans cet article <a lang="en" href="http://www.dedoimedo.com/computers/virtualization.html">Virtualization, plenty of choices</a></p>
<h4><a href="http://www.vmware.com/products/workstation/">VMware workstation</a></h4>
<p>Est idéale pour chaque poste de travail qui va utiliser cette VM de développement.</p>
<h4><a href="http://www.vmware.com/products/server/">VMware server</a></h4>
<p>Pour les machines de l&#8217;environement de <em>staging</em> avec lesquelles vous voulez avoir le contrôle sur le système d&#8217;exploitation en dessous.</p>
<p>Mais selon-moi, le meilleur a utiliser c&#8217;est&#8230;</p>
<h4><a href="http://www.vmware.com/products/esxi/">VMware server ESXi</a></h4>
<p>Un serveur VMware de 30 Méga-octets qui ne fait QUE rouler des VMs. Le seul hic c&#8217;est qu&#8217;il faut que ce soit un serveur-rack plus ou moins récent (après 2005 environ).</p>
<h4>Installation dans une VM</h4>
<p>Je vous recommande de vous inspirer de ce tutoriel pour l&#8217;installation: <a lang="en" href="http://helpdeskgeek.com/virtualization/creating-a-virtual-machine-on-vmware-server/">Creating a Virtual Machine on VMware server</a>, en anglais)</p>
<h3>Suite</h3>
<p>Commençons par l&#8217;installation de la machine virtuelle.</p>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2009/09/une-vm-linux-qui-sert-au-developpement-php-5-3-avec-eclipse-partie-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un firewall simple sous Linux avec «Ferm»</title>
		<link>http://renoirboulanger.com/blog/2009/08/un-firewall-simple-sous-linux-avec-%c2%abferm%c2%bb/</link>
		<comments>http://renoirboulanger.com/blog/2009/08/un-firewall-simple-sous-linux-avec-%c2%abferm%c2%bb/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 04:12:06 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[GeekNight]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sécurite]]></category>
		<category><![CDATA[Tutoriels]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=751</guid>
		<description><![CDATA[Un firewall simple sous Linux avec «Ferm»Attention: Article Technique!
Dans le but de faire profiter la postérité et ma mémoire personnelle voici mon premier post d&#8217;une série d&#8217;articles spécialisée sur Linux.
Ces articles proviennent de ma voûte documentaire professionnelle et personnelle.
Évidemment pour les publier ici je dois censurer les détails sensibles, vous me comprendrez (!)
Le fait de [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2009/08/un-firewall-simple-sous-linux-avec-%c2%abferm%c2%bb/' class='retweet '  style='display:block;margin:10px 0px;' >Un firewall simple sous Linux avec «Ferm»</a><p>Attention: Article Technique!</p>
<p>Dans le but de faire profiter la postérité et ma mémoire personnelle voici mon premier post d&#8217;une série d&#8217;articles spécialisée sur Linux.</p>
<p>Ces articles proviennent de ma voûte documentaire professionnelle et personnelle.</p>
<p>Évidemment pour les publier ici je dois censurer les détails sensibles, vous me comprendrez (!)</p>
<p>Le fait de les avoir dans le format Wiki Markup de Confluence&#8230; et les traduire ici demande du temps pour les reformatter pour mon blogue.</p>
<h2>D&#8217;autres articles spécialisés Debian Linux</h2>
<p>D&#8217;autres articles technique (pour Debian Linux) seront aussi disponibles dans les prochaines semaines.</p>
<p>Voici une liste de quelques uns que je compte publier:</p>
<ol>
<li>Monter une machine en SNMP v2c en lecture seule</li>
<li>Permettre des updates aux serveurs NTP a l&#8217;heure</li>
<li>Installer VMware server 2 sur Debian</li>
<li>Augumenter le niveau de sécurité pour Infra Publique sous Debian</li>
<li>Procédure configuration SYSLOG-NG vers un serveur de log</li>
</ol>
<p>J</p>
<p><span id="more-751"></span></p>
<h2>Installer et configurer</h2>
<p>En fait, sous Debian c&#8217;est pas très compliqué, on ajoute le paquet, puis on le configure comme mentionné plus bas.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get update</span>
<span style="color: #666666; font-style: italic;"># apt-get install ferm libnet-dns-perl perl iptables</span></pre></td></tr></table></div>

<p>J&#8217;ai fait une petite version qui permet d&#8217;utiliser des variables et mettre le code un peu plus clean (d&#8217;un point de vue programmeur).</p>
<p>Vous pouvez remplacer par ce code ci:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># -*- shell-script -*-</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#  Configuration file for ferm(1).</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># vmware-mgmt = 8333</span>
<span style="color: #666666; font-style: italic;"># vmware-console = 902</span>
<span style="color: #666666; font-style: italic;"># ntop = 3000</span>
<span style="color: #666666; font-style: italic;"># ... ports ajoutes dans /etc/services</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Source http://www.krzywanski.net/archives/90</span>
<span style="color: #666666; font-style: italic;"># Interfaces</span>
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$DEV_LOCAL</span> = lo;
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$DEV_LAN</span> = <span style="color: #7a0874; font-weight: bold;">&#40;</span>eth1 vmnet1 vmnet8<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$DEV_INTERNET</span> = eth0;
&nbsp;
<span style="color: #666666; font-style: italic;"># Ports</span>
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$PORTS</span> = <span style="color: #7a0874; font-weight: bold;">&#40;</span>ntp name http https smtp<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># Known IPs</span>
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$SSH_ALLOWED</span> = <span style="color: #7a0874; font-weight: bold;">&#40;</span>69.159.234.55 192.168.2.1<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$SSH_DYNDNS</span> = <span style="color: #000000; font-weight: bold;">@</span>resolve<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>somehost.renoirboulanger.com someotherhost.somenetwork.net<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># SSH Clients</span>
<span style="color: #000000; font-weight: bold;">@</span>def <span style="color: #007800;">$SSH_CLIENTS</span> = <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$SSH_ALLOWED</span> <span style="color: #007800;">$SSH_DYNDNS</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
&nbsp;
table filter <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    chain INPUT <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        policy DROP;
&nbsp;
        <span style="color: #666666; font-style: italic;"># connection tracking</span>
        mod state state INVALID DROP;
        mod state state <span style="color: #7a0874; font-weight: bold;">&#40;</span>ESTABLISHED RELATED<span style="color: #7a0874; font-weight: bold;">&#41;</span> ACCEPT;
&nbsp;
        <span style="color: #666666; font-style: italic;"># allow local packages</span>
        interface <span style="color: #007800;">$DEV_LOCAL</span> ACCEPT;
        interface <span style="color: #007800;">$DEV_LAN</span> ACCEPT;
&nbsp;
        <span style="color: #666666; font-style: italic;"># allow ping from the administrator's network</span>
        interface <span style="color: #007800;">$DEV_INTERNET</span> saddr <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$SSH_DYNDNS</span> <span style="color: #007800;">$SSH_ALLOWED</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> proto icmp icmp-type echo-request ACCEPT;
&nbsp;
        <span style="color: #666666; font-style: italic;"># respond to ping</span>
        proto icmp icmp-type echo-request ACCEPT;
&nbsp;
        <span style="color: #666666; font-style: italic;"># allow SSH connections</span>
        proto tcp dport <span style="color: #000000;">2522</span> ACCEPT;
&nbsp;
        proto tcp dport <span style="color: #007800;">$PORTS</span> ACCEPT;
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
    chain OUTPUT <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        policy ACCEPT;
&nbsp;
        <span style="color: #666666; font-style: italic;"># connection tracking</span>
        mod state state INVALID DROP;
        mod state state <span style="color: #7a0874; font-weight: bold;">&#40;</span>ESTABLISHED RELATED<span style="color: #7a0874; font-weight: bold;">&#41;</span> ACCEPT;
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
    chain FORWARD <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        policy DROP;
&nbsp;
        <span style="color: #666666; font-style: italic;"># connection tracking</span>
        mod state state INVALID DROP;
        mod state state <span style="color: #7a0874; font-weight: bold;">&#40;</span>ESTABLISHED RELATED<span style="color: #7a0874; font-weight: bold;">&#41;</span> ACCEPT;
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>Pour plus de détails a propos de la syntaxe, <a href="http://ferm.foo-projects.org/download/2.0/ferm.html">voir la documentation</a>.</p>
<h2>Autres ressources</h2>
<p>J&#8217;ai utilisé, entre autres ces ressources pour m&#8217;inspirer de ce mini-tutoriel</p>
<ol>
<li><a href="http://www.debian.org/doc/manuals/securing-debian-howto">Securing Debian HOWTO</a></li>
<li><a href="http://www.tldp.org/HOWTO/Security-HOWTO/">Linux Security HOWTO</a></li>
<li><a href="http://www.cromwell-intl.com/security/security-firewall.html">Firewall Tools</a></li>
<li><a href="http://www.debian.org/security/">Debian Security</a></li>
<li><a href="http://www.debian.org/doc/debian-policy/">Debian Policies</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2009/08/un-firewall-simple-sous-linux-avec-%c2%abferm%c2%bb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

