<?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>Etienne Lachance &#187; Tutoriel</title>
	<atom:link href="http://etiennelachance.com/category/tutoriel/feed/" rel="self" type="application/rss+xml" />
	<link>http://etiennelachance.com</link>
	<description></description>
	<lastBuildDate>Mon, 21 Jun 2010 15:33:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installer un serveur DNS(bind) avec un backend MySQL sous Ubuntu 10.04</title>
		<link>http://etiennelachance.com/2010/06/installer-un-serveur-dnsbind-avec-un-backend-mysql-sous-ubuntu-10-04/</link>
		<comments>http://etiennelachance.com/2010/06/installer-un-serveur-dnsbind-avec-un-backend-mysql-sous-ubuntu-10-04/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 18:53:46 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[dlz]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=138</guid>
		<description><![CDATA[But Installation d&#8217;un serveur DNS(bind9) avec un backend MySQL sous Ubuntu 10.04 Pré-requis Préparer l&#8217;environement en exécutant : mkdir -p /usr/local/src/bind9 cd /usr/local/src/bind9 Installer les pacquets nessécaires : apt-get update -y apt-get install -y build-essential mysql-server fakeroot bison libmysqlclient15-dev \ libkrb5-dev libkrb5-dev libssl-dev libtool libdb-dev libldap2-dev libldap2-dev libcap2-dev \ hardening-wrapper debhelper libxml2-dev libgeoip-dev apt-get source [...]]]></description>
			<content:encoded><![CDATA[<h2>But</h2>

<p>Installation d&#8217;un serveur DNS(bind9) avec un backend MySQL sous Ubuntu 10.04</p>

<h2>Pré-requis</h2>

<ol>
    <li>Préparer l&#8217;environement en exécutant :


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</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>src<span style="color: #000000; font-weight: bold;">/</span>bind9
<span style="color: #7a0874; font-weight: bold;">cd</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>src<span style="color: #000000; font-weight: bold;">/</span>bind9</pre></div></div>



</li>
    <li>Installer les pacquets nessécaires :


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update <span style="color: #660033;">-y</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> build-essential mysql-server fakeroot <span style="color: #c20cb9; font-weight: bold;">bison</span> libmysqlclient15-dev \
 libkrb5-dev libkrb5-dev libssl-dev libtool libdb-dev libldap2-dev libldap2-dev libcap2-dev \
 hardening-wrapper debhelper libxml2-dev libgeoip-dev
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #660033;">-y</span> bind9</pre></div></div>



</li>
</ol>

<h2>BIND</h2>

<h3>Préparation</h3>

<ol>
    <li>Récupurer le nom du répertoire (varie selon la version)


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span></pre></div></div>



Voici un exemple de résultat, le nom recherché est marqué en <strong>gras</strong>
<blockquote><strong>bind9-9.5.1.dfsg.P2</strong> bind9_9.5.1.dfsg.P2-1.diff.gz  bind9_9.5.1.dfsg.P2-1.dsc bind9_9.5.1.dfsg.P2.orig.tar.gz</blockquote>
</li>
    <li>Entrer dans le répertoire


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> bind9-9.5.1.dfsg.P2</pre></div></div>



</li>
    <li>Éditer le fichier des règles de compilation


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> debian<span style="color: #000000; font-weight: bold;">/</span>rules</pre></div></div>



Et changer la ligne <strong>&#8211;with-dlz-mysql=no</strong> par    <strong>&#8211;with-dlz-mysql=yes</strong> ou vous pouvez exécuter la commande  suivante dans <strong>vi</strong> :


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">:<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">/</span>dlz-mysql=no<span style="color: #000000; font-weight: bold;">/</span>dlz-mysql=yes<span style="color: #000000; font-weight: bold;">/</span>g</pre></div></div>



Enregistrer le fichier et quitter


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">:wq</pre></div></div>



</li>
</ol>

<h3>Compilation</h3>

<p>Pour compiler l&#8217;application exécuter la commande suivante :</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-buildpackage <span style="color: #660033;">-rfakeroot</span> <span style="color: #660033;">-b</span></pre></div></div>


<table border="0" cellspacing="0" cellpadding="2" width="701" bgcolor="#ffcccc"><col width="22"></col> <col width="671"></col>
<tbody>
<tr>
<td width="22" valign="TOP"></td>
<td width="671">Si <strong>dpkg-buildpackage</strong> vous spécifie qu&#8217;il manque des           dépendances (<em>unmet dependencies</em>) Installer les            dépendances avec la commande <strong>apt-get install</strong> et           réessailler.</td>
</tr>
</tbody>
</table>

<h3>Installation</h3>

<ol>
    <li>Reculer d&#8217;un répertoire :


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span></pre></div></div>



<blockquote>bind9-9.5.1.dfsg.P2 bind9_9.5.1.dfsg.P2-1_amd64.changes     bind9_9.5.1.dfsg.P2-1_amd64.deb bind9_9.5.1.dfsg.P2-1.diff.gz   bind9_9.5.1.dfsg.P2-1.dsc bind9_9.5.1.dfsg.P2.orig.tar.gz   bind9-doc_9.5.1.dfsg.P2-1_all.deb   bind9-host_9.5.1.dfsg.P2-1_amd64.deb    bind9utils_9.5.1.dfsg.P2-1_amd64.deb    dnsutils_9.5.1.dfsg.P2-1_amd64.de   libbind9-40_9.5.1.dfsg.P2-1_amd64.deb   libbind-dev_9.5.1.dfsg.P2-1_amd64.deb   libdns45_9.5.1.dfsg.P2-1_amd64.deb  libisc45_9.5.1.dfsg.P2-1_amd64.deb  libisccc40_9.5.1.dfsg.P2-1_amd64.deb    libisccfg40_9.5.1.dfsg.P2-1_amd64.deb   liblwres40_9.5.1.dfsg.P2-1_amd64.deb    lwresd_9.5.1.dfsg.P2-1_amd64.deb</blockquote>
</li>
    <li>Installer les pacquets sur votre système.


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">*</span>.deb</pre></div></div>



</li>
</ol>

<h3>Configuration</h3>

<ol>
    <li>Forcer bind a être exécuter en    un seul <em>thread</em>. Éditier le fichier <strong>/etc/default/bind9</strong><strong>/etc/default/bind9</strong>
<ol>
    <li>run resolvconf? RESOLVCONF=yes</li>
    <li>startup options for the server      OPTIONS=&#8221;-u bind <strong>-n 1</strong>&#8221;
<table border="0" cellspacing="0" cellpadding="2" width="654" bgcolor="#ffffce"><col width="22"></col> <col width="624"></col>
<tbody>
<tr>
<td width="22" valign="TOP"></td>
<td width="624">Bind semble avoir un problème lorsque qu&#8217;il est exécuter en                   <em>multithread</em>. L&#8217;erreur <em>&#8220;mysql driver unable to                  return result set for findzone query&#8221;</em> apparait dans                    les fichier de log et bind fini par arrêter.</td>
</tr>
</tbody>
</table>
</li>
</ol>

<p></li>
    <li>Voici un exemple pour le fichier    <strong>/etc/bind/named.conf.local</strong><strong>cat  /etc/bind/named.conf.local</strong></p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dlz <span style="color: #ff0000;">&quot;Mysql zone&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
   database <span style="color: #ff0000;">&quot;mysql
   {host=localhost dbname=Nom_de_la_Base_de_Donnee user=Nom_d_utilisateur pass=Mot_de_passe ssl=false}
   {select zone from dns_records where zone = '<span style="color: #007800;">$zone</span>$'}
   {select ttl, type, mx_priority, case when lower(type)='txt' then concat('<span style="color: #000099; font-weight: bold;">\&quot;</span>', data, '<span style="color: #000099; font-weight: bold;">\&quot;</span>')
        when lower(type) = 'soa' then concat_ws(' ', data, resp_person, serial, refresh, retry, expire, minimum)
        else data end from dns_records where zone = '<span style="color: #007800;">$zone</span>$' and host = '<span style="color: #007800;">$record</span>$'}&quot;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>


<p></li>
</ol></p>

<h2><span id="more-138"></span></h2>

<h2>MySQL</h2>

<h3>Creation d&#8217;un utilisateur et d&#8217;une base de données</h3>


<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #000099;">USER</span> <span style="color: #008000;">'Nom<span style="color: #008080; font-weight: bold;">_</span>d<span style="color: #008080; font-weight: bold;">_</span>Utilisateur'</span>@<span style="color: #008000;">'localhost'</span> IDENTIFIED BY  <span style="color: #008000;">'***'</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">USAGE</span> <span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #CC0099;">*</span> . <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">TO</span>  <span style="color: #008000;">'Nom<span style="color: #008080; font-weight: bold;">_</span>d<span style="color: #008080; font-weight: bold;">_</span>Utilisateur'</span>@<span style="color: #008000;">'localhost'</span> IDENTIFIED BY  <span style="color: #008000;">'***'</span> <span style="color: #990099; font-weight: bold;">WITH</span> MAX_QUERIES_PER_HOUR <span style="color: #008080;">0</span> MAX_CONNECTIONS_PER_HOUR <span style="color: #008080;">0</span> MAX_UPDATES_PER_HOUR <span style="color: #008080;">0</span> MAX_USER_CONNECTIONS <span style="color: #008080;">0</span> <span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">DATABASE</span> <span style="color: #990099; font-weight: bold;">IF <span style="color: #CC0099; font-weight: bold;">NOT</span> EXISTS</span>  <span style="color: #008000;">`Nom<span style="color: #008080; font-weight: bold;">_</span>de<span style="color: #008080; font-weight: bold;">_</span>la<span style="color: #008080; font-weight: bold;">_</span>base<span style="color: #008080; font-weight: bold;">_</span>de<span style="color: #008080; font-weight: bold;">_</span>donnée`</span> <span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">ALL</span> <span style="color: #990099; font-weight: bold;">PRIVILEGES</span> <span style="color: #990099; font-weight: bold;">ON</span>  <span style="color: #008000;">`Nom<span style="color: #008080; font-weight: bold;">_</span>de<span style="color: #008080; font-weight: bold;">_</span>la<span style="color: #008080; font-weight: bold;">_</span>base<span style="color: #008080; font-weight: bold;">_</span>de<span style="color: #008080; font-weight: bold;">_</span>donnée`</span>.<span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">TO</span>  <span style="color: #008000;">'Nom<span style="color: #008080; font-weight: bold;">_</span>d<span style="color: #008080; font-weight: bold;">_</span>Utilisateur'</span>@<span style="color: #008000;">'localhost'</span><span style="color: #000033;">;</span></pre></div></div>


<h3>Création du schéma</h3>

<p>Exécuter sur le serveur SQL :</p>


<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #990099; font-weight: bold;">IF <span style="color: #CC0099; font-weight: bold;">NOT</span> EXISTS</span> <span style="color: #008000;">`dns<span style="color: #008080; font-weight: bold;">_</span>records`</span> <span style="color: #FF00FF;">&#40;</span>
  <span style="color: #008000;">`id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`zone`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">64</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`host`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">64</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`type`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">8</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`data`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">64</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`ttl`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'3600'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`mx<span style="color: #008080; font-weight: bold;">_</span>priority`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`refresh`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'3600'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`retry`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'3600'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`expire`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'86400'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`minimum`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'3600'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`serial`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">20</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'2008082700'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`resp<span style="color: #008080; font-weight: bold;">_</span>person`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">64</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'resp.person.email'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`primary<span style="color: #008080; font-weight: bold;">_</span>ns`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">64</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'ns1.yourdns.here'</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`data<span style="color: #008080; font-weight: bold;">_</span>count`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span>
  <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`id`</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`host`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`host`</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`zone`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`zone`</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`type`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`type`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #CC0099;">=</span>MyISAM  <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #FF9900; font-weight: bold;">CHARSET</span><span style="color: #CC0099;">=</span>latin1<span style="color: #000033;">;</span></pre></div></div>


<h3>Donnée d&#8217;exemple</h3>


<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">INSERT</span> <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #008000;">`dns<span style="color: #008080; font-weight: bold;">_</span>records`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`id`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`zone`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`host`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`type`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`data`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`ttl`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`mx<span style="color: #008080; font-weight: bold;">_</span>priority`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`refresh`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`retry`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`expire`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`minimum`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`serial`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`resp<span style="color: #008080; font-weight: bold;">_</span>person`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`primary<span style="color: #008080; font-weight: bold;">_</span>ns`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`data<span style="color: #008080; font-weight: bold;">_</span>count`</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">VALUES</span>
<span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span> <span style="color: #008000;">'test.cat.io'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'www'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'A'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1.2.3.4'</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">86400</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">2008082700</span><span style="color: #000033;">,</span> <span style="color: #008000;">'resp.person.email'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'ns1.yourdns.here'</span><span style="color: #000033;">,</span> <span style="color: #008080;">0</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
<span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span> <span style="color: #008000;">'test.cat.io'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'patate'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'A'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'245.241.2.1'</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">86400</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">2008082700</span><span style="color: #000033;">,</span> <span style="color: #008000;">'resp.person.email'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'ns1.yourdns.here'</span><span style="color: #000033;">,</span> <span style="color: #008080;">0</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
<span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span> <span style="color: #008000;">'test.cat.io'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'@'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'A'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1.2.3.4'</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">86400</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">2008082700</span><span style="color: #000033;">,</span> <span style="color: #008000;">'resp.person.email'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'ns1.yourdns.here'</span><span style="color: #000033;">,</span> <span style="color: #008080;">0</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
<span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span> <span style="color: #008000;">'test.cat.io'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'www2'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'CNAME'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'www.domain.com.'</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">86400</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">2008082700</span><span style="color: #000033;">,</span> <span style="color: #008000;">'resp.person.email'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'ns1.yourdns.here'</span><span style="color: #000033;">,</span> <span style="color: #008080;">0</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
<span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #000033;">,</span> <span style="color: #008000;">'test.cat.io'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'@'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'MX'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'domain.com.'</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">0</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">86400</span><span style="color: #000033;">,</span> <span style="color: #008080;">3600</span><span style="color: #000033;">,</span> <span style="color: #008080;">2008082700</span><span style="color: #000033;">,</span> <span style="color: #008000;">'resp.person.email'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'ns1.yourdns.here'</span><span style="color: #000033;">,</span> <span style="color: #008080;">0</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>


<h2>Redémarrer et tester</h2>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">reboot</pre></div></div>


<h2>References</h2>

<ul>
    <li><a href="http://diaryproducts.net/about/operating_systems/unix/installing_bind9_with_dlz_and_mysql_backend_on_ubuntu_jaunty_9_04">http://diaryproducts.net/about/operating_systems/unix/installing_bind9_with_dlz_and_mysql_backend_on_ubuntu_jaunty_9_04</a></li>
    <li><a href="http://bind-dlz.sourceforge.net/mysql_driver.html">http://bind-dlz.sourceforge.net/mysql_driver.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/06/installer-un-serveur-dnsbind-avec-un-backend-mysql-sous-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu : Changer les boutons de côté dans la barre de titre</title>
		<link>http://etiennelachance.com/2010/05/ubuntu-changer-les-boutons-de-cote-dans-la-barre-de-titre/</link>
		<comments>http://etiennelachance.com/2010/05/ubuntu-changer-les-boutons-de-cote-dans-la-barre-de-titre/#comments</comments>
		<pubDate>Mon, 03 May 2010 17:21:17 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=129</guid>
		<description><![CDATA[Plusieurs personnes sont insatisfaite du changement, vers la gauche, des boutons dans Lucid Voici une procédure simple pour remettre les boutons à Droite gconftool-2 --set &#34;/apps/metacity/general/button_layout&#34; --type string &#34;:minimize,maximize,close&#34; C&#8217;est aussi simple pour les remettre à Gauche gconftool-2 --set &#34;/apps/metacity/general/button_layout&#34; --type string &#34;maximize,minimize,close:&#34; Et voilà !! =)]]></description>
			<content:encoded><![CDATA[<p>Plusieurs personnes sont insatisfaite du changement, vers la gauche, des boutons dans Lucid</p>

<p>Voici une procédure simple pour remettre les boutons à <strong>Droite</strong></p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">--set</span> <span style="color: #ff0000;">&quot;/apps/metacity/general/button_layout&quot;</span> <span style="color: #660033;">--type</span> string <span style="color: #ff0000;">&quot;:minimize,maximize,close&quot;</span></pre></div></div>


<p>C&#8217;est aussi simple pour les remettre à <strong>Gauche </strong></p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">--set</span> <span style="color: #ff0000;">&quot;/apps/metacity/general/button_layout&quot;</span> <span style="color: #660033;">--type</span> string <span style="color: #ff0000;">&quot;maximize,minimize,close:&quot;</span></pre></div></div>


<p>Et voilà !! =)</p>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/05/ubuntu-changer-les-boutons-de-cote-dans-la-barre-de-titre/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation d&#8217;OpenLDAP sous Ubuntu 9.10 ou 10.4</title>
		<link>http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/</link>
		<comments>http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 18:23:36 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=123</guid>
		<description><![CDATA[Description La configuration d&#8217;OpenLDAP c&#8217;est un peu compliquer. cn=config est toujours utilisé, par contre lors de l&#8217;installation du paquet, uniquement un squelette de la configuration est installé. On ne vous demande plus de mot de passe lors de l&#8217;installation du paquet et &#8220;dpkg-reconfigure slapd&#8221; ne fait que restaurer le squelette de la configuration initial.  Vous [...]]]></description>
			<content:encoded><![CDATA[<h2>Description</h2>

<p>La configuration d&#8217;OpenLDAP c&#8217;est un peu compliquer. cn=config est toujours utilisé, par contre lors de l&#8217;installation du paquet, uniquement un squelette de la configuration est installé.</p>

<p>On ne vous demande plus de mot de passe lors de l&#8217;installation du paquet et &#8220;dpkg-reconfigure slapd&#8221; ne fait que restaurer le squelette de la configuration initial.  Vous devez utiliser le compte <strong>root</strong> (ou sudo) pour configurer la base de donnée, dn et acl.</p>

<p>Voici une procédure sur comment installer OpenLDAP sous Ubuntu 9.10 ou 10.4.</p>

<p>Le guide officiel sur <a rel="nofollow" href="http://help.ubuntu.com/">help.ubuntu.com</a> n&#8217;est pas à jour et ne spécifie pas comment installer OpenLDAP sous Karmic ou Lucid.</p>

<p>Dans ce tutoriel nous utiliserons <em>dc=example,dc=com</em> comme arbre LDAP.  Ajuster en conséquence.</p>

<p><span id="more-123"></span></p>

<h2>Pré-requis</h2>

<p>Avoir installé Ubuntu</p>

<p>Paquets à installer :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> slapd ldap-utils</pre></div></div>



</div>

<p></div></p>

<h2>Configuration</h2>

<h3>Étape 1: Changer de répertoire pour /etc/ldap :</h3>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap</pre></div></div>



</div>

<p></div></p>

<h3>Étape 2: Ajouter les schéma que vous avez de besoin, car uniquement le schema core est ajouté par défaut :</h3>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>cosine.ldif
ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>inetorgperson.ldif
ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>nis.ldif</pre></div></div>



</div>

<p></div>
<strong>Note</strong>: Il faut entrer <strong>CHAQUE LIGNE</strong>, ce ne sont pas des commentaires.</p>

<h3>Étape 3:  Ajouter le module de base de donnée et la créer.</h3>

<p>Créer un fichier : <em>db.ldif</em></p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> db.ldif</pre></div></div>



</div>

<p></div>
et ajouter le text suivant :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;"># Load dynamic backend modules
dn: cn=module{0},cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: {0}back_hdb
&nbsp;
# Create the database
dn: olcDatabase={1}hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=example,dc=com
olcRootDN: cn=admin,dc=example,dc=com
olcRootPW: example
olcDbConfig: {0}set_cachesize 0 2097152 0
olcDbConfig: {1}set_lk_max_objects 1500
olcDbConfig: {2}set_lk_max_locks 1500
olcDbConfig: {3}set_lk_max_lockers 1500
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcDbIndex: uid pres,eq
olcDbIndex: cn,sn,mail pres,eq,approx,sub
olcDbIndex: objectClass eq</pre></div></div>



</div>

<p></div></p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> db.ldif</pre></div></div>



</div>

<p></div>
Prendre note que <em>olcRootPW: example</em> spécifie le mot de passe. Remplacer <em>example</em> par le mot de passe désiré.</p>

<h3>Étape 4: Créer le dn de base et ajouter le compte administrateur pour le serveur OpenLDAP.</h3>

<p>Modifer le text suivant a vos besoins the text below to your needs and wants and generate a password for the admin account. La chaine MD5 présente dans l&#8217;exemple représente : <em>example</em></p>

<p>Créer un mot de passe encrypter pour le compte administrateur, avec la commande suivante :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">slappasswd <span style="color: #660033;">-h</span></pre></div></div>



</div>

<p></div>
Entrer le mot de passe désiré 2 fois et copier le résultat dans le text plus bas.</p>

<p>Créer le fichier <em>base.ldif</em>:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> base.ldif</pre></div></div>



</div>

<p></div>
Contenu du fichier base.ldif:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: dc=example,dc=com
objectClass: dcObject
objectclass: organization
o: example.com
dc: example
description: My LDAP Root
&nbsp;
dn: cn=admin,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
userPassword:{MD5}Gnmk1g3mcY6OWzJuM4rlMw==
description: LDAP administrator</pre></div></div>



</div>

<p></div>
Ajouter à la base de donnée avec la commande suivante :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> base.ldif</pre></div></div>



</div>

<p></div></p>

<h3>Étape 5: Modifier le système d&#8217;acl (liste de contrôle d&#8217;accès)</h3>

<p>Il y a quelques acl dans la configuration d&#8217;OpenLDAP qui prévient la connexion à partir d&#8217;un client ldap comme <a rel="nofollow" href="http://phpldapadmin.sourceforge.net/wiki/index.php/Main_Page">phpldapadmin</a> ou <a rel="nofollow" href="http://directory.apache.org/studio/">Apache Directory Sudio</a>, alors nous allons ajuster les droits pour <em>cn=admin,cn=config</em>. Après cette modification l&#8217;option -D cn=admin,cn=config sera nécessaire pour ce connecter au serveur LDAP.</p>

<p>Créer un fichier <em>config.ldif</em></p>

<p>vi config.ldif</p>

<p>Contenu du fichier <em>config.ldif</em>:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: cn=config
changetype: modify
delete: olcAuthzRegexp
&nbsp;
dn: olcDatabase={-1}frontend,cn=config
changetype: modify
delete: olcAccess
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
delete: olcRootDN
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootDN
olcRootDN: cn=admin,cn=config
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {MD5}Gnmk1g3mcY6OWzJuM4rlMw==
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
delete: olcAccess</pre></div></div>



</div>

<p></div>
Prendre note de ne pas oublier de changer la valeur de <em>olcRootPW</em> par le mot de passe en MD5 créé plutôt.</p>

<p>Intégrer dans OpenLDAP :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> config.ldif</pre></div></div>



</div>

<p></div></p>

<h3>Étape 6: Ajuster les acl du LDAP</h3>

<p>Maintenant nous devons ajouter quelques droits au LDAP, root possède les droits de lecture et d&#8217;écriture, parcontre l&#8217;acl suivant représente celui qui à toujours été livré avec OpenLDAP dans le passé.</p>

<p>Créer un fichier nommé acl.ldif :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> acl.ldif</pre></div></div>



</div>

<p></div>
Contenu du fichier acl.ldif:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: olcDatabase={1}hdb,cn=config
add: olcAccess
olcAccess: to attrs=userPassword,shadowLastChange by dn=&quot;cn=admin,dc=example,dc=com&quot; write by anonymous auth by self write by * none
olcAccess: to dn.base=&quot;&quot; by * read
olcAccess: to * by dn=&quot;cn=admin,dc=example,dc=com&quot; write by * readNow load the acl into the openldap server:</pre></div></div>



</div>

<p></div></p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapmodify <span style="color: #660033;">-x</span> <span style="color: #660033;">-D</span> <span style="color: #007800;">cn</span>=admin,<span style="color: #007800;">cn</span>=config <span style="color: #660033;">-W</span> <span style="color: #660033;">-f</span> acl.ldif</pre></div></div>



</div>

<p></div>
Voilà!  Un OpenLDAP fonctionnel.</p>

<h2>Références</h2>

<ul>
    <li><a rel="nofollow" href="http://www.howtoforge.com/install-and-configure-openldap-on-ubuntu-karmic-koala">http://www.howtoforge.com/install-and-configure-openldap-on-ubuntu-karmic-koala</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Comment réinitialisé un mot de passe pour Atlassian Fisheye</title>
		<link>http://etiennelachance.com/2010/03/comment-reinitialise-un-mot-de-passe-pour-atlassian-fisheye/</link>
		<comments>http://etiennelachance.com/2010/03/comment-reinitialise-un-mot-de-passe-pour-atlassian-fisheye/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 14:54:03 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[fisheye]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=115</guid>
		<description><![CDATA[Symptômes Si vous avez oublié ou perdu le mot de passe admin, vous devez le réinitialiser manuellement. Résolution Pour réinitialiser le mot de passe admin, éditer le fichier FISHEYE_INST/config.xml (faire une copie de sauvegarde avant, bien-sur). Vous allez voir quelques chose comme : cd7a5b7a060bc8c1ddb069c4bcf5c113 Changer le &#8220;admin-hash&#8221; pour admin-hash="21232F297A57A5A743894A0E4A801FC3" 1813a7cb35446559d4598d2294462941 Redémarrer Fisheye pour que cela prend effet. Vous [...]]]></description>
			<content:encoded><![CDATA[<h2>Symptômes</h2>

<p>Si vous avez oublié ou perdu le mot de passe admin, vous devez le réinitialiser manuellement.</p>

<h2>Résolution</h2>

<p>Pour réinitialiser le mot de passe admin, éditer le fichier <tt>FISHEYE_INST/config.xml</tt> (faire une copie de sauvegarde avant, bien-sur).</p>

<p>Vous allez voir quelques chose comme :</p>

<div>
<div>


cd7a5b7a060bc8c1ddb069c4bcf5c113


</div>

<p></div>
Changer le &#8220;admin-hash&#8221; pour <tt>admin-hash="21232F297A57A5A743894A0E4A801FC3"</tt></p>

<div>
<div>


1813a7cb35446559d4598d2294462941


</div>

<p></div>
Redémarrer Fisheye pour que cela prend effet. Vous pouvez maintenant vous identifier dans la section Administration de Fisheye avec le mot de passe : <strong>admin</strong>. Prenez note de changer le mot de passe dans l&#8217;interface.</p>

<h2>Référence</h2>

<ul>
    <li><a href="http://confluence.atlassian.com/display/FISHKB/How+to+reset+the+Admin+password+in+Fisheye+or+Crucible" target="_blank">http://confluence.atlassian.com/display/FISHKB/How+to+reset+the+Admin+password+in+Fisheye+or+Crucible</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/03/comment-reinitialise-un-mot-de-passe-pour-atlassian-fisheye/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conversion d’un fichier vidéo vers un fichier flv</title>
		<link>http://etiennelachance.com/2010/03/conversion-d%e2%80%99un-fichier-video-vers-un-fichier-flv/</link>
		<comments>http://etiennelachance.com/2010/03/conversion-d%e2%80%99un-fichier-video-vers-un-fichier-flv/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 18:13:36 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=109</guid>
		<description><![CDATA[Démarrer le logiciel WinFF (http://winff.org) Cliquer sur ajouter pour ajouter des vidéo à convertir. Sélectionner le profil de sortie tel que spécifier. Attendre la convertion … Si vous avez de besoin de paramètre avancé, vous pouvez consulter la documentation pour le programme ffmpeg (logiciel utilisé en arrière plan) http://ffmpeg.org/documentation.html]]></description>
			<content:encoded><![CDATA[<ol>
    <li>Démarrer le logiciel WinFF (<a href="http://winff.org/">http://winff.org</a>)
<a href="http://etiennelachance.com/wp-content/uploads/2010/03/convert-00.jpg"><img class="alignnone size-medium wp-image-110" title="convert-00" src="http://etiennelachance.com/wp-content/uploads/2010/03/convert-00-300x235.jpg" alt="" width="300" height="235" /></a></li>
    <li>Cliquer sur ajouter pour ajouter des vidéo à convertir.
<a href="http://etiennelachance.com/wp-content/uploads/2010/03/convert-01.jpg"><img class="alignnone size-medium wp-image-111" title="convert-01" src="http://etiennelachance.com/wp-content/uploads/2010/03/convert-01-300x235.jpg" alt="" width="300" height="235" /></a></li>
    <li>Sélectionner le profil de sortie tel que spécifier.
<a href="http://etiennelachance.com/wp-content/uploads/2010/03/convert-02.jpg"><img class="alignnone size-medium wp-image-112" title="convert-02" src="http://etiennelachance.com/wp-content/uploads/2010/03/convert-02-300x219.jpg" alt="" width="300" height="219" /></a></li>
    <li>Attendre la convertion …
<a href="http://etiennelachance.com/wp-content/uploads/2010/03/convert-03.jpg"><img class="alignnone size-medium wp-image-113" title="convert-03" src="http://etiennelachance.com/wp-content/uploads/2010/03/convert-03-300x150.jpg" alt="" width="300" height="150" /></a></li>
    <li>Si vous avez de besoin de paramètre avancé, vous pouvez consulter la documentation pour le programme ffmpeg (logiciel utilisé en arrière plan)
<a href="http://ffmpeg.org/documentation.html">http://ffmpeg.org/documentation.html</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/03/conversion-d%e2%80%99un-fichier-video-vers-un-fichier-flv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk 1.6 : Installation, compilation et configuration du CDR via MySQL</title>
		<link>http://etiennelachance.com/2009/11/asterisk-cdr-mysql/</link>
		<comments>http://etiennelachance.com/2009/11/asterisk-cdr-mysql/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 20:54:53 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[cdr]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pbx]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=86</guid>
		<description><![CDATA[Introduction Pour continuer la série d&#8217;article sur asterisk, celuis-ci vous expliquera comment compiler et installer les modules complémentaire (addons) d&#8217;asterisk. Ainsi comment configurer le CDR (Call Detail Record, registre des appels en français). Bonne lecture. Veuiller prendre note que les versions spécifier dans cet artricle sont les derniers versions stables disponible lors de la création [...]]]></description>
			<content:encoded><![CDATA[<h2 id="Pré-requis">Introduction</h2>

<p>Pour continuer la série d&#8217;article sur asterisk, celuis-ci vous expliquera comment compiler et installer les modules complémentaire (addons) d&#8217;asterisk.  Ainsi comment configurer le CDR (<em>Call Detail Record</em>, registre des appels en français).  Bonne lecture.
Veuiller prendre note que les versions spécifier dans cet artricle sont les derniers versions stables disponible lors de la création de celui-ci.</p>

<h2 id="Pré-requis"><span id="more-86"></span></h2>

<h2>Description</h2>

<p>Les modules complémentaire d&#8217;asterisk comprend ceci :</p>

<ul>
    <li>Applications
<ul>
    <li>app_addon_sql_mysql (Interface pour MySQL)</li>
    <li>app_saycountpl (gadget selon moi)</li>
</ul>

<p></li>
    <li>Call Detail Recording</p>

<ul>
    <li>cdr_addon_mysql (pour enregistrer le registre des appels dans MySQL, le but de l&#8217;article)</li>
</ul>

<p></li>
    <li>Channel Drivers</p>

<ul>
    <li>chan_mobile (Pilote pour les périphérique Bluetooth)</li>
    <li>chan_ooh323 (<a href="http://www.obj-sys.com/open/html/index.shtml" target="_blank">Objective Open H.323</a>)</li>
</ul>

<p></li>
    <li>Format Interpreters</p>

<ul>
    <li>format_mp3 (ça le dit, supporter le format MP3)</li>
</ul>

<p></li>
    <li>Ressource Modules</p>

<ul>
    <li>res_config_mysql (pour la configuration en temps réel )</li>
</ul>

<p></li>
</ul></p>

<h2 id="Pré-requis">Pré-requis</h2>

<p>Avoir installé une Debian de Base, <a title="Asterisk" href="/2009/11/compilation-et-installation-dasterisk-1-6-1-9-sous-debian-lenny/">Asterisk</a> et MySQL serveur</p>

<p>Paquets à installer :</p>

<blockquote>


62c9ba5635304e178d4ef67dbe136f1e


</blockquote>

<p>Télécharger les modules complémentaires d&#8217;asterisk :</p>

<blockquote>
<pre># wget <a href="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.2-rc1.tar.gz">http://downloads.asterisk.org/pub/telephony/asterisk/releases\
/asterisk-addons-1.6.1.2-rc1.tar.gz</a></pre>
</blockquote>

<h2 id="Compilation">Compilation</h2>

<blockquote>


7e9e26c109b5e3d0caeeb3bada23631f


</blockquote>

<p>Les options au script <strong>./configure</strong>, sont des variables pour le standard Debian.
La commande <strong>make menuconfig</strong> est optionnel, utiliser la si vous voulez personaliser les modules d’asterisk</p>

<blockquote>


cfc6b75427c595fd9e9e45665cba24d9


</blockquote>

<p>La commande <strong>make samples</strong> va créer des fichiers de configuration de base dans le répertoire <em>/etc/asterisk</em></p>

<h2 id="Pré-requis">Configuration</h2>

<h3>Serveur MySQL</h3>

<p>Veuiller créer une table dans MySQL, voici le template :</p>

<blockquote>


63ec40caf5fbe8aa128f6de6b3b25705


</blockquote>

<h3>/etc/asterisk/cdr_mysql.conf</h3>

<blockquote>
<pre>[global] 
hostname=<em>l'adresse de votre serveur MySQL
</em>dbname=<em>nom_de_la_base_de_donnée</em>
table=<em>nom_de_la_table</em>
password=<em>le_mot_de_passe</em>
user=<em>nom_de_l'usager</em>
port=3306
;sock=/tmp/mysql.sock</pre>
</blockquote>

<h2>Finalement</h2>

<p>Redémarrer Asterisk et le tout devrait fonctionner.  Si vous avez des questions, laisser moi un commentaire.</p>

<h2>Référence</h2>

<ul>
    <li><a href="http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql">http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2009/11/asterisk-cdr-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compilation et Installation d&#8217;Asterisk 1.6.1.9 sous debian lenny</title>
		<link>http://etiennelachance.com/2009/11/compilation-et-installation-dasterisk-1-6-1-9-sous-debian-lenny/</link>
		<comments>http://etiennelachance.com/2009/11/compilation-et-installation-dasterisk-1-6-1-9-sous-debian-lenny/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 19:02:39 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[pbx]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=62</guid>
		<description><![CDATA[Introduction Ceci est le premier post d&#8217;une série sur l&#8217;installation et la configuration du PBX open source Asterisk. Vive l&#8217;open source !! =) Dans ce tutoriel je vais démontre comment installer Asterisk 1.6.1.9 (version stable de la branche 1.6 lors de la création de ce post). Pré-requis Avoir installé une Debian de Base Paquet à [...]]]></description>
			<content:encoded><![CDATA[<h2 id="Pré-requis">Introduction</h2>

<p>Ceci est le premier post d&#8217;une série sur l&#8217;installation et la configuration du PBX open source Asterisk. Vive l&#8217;open source !!  =)
Dans ce tutoriel je vais démontre comment installer Asterisk 1.6.1.9 (version stable de la branche 1.6 lors de la création de ce post).</p>

<h2 id="Pré-requis">Pré-requis</h2>

<p>Avoir installé une Debian de Base</p>

<p>Paquet à installer :</p>

<blockquote>


25afbf64b8b8f955e4d373eb4b767c8b


</blockquote>

<p>Télécharger asterisk :</p>

<blockquote>
<pre># wget <a href="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.9.tar.gz">http://downloads.asterisk.org/pub/telephony/asterisk/\
releases/asterisk-1.6.1.9.tar.gz</a></pre>
</blockquote>

<h2 id="Compilation"><span id="more-62"></span>Configuration et compilation</h2>

<blockquote>


570051ec38277330d8ac8a54a49b0e6c


</blockquote>

<p>Les options au script <strong>./configure</strong>, sont des variables pour le standard Debian.
La commande <strong>make menuconfig</strong> est optionnel, utiliser la si vous voulez personaliser les modules d&#8217;asterisk</p>

<blockquote>


cfc6b75427c595fd9e9e45665cba24d9


</blockquote>

<p>La commande <strong>make samples</strong> va créer des fichiers de configuration de base dans le répertoire <em>/etc/asterisk</em></p>

<h2 id="Pré-requis">Référence</h2>

<ul>
    <li>Fichier README fournie avec l&#8217;archive d&#8217;asterisk</li>
    <li><a href="http://www.asterisk.org/">http://www.asterisk.org/</a></li>
    <li><a href="http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/rules">http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/rules</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2009/11/compilation-et-installation-dasterisk-1-6-1-9-sous-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment générer un fichier XML valide à partir de PHP &#8211; version echo</title>
		<link>http://etiennelachance.com/2009/11/comment-generer-un-fichier-xml-valide-a-partir-de-php-version-echo/</link>
		<comments>http://etiennelachance.com/2009/11/comment-generer-un-fichier-xml-valide-a-partir-de-php-version-echo/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 14:09:19 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=73</guid>
		<description><![CDATA[Introduction Prenons par exemple que vous générez le tableau suivant, à partir d&#8217;un code PHP, et que vous voulez générer un fichier XML à partir des même données. My CD Collection Title Artist Empire Burlesque Bob Dylan Hide your heart Bonnie Tyler Greatest Hits Dolly Parton Still got the blues Gary Moore Modification du code [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>

<p>Prenons par exemple que vous générez le tableau suivant, à partir d&#8217;un code PHP, et que vous voulez générer un fichier XML à partir des même données.</p>

<blockquote>
<h2>My CD Collection</h2>
<table border="1">
<tbody>
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<tr>
<td>Empire Burlesque</td>
<td>Bob Dylan</td>
</tr>
<tr>
<td>Hide your heart</td>
<td>Bonnie Tyler</td>
</tr>
<tr>
<td>Greatest Hits</td>
<td>Dolly Parton</td>
</tr>
<tr>
<td>Still got the blues</td>
<td>Gary Moore</td>
</tr>
</tbody>
</table>
</blockquote>

<h2>Modification du code</h2>

<p>Voici un exemple de code source :</p>

<blockquote>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// prendre note que le tableau(array) $catalog doit exister</span>
<span style="color: #666666; font-style: italic;">// il peut être généré par programmation ou bien par une base de donnée</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;html&gt;
&lt;body&gt;
&lt;h2&gt;My CD Collection&lt;/h2&gt;
&lt;table border=&quot;1&quot;&gt;
	&lt;tr bgcolor=&quot;#9acd32&quot;&gt;
		&lt;th&gt;Title&lt;/th&gt;
		&lt;th&gt;Artist&lt;/th&gt;
	&lt;/tr&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
		<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$catalog</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$cd</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$cd</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$cd</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'artist'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;<span style="color: #000000; font-weight: bold;">&lt;?</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>



</blockquote>

<p>Maintenant modifions le code source pour générer un fichier XML :</p>

<blockquote>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// prendre note que le tableau(array) $catalog doit exister</span>
<span style="color: #666666; font-style: italic;">// il peut être généré par programmation ou bien par une base de donnée</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
header (&quot;Content-Type:text/xml&quot;);			// spécifie à php d'envoyer l'en-tête XML
echo '<span style="color: #000000; font-weight: bold;">&lt;?</span>xml version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1.0&quot;</span> encoding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ISO-8859-1&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>';	// voir plus bas
&lt;catalog&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
		<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$catalog</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$cd</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;cd&gt;
		&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$cd</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;
		&lt;artist&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$cd</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'artist'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/artist&gt;
	&lt;/cd&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/catalog&gt;</pre></div></div>



</blockquote>

<p>Faire attention à ligne <strong>echo &#8216;<?xml version="1.0" encoding="ISO-8859-1"?>&#8216;; </strong>
Ne pas utiliser la syntax :</p>

<blockquote>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">// code</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>xml version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1.0&quot;</span> encoding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ISO-9959-1&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #666666; font-style: italic;">// code suite</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>



</blockquote>

<p>Parce que cela va générer une erreur PHP.</p>

<h2>Résultat</h2>

<p>Voici finalement la résultante du script :</p>

<blockquote>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;">&lt;?<span style="color: #000066;">xmlversion</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;ISO-8859-1&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;catalog<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Empire Burlesque<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Bob Dylan<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hide your heart<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Bonnie Tyler<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Greatest Hits<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Dolly Parton<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Still got the blues<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Gary Moore<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/catalog<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>



</blockquote>

<h2>Référence</h2>

<ul>
    <li><a href="http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog">http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog</a></li>
    <li><a href="http://www.php.net/manual/en/simplexml.examples-basic.php">http://www.php.net/manual/en/simplexml.examples-basic.php</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2009/11/comment-generer-un-fichier-xml-valide-a-partir-de-php-version-echo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mise en page d&#8217;un fichier XML avec XSLT</title>
		<link>http://etiennelachance.com/2009/11/mise-en-page-dun-fichier-xml-avec-xslt/</link>
		<comments>http://etiennelachance.com/2009/11/mise-en-page-dun-fichier-xml-avec-xslt/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 13:11:24 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[stylesheet]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xsl]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=67</guid>
		<description><![CDATA[Introduction Comme vous savez XML est un language de structuration de données et non de présentation. Ainsi XSL (eXtensible StyleSheet Language) est un language recommandé par le W3C pour effectuer la représentation des donnée d&#8217;un document XML. XML est un language permettant de définir des feuille de style pour les document XML, au même titre [...]]]></description>
			<content:encoded><![CDATA[<h2 id="Introduction">Introduction</h2>

<p>Comme vous savez XML est un language de structuration de données et non de présentation.  Ainsi XSL (<em>eXtensible StyleSheet Language</em>) est un language recommandé par le W3C pour effectuer la représentation des donnée d&#8217;un document XML.</p>

<p>XML est un language permettant de définir des feuille de style pour les document XML, au même titre que les CSS (<em>Cascading StyleSheets</em>) pour le language HTML.  XSL est compatible avec les CSS.</p>

<p>Toutefois, contrairement aux CSS, XSL permet aussi de retraiter un document XML afin d&#8217;en modifier totalement sa structure, ce qui permet à partir d&#8217;un document XML d&#8217;être capable de générer d&#8217;autres types de documents (PostScript, HTML, Tex, RTF, &#8230;) ou bien un fichier XML de structure différente.</p>

<p>Ainsi la structuration des données (définie par XML) et leur représentation (définie par un langage tel que XSL) sont séparées. Cela signifie qu&#8217;il est possible à partir d&#8217;un document XML de créer des documents utilisant différentes représentations (HTML pour créer des pages web, WML pour les mobiles WAP, &#8230;).</p>

<h2 id="Configurationduserveur">XSLT</h2>

<p>XSLT ou <em>eXtensible Stylesheet Transformation</em> permet de transformer la structure des éléments XML.</p>

<p align="justify">Un document XML peut être représenté comme une structure arborescente. Ainsi XSLT permet de transformer les documents XML à l&#8217;aide de feuilles de style contenant des règles appelées <strong>template rules</strong> (ou <em>règles de gabarit</em> en français).</p>

<p align="justify">Le processeur XSLT (composant logiciel chargé de la transformation) crée un structure logique arborescente (on parle d&#8217;<strong>arbre source</strong>) à partir du document XML et lui fait subir des transformations selon les <em>template rules</em> contenues dans la feuille XSL pour produire un <strong>arbre résultat</strong> représentant, par exemple, la structure d&#8217;un document HTML. Les composants de l&#8217;arbre résultat sont appelés <em>objets de flux</em>.</p>

<p align="justify">Chaque <em>template rule</em> définit des traitements à effectuer sur un élément (noeud ou feuille) de l&#8217;arbre source. On appelle &#8220;<strong>patterns</strong>&#8221; (en français <em>motifs</em>, parfois &#8220;<em>éléments cibles</em>&#8220;) les éléments de l&#8217;arbre source.</p>

<p align="center"><img src="http://static.commentcamarche.net/www.commentcamarche.net/pictures/xml-images-template.gif" alt="template rules et patterns" /></p>

<p align="justify">L&#8217;arbre source peut être entièrement remodelé et filtré ainsi qu&#8217;ajouter du contenu à l&#8217;arbre résultat, si bien que l&#8217;arbre résultat peut être radicalement différent de l&#8217;arbre source.</p>

<h2 id="Configurationduserveur">Structure d&#8217;un document XSL</h2>

<p>Un document XSL étant un document XML, il commence obligatoirement par la balise suivante :</p>

<blockquote>


70205f3f977e2dcd6319bc2f747eb65d


</blockquote>

<p>D&#8217;autre part, toute feuille de style XSL est comprise entre les balises <em>&lt;xsl:stylesheet &#8230;&gt;</em> et <em>&lt;/xsl:stylesheet&gt;</em>.  La balise <em>xsl:stylesheet</em> encapsule des balises <em>xsl:template</em> définissant les transformations à faire subir à certains éléments du document XML.</p>

<blockquote>


3ba7a2ef3d38f0a6b7036e8c4d54197c


<pre>&lt;xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform</a>"&gt;
    &lt;xsl:template ... &gt;
        &lt;!-- traitements à effectuer --&gt;
    &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</pre>
</blockquote>

<h2 id="Configurationduserveur">Association d&#8217;une feuille XSL à un document XML</h2>

<p>Une feuille de style XSL (enregistré dans un fichier dont l&#8217;extension est <em>.xsl</em>) peut être liée à un document XML (de telle manière à ce que le document XML utilise la feuille XSL) en insérant la balise suivante au début du document XML :</p>

<blockquote>


2cee1de5d62ac6afaf725a40ddc95eaa


</blockquote>

<h2>Exemple de transformation</h2>

<p align="justify">Les template rules sont des balises XSL permettant de définir des opérations à réaliser sur certains éléments du document XML utilisant la page XSL, c&#8217;est-à-dire généralement de transformer un tag XML en un tag HTML (généralement plusieurs).</p>

<p align="justify">Voici un exemple simple de transformation via XSLT :</p>

<p align="justify">Le fichier XML source (<em>data.xml</em>):</p>

<blockquote>


36211b4790c6064cfca83228f08b206b




84674794fe0392892ad43adb83118f40


</blockquote>

<p>Le fichier XSL (<em>template.xsl</em>):</p>

<blockquote>
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform</a>"&gt;</pre>


ddd750512ee1e60b9427d2665827f9af


</blockquote>

<p>Voici la représentation de la résultante:</p>

<h2>My CD Collection</h2>

<table border="1">
<tbody>
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<tr>
<td>Empire Burlesque</td>
<td>Bob Dylan</td>
</tr>
<tr>
<td>Hide your heart</td>
<td>Bonnie Tyler</td>
</tr>
<tr>
<td>Greatest Hits</td>
<td>Dolly Parton</td>
</tr>
<tr>
<td>Still got the blues</td>
<td>Gary Moore</td>
</tr>
</tbody></table>

<h2>Références</h2>

<ul>
    <li>
<div><a href="http://www.w3schools.com/xsl/">http://www.w3schools.com/xsl/</a></div></li>
    <li>
<div><a href="http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog">http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog</a></div></li>
    <li>
<div><a href="http://www.commentcamarche.net/contents/xml/xmlxsl.php3">http://www.commentcamarche.net/contents/xml/xmlxsl.php3</a></div></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2009/11/mise-en-page-dun-fichier-xml-avec-xslt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configurer un serveur DHCP sous Debian</title>
		<link>http://etiennelachance.com/2009/10/configurer-un-serveur-dhcp-sous-debian/</link>
		<comments>http://etiennelachance.com/2009/10/configurer-un-serveur-dhcp-sous-debian/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 17:28:37 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=50</guid>
		<description><![CDATA[Ce mémo a été écrit et testé pour Debian, mais il est possible de l’adapter facilement à d’autres distributions. Pré-requis Avoir installé une Debian de Base Installation et Configuration du serveur DHCP Paquet à installer : 5a108e63f312b1f6caa9fb28358713c1 Remarque : Par défaut le serveur DHCP n&#8217;écoutera pas sur aucune interface. Pour assigner une interface, modifier le [...]]]></description>
			<content:encoded><![CDATA[<p>Ce mémo a été écrit et testé pour Debian, mais il est possible de l’adapter facilement à d’autres distributions.</p>

<h2 id="Pré-requis">Pré-requis</h2>

<p>Avoir installé une Debian de Base</p>

<p>Installation et Configuration du serveur DHCP</p>

<p>Paquet à installer :</p>

<blockquote>


5a108e63f312b1f6caa9fb28358713c1


</blockquote>

<p>Remarque : Par défaut le serveur DHCP n&#8217;écoutera pas sur aucune interface. Pour assigner une interface, modifier le fichier « /etc/default/dhcp3-server »</p>

<h2 id="Configurationduserveur">Configuration du serveur</h2>

<p>Éditer le fichier « /etc/default/dhcp3-server » pour spécifier l&#8217;interface/les interfaces a utliser pour le serveur</p>

<blockquote>


ebdcd53832754700c60a71fb55faeb55


</blockquote>

<p>Le fichier de configuration du serveur dhcp est</p>

<blockquote>


43c925564d7480da583f8a6aa8b392c2


</blockquote>

<p>Je conseille pour commencer de faire une copie de sauvegarde de ce fichier. Ensuite, vous pouvez effacer ou commenter les lignes existantes et ajouter les lignes suivantes :</p>

<blockquote>


69608f0a84d4df99a795f075d5bb0aa1


</blockquote>

<h3 id="Lesoptions">Les options</h3>

<ul>
    <li><strong>authoritative</strong> : Permet d’indiquer que le serveur DHCP sera responsable de la zone concernée</li>
    <li><strong>option domain-name :</strong> Spécifie le nom du domaine local</li>
    <li><strong>option domain-name-servers : </strong>Spécifie les adresses des serveur DNS</li>
    <li><strong>option routers</strong> : Spécifie l&#8217;adresse du &#8220;default gateway&#8221;</li>
</ul>

<h4 id="CommentavoirdesIPfixesavecunserveurDHCP">Comment avoir des IP fixes avec un serveur DHCP</h4>

<p>Pour cela, il faut ajouter dans le fichier « /etc/dhcp3/dhcpd.conf », de nouvelles lignes.</p>

<p>L’exemple suivant permet de fixer une adresse IP en fonction de son adresse MAC :</p>

<blockquote>


1e7696863eb0f5ccfd8d5c8c5794d340


</blockquote>

<h2 id="Redémarrageetlogs">Redémarrage et logs</h2>

<p>Une fois la configuration terminée, il faut démarrer ou redémarrer le démon pour prendre en compte les modifications :</p>

<blockquote>


8d82c9dd981c6af52682a20d4d7d09d6


</blockquote>

<p>Si le démarrage retourne une erreur, il faut penser à consulter les logs :</p>

<blockquote>


9add33ce3ca5a70ec5c75f3f641e2493


</blockquote>

<p>Le fichier suivant donne la liste des adresses IP délivrées par le serveur. Pour chaque adresse IP l’on retrouve : son adresse mac, le nom de l’ordinateur, la date de début et de fin du bail :</p>

<blockquote>


8d623bb8d07d706776adf6311b0f5854


</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2009/10/configurer-un-serveur-dhcp-sous-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
