<?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>EquinoxeFR &#187; unison &raquo; EquinoxeFR</title>
	<atom:link href="http://www.equinoxefr.org/post/tag/unison/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.equinoxefr.org</link>
	<description>DIY Lab</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:33:11 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Un bloc Note évolué en-ligne / hors-ligne avec DokuWiki</title>
		<link>http://www.equinoxefr.org/post/2009/03/02/un-bloc-note-evolue-en-ligne-hors-ligne-avec-dokuwiki/</link>
		<comments>http://www.equinoxefr.org/post/2009/03/02/un-bloc-note-evolue-en-ligne-hors-ligne-avec-dokuwiki/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 19:11:15 +0000</pubDate>
		<dc:creator>EquinoxeFR</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dokuwiki]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[Planet-Libre]]></category>
		<category><![CDATA[unison]]></category>

		<guid isPermaLink="false">http://www.equinoxefr.org/?p=550</guid>
		<description><![CDATA[Depuis un certain temps, j&#8217;étais à la recherche d&#8217;une solution pour prendre des notes un peu ordonnées tout en étant facilement synchronisables entre plusieurs machines. En lisant un article de Denis Bodor, j&#8217;ai eu envie de tester la solution lighttpd / dokuwiki / unison dont il parle ici. Voilà en quelques lignes l&#8217;installation sur Ubuntu &#8230; </p><p><a class="more-link block-button" href="http://www.equinoxefr.org/post/2009/03/02/un-bloc-note-evolue-en-ligne-hors-ligne-avec-dokuwiki/">Lire la Suite &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Depuis un certain temps, j&#8217;étais à la recherche d&#8217;une solution pour prendre des notes un peu ordonnées tout en étant facilement synchronisables entre plusieurs machines. En lisant un article de Denis Bodor, j&#8217;ai eu envie de tester la solution lighttpd / dokuwiki / unison dont il parle <a href="http://www.lefinnois.net/wp/index.php/2009/02/16/dokuwiki-et-unison/" target="_blank">ici</a>.</p>
<p>Voilà en quelques lignes l&#8217;installation sur Ubuntu intrepid.</p>
<p>Dans un terminal lancez les commandes suivante:</p>
<p>Créez un répertoire pour héberger votre dokiwiki dans votre &laquo;&nbsp;home&nbsp;&raquo; puis utilisez apt-get pour installer les programmes nécessaires.</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: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>public_html
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> lighttpd php5-cgi unison</pre></td></tr></table></div>

</pre>
<p>Configurez lighttpd pour activer les répertoires utilisateurs et le module fastcgi permettant d'utiliser php.</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: #c20cb9; font-weight: bold;">sudo</span> lighty-enable-mod userdir
<span style="color: #c20cb9; font-weight: bold;">sudo</span> lighty-enable-mod fastcgi</pre></td></tr></table></div>

<p>Relancez lighttpd pour prendre en compte les modifications.</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: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd force-reload</pre></td></tr></table></div>

<p>Nous voilà avec un serveur http fonctionnel que l'on peut tester en allant sur <a href="http://localhost">http://localhost</a> , vous devriez avoir un page comme ça:</p>
<p><a href="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture_lighttpd.png" rel="lightbox[550]"><img class="alignnone size-medium wp-image-557" title="lighttpd" src="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture_lighttpd-300x155.png" alt="lighttpd" width="300" height="155" /></a></p>
<p>Il ne nous reste plus qu'à installer Dokuwiki que l'on peut récupérer à cette adresse: <a href="http://www.splitbrain.org/projects/dokuwiki">http://www.splitbrain.org/projects/dokuwiki</a></p>
<p>Toujours dans un terminal, décompressez Dokuwiki puis copiez le répertoire public_html.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> xvf dokuwiki-<span style="color: #000000;">2009</span>-02-<span style="color: #000000;">14</span>.tgz
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mv</span> dokuwiki-<span style="color: #000000;">2009</span>-02-<span style="color: #000000;">14</span><span style="color: #000000; font-weight: bold;">/*</span> ~<span style="color: #000000; font-weight: bold;">/</span>public_html<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>

<p>Modifions ensuite les droits pour que l'utilisateur www-data puis écrire dans le dossier.</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;">&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data.www-data ~<span style="color: #000000; font-weight: bold;">/</span>public_html
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> g+rw ~<span style="color: #000000; font-weight: bold;">/</span>public_html</pre></td></tr></table></div>

<p>Pour que tout fonctionne lors de la synchronisation avec Unison, il faut que votre utilisateur fasse partie du groupe www-data. Pour celà, éditez le fichier /etc/group et ajoutez votre nom d'utilisateur dans le groupe comme ceci:</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;">www-data:x:<span style="color: #000000;">33</span>:pierre</pre></td></tr></table></div>

<p>(Il est nécessaire de vous déconnecter pour que les modifications soient prises en compte)</p>
<p>Testons maintenant la connexion au Wiki en se rendant à l'adresse http://localhost/~xxxx/install.php où xxxx est votre nom d'utilisateur. Sur la page d'installation, complétez les informations demandées.</p>
<p><a href="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-installeur-dokuwiki-mozilla-firefox.png" rel="lightbox[550]"><img class="alignnone size-medium wp-image-565" title="capture-installeur-dokuwiki-mozilla-firefox" src="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-installeur-dokuwiki-mozilla-firefox-300x165.png" alt="capture-installeur-dokuwiki-mozilla-firefox" width="300" height="165" /></a></p>
<p><a href="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox.png" rel="lightbox[550]"><img class="alignnone size-medium wp-image-566" title="capture-start-blocnote-mozilla-firefox" src="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-300x74.png" alt="capture-start-blocnote-mozilla-firefox" width="300" height="74" /></a></p>
<p>Cliquez sur <strong>connexion</strong> en utilisant les identifiants créés à l'étape précédente.</p>
<p><a href="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-1.png" rel="lightbox[550]"><img class="alignnone size-medium wp-image-567" title="capture-start-blocnote-mozilla-firefox-1" src="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-1-300x121.png" alt="capture-start-blocnote-mozilla-firefox-1" width="300" height="121" /></a></p>
<p>Cliquez sur <strong>Admin</strong> pour modifier la configuration du Wiki.</p>
<p><a href="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-2.png" rel="lightbox[550]"><img class="alignnone size-medium wp-image-568" title="capture-start-blocnote-mozilla-firefox-2" src="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-2-300x100.png" alt="capture-start-blocnote-mozilla-firefox-2" width="300" height="100" /></a></p>
<p>Dernière petite chose comme le précise Denis, il faut modifier les droits dans la configuration du dokuwiki.</p>
<p><a href="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-3.png" rel="lightbox[550]"><img class="alignnone size-medium wp-image-569" title="capture-start-blocnote-mozilla-firefox-3" src="http://www.equinoxefr.org/wp-content/uploads/2009/03/capture-start-blocnote-mozilla-firefox-3-300x143.png" alt="capture-start-blocnote-mozilla-firefox-3" width="300" height="143" /></a></p>
<p>La configuration touche à sa fin, il ne nous reste plus qu'à échanger les données avec un autre PC / serveur à l'aide d'unison.</p>
<p>Créez un répertoire ~/.unison dans lequel vous placez un fichier doku.prf contenant les éléments suivants</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;"># Unison preferences file</span>
root = <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>pierre<span style="color: #000000; font-weight: bold;">/</span>public_html
root = <span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>xxx<span style="color: #000000; font-weight: bold;">@</span>autre_poste<span style="color: #000000; font-weight: bold;">//</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>dokuwiki
ignore = Name .<span style="color: #000000; font-weight: bold;">*</span>.swp
ignore = Name <span style="color: #000000; font-weight: bold;">*</span>~
group = <span style="color: #c20cb9; font-weight: bold;">true</span></pre></td></tr></table></div>

</pre>
<p>Pour lancer la synchronisation entre nos 2 wiki, il suffit de lancer unison:</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;">unison <span style="color: #660033;">-batch</span> doku</pre></td></tr></table></div>

<p>Maintenant que vous soyez en ligne ou hors ligne vous pouvez utiliser votre dokuwiki local. Il vous suffira alors de le synchroniser de temps en temps avec unison pour répercuter vos modifications sur un ou des autres postes. Personnellement je synchronise mes différents postes (pro et perso) vers mon serveur hebergé sur une dedibox.</p>
<p>Merci Denis pour cette brillante idée <img src='http://www.equinoxefr.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>P.S: si vous utilisez Dokuwiki sur une machine "publique" pensez à le sécuriser en suivant la doc présente <a href="http://www.dokuwiki.org/security" target="_blank">ici</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.equinoxefr.org/post/2009/03/02/un-bloc-note-evolue-en-ligne-hors-ligne-avec-dokuwiki/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

