<?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>Naeh.net &#187; debian</title>
	<atom:link href="http://naeh.net/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://naeh.net</link>
	<description>Le mémo du développeur</description>
	<lastBuildDate>Wed, 30 Jun 2010 18:56:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configuration d&#8217;Exim avec nom de domaine géré par gandi</title>
		<link>http://naeh.net/configuration-dexim-avec-nom-de-domaine-gere-par-gandi/</link>
		<comments>http://naeh.net/configuration-dexim-avec-nom-de-domaine-gere-par-gandi/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 12:26:40 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[gandi]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=151</guid>
		<description><![CDATA[Bonjour,
aujourd'hui nous allons voir comment, facilement, exploiter une fonctionnalité offerte par Gandi (ou bien comprise dans le prix de nom de domaine, ça dépend comment on voit les choses).
beaucoup d'entre nous n'ont pas le temps (et souvent pas l'envie de non plus) de se prendre la tête avec un vrai MTA genre postfix ou exim [...]]]></description>
			<content:encoded><![CDATA[<p>Bonjour,</p>
<p>aujourd'hui nous allons voir comment, facilement, exploiter une fonctionnalité offerte par Gandi (ou bien comprise dans le prix de nom de domaine, ça dépend comment on voit les choses).</p>
<p>beaucoup d'entre nous n'ont pas le temps (et souvent pas l'envie de non plus) de se prendre la tête avec un vrai MTA genre postfix ou exim et le configurer en s'assurant de bien renseigner les enregistrement MX chez le registrar, d'installer les bons outils pour le POP (ou IMAP) etc. etc.</p>
<p>il faut savoir qu'avec un nom de domaine de chez Gandi, on a droit a quelques comptes emails (5 par domaine de mémoire) et une infinité d'alias sur ces comptes.</p>
<p>ce qu'on va voir ici, c'est comment configurer une machine (serveur dédié) pour assurer le minimum syndical en s'appuyant sur le service proposé par gandi.</p>
<p>dans notre exemple il s'agira d'un Exim4 (c'est le seul avec lequel j'ai testé pour l'instant, et ça marche tellement bien que je n'ai pas envie de changer :-)  )</p>
<p>on va supposer un compte admin@mon-domaine.com</p>
<p>tout d'abord il faut éditer le fichier : <strong>/etc/exim4/passwd.client</strong> en ajoutant tout à la fin :</p>

<div class="wp_codebox"><table><tr id="p1515"><td class="code" id="p151code5"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*</span>:admin<span style="color: #000000; font-weight: bold;">@</span>mon-domaine.com:MOT-DE-PASSE-DU-COMPTE</pre></td></tr></table></div>

<p>en suite, on va éditer le fichier <strong>/etc/exim4/update-exim4.conf.conf</strong> pour avoir quelque chose comme :</p>

<div class="wp_codebox"><table><tr id="p1516"><td class="code" id="p151code6"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">dc_eximconfig_configtype</span>=<span style="color: #ff0000;">'satellite'</span>
<span style="color: #007800;">dc_other_hostnames</span>=<span style="color: #ff0000;">''</span>
<span style="color: #007800;">dc_local_interfaces</span>=<span style="color: #ff0000;">'127.0.0.1'</span>
<span style="color: #007800;">dc_readhost</span>=<span style="color: #ff0000;">'mon-domaine.com'</span>
<span style="color: #007800;">dc_relay_domains</span>=<span style="color: #ff0000;">''</span>
<span style="color: #007800;">dc_minimaldns</span>=<span style="color: #ff0000;">'false'</span>
<span style="color: #007800;">dc_relay_nets</span>=<span style="color: #ff0000;">''</span>
<span style="color: #007800;">dc_smarthost</span>=<span style="color: #ff0000;">'mail.gandi.net:587'</span>
<span style="color: #007800;">CFILEMODE</span>=<span style="color: #ff0000;">'644'</span>
<span style="color: #007800;">dc_use_split_config</span>=<span style="color: #ff0000;">'false'</span>
<span style="color: #007800;">dc_hide_mailname</span>=<span style="color: #ff0000;">'true'</span>
<span style="color: #007800;">dc_mailname_in_oh</span>=<span style="color: #ff0000;">'true'</span>
<span style="color: #007800;">dc_localdelivery</span>=<span style="color: #ff0000;">'mail_spool'</span></pre></td></tr></table></div>

<p>un petit</p>

<div class="wp_codebox"><table><tr id="p1517"><td class="code" id="p151code7"><pre class="bash" style="font-family:monospace;"><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>exim4 reload</pre></td></tr></table></div>

<p>et le tour est joué :)</p>
<p>votre serveur envoie maintenant ces mails en utilisant le compte gandi, plus de soucis de conf complexe, maj à risque etc a se faire...</p>
<p>pour tester :</p>

<div class="wp_codebox"><table><tr id="p1518"><td class="code" id="p151code8"><pre class="bash" style="font-family:monospace;">test-machine:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>exim4<span style="color: #666666; font-style: italic;"># mail user@omain.tld</span>
Subject: <span style="color: #7a0874; font-weight: bold;">test</span>
ceci est un message de <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000; font-weight: bold;">!</span>
.
Cc:</pre></td></tr></table></div>

<p>PS. procédure trouvé il y a un moment sur les forums gandi, mais je n'arrive jamais a la retrouver je la mets ici, au cas où.<br />
PS2. comme d'habitude, notre distribution ici est une Debian :)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/configuration-dexim-avec-nom-de-domaine-gere-par-gandi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurer la locale et l&#8217;heure &#8211; Debian -</title>
		<link>http://naeh.net/configurer-la-locale-et-lheure-debian/</link>
		<comments>http://naeh.net/configurer-la-locale-et-lheure-debian/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 12:42:32 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - OS]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[heure]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[timezone]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=115</guid>
		<description><![CDATA[Aujourd'hui on va voir comment configurer l'heure du système avec le bon fuseau horaire, ainsi que la locale pour, par exemple, passer une debian en Anglais en Français
on commence par la locale :
taper :

dpkg-reconfigure locales

choisir la bonne langue/locale et valider, comme ici :

faire de même à l'ecran suivant :

en suite on passe a l'heure, c'est [...]]]></description>
			<content:encoded><![CDATA[<p>Aujourd'hui on va voir comment configurer l'heure du système avec le bon fuseau horaire, ainsi que la locale pour, par exemple, passer une debian en Anglais en Français</p>
<p>on commence par la locale :<br />
taper :</p>

<div class="wp_codebox"><table><tr id="p11511"><td class="code" id="p115code11"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure locales</pre></td></tr></table></div>

<p>choisir la bonne langue/locale et valider, comme ici :<br />
<center><a href="http://naeh.net/wp-content/uploads/2009/10/config_locale.jpg"><img src="http://naeh.net/wp-content/uploads/2009/10/config_locale-300x153.jpg" alt="config_locale" title="config_locale" width="300" height="153" class="aligncenter size-medium wp-image-116" border="0" /></a></center></p>
<p>faire de même à l'ecran suivant :<br />
<center><a href="http://naeh.net/wp-content/uploads/2009/10/config_locale2.jpg"><img src="http://naeh.net/wp-content/uploads/2009/10/config_locale2-300x112.jpg" alt="config_locale2" title="config_locale2" width="300" height="112" class="aligncenter size-medium wp-image-117" border="0" /></a></center></p>
<p>en suite on passe a l'heure, c'est très simple<br />
on tape :</p>

<div class="wp_codebox"><table><tr id="p11512"><td class="code" id="p115code12"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure tzdata</pre></td></tr></table></div>

<p>et là on va avoir un écran où il faudra sélectionner "<strong>Europe</strong>" puis valider, en suite sélectionner "<strong>Paris</strong>" puis valider et c'est ok, l'heure est automatiquement régler avec le bon fuseau horaire, pas besoin de régler l'heure a la main puisque ntpdate s'occupe de la garder à jour.</p>
<p>N.B. Tous se fait sous root.</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/configurer-la-locale-et-lheure-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installer et configurer Munin</title>
		<link>http://naeh.net/installer-et-configurer-munin/</link>
		<comments>http://naeh.net/installer-et-configurer-munin/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 11:20:10 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[munin]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=110</guid>
		<description><![CDATA[... sur une debian.
Aujourd'hui on va voir comment installer et configurer l'outil de monitoring munin
Un petit article aide mémoire comme beaucoup d'autres sur ce blog :)
pour commencer :

apt-get install munin munin-node

en suite il faut éditer le fichier de configuration : /etc/munin/munin.conf
changer juste la valeur de htmldir pour choisir un répertoire où les fichiers html des [...]]]></description>
			<content:encoded><![CDATA[<p>... sur une debian.</p>
<p>Aujourd'hui on va voir comment installer et configurer l'outil de monitoring munin</p>
<p>Un petit article aide mémoire comme beaucoup d'autres sur ce blog :)</p>
<p>pour commencer :</p>

<div class="wp_codebox"><table><tr id="p11017"><td class="code" id="p110code17"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> munin munin-node</pre></td></tr></table></div>

<p>en suite il faut éditer le fichier de configuration : <em>/etc/munin/munin.conf</em></p>
<p>changer juste la valeur de htmldir pour choisir un répertoire où les fichiers html des rapports seront déposés, pour moi c'est sous un vhosts de statistiques, exemple :</p>

<div class="wp_codebox"><table><tr id="p11018"><td class="code" id="p110code18"><pre class="bash" style="font-family:monospace;">htmldir	<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>munin</pre></td></tr></table></div>

<p>vous pouvez aussi laisser la valeur par défaut.</p>
<p>un autre fichier de configuration pourrait vous intéresser, personnellement je n'ai pas eu a le toucher : <em>/etc/munin/munin-node.conf</em></p>
<p><strong>Important : </strong>Assurez vous que le répertoire "htmldir" choisi plus haut soit accessible en écriture a l'utilisateur munin (sinon le cron vous bombarde de mails pas cool), moi j'ai fait un :</p>

<div class="wp_codebox"><table><tr id="p11019"><td class="code" id="p110code19"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> munin:www-data MON<span style="color: #000000; font-weight: bold;">/</span>HTML<span style="color: #000000; font-weight: bold;">/</span>DIR<span style="color: #000000; font-weight: bold;">/</span>DE<span style="color: #000000; font-weight: bold;">/</span>MUNIN</pre></td></tr></table></div>

<p>maintenant on restart tout ça :</p>

<div class="wp_codebox"><table><tr id="p11020"><td class="code" id="p110code20"><pre class="bash" style="font-family:monospace;"><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>munin-node restart</pre></td></tr></table></div>

<p>quelques minutes après (le temps de générer quelques stats) on va a l'url correspondant au htmldir et on admire les garphs :)</p>
<p><center><img src="http://naeh.net/wp-content/uploads/2009/10/localhostlocaldomain-memory-day.png" alt="localhostlocaldomain-memory-day" title="localhostlocaldomain-memory-day" width="495" height="415" class="aligncenter size-full wp-image-111 margin:0 auto;" /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/installer-et-configurer-munin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VirtualBox configurer la connexion réseau de la machine virtuelle</title>
		<link>http://naeh.net/virtualbox-configurer-la-connexion-reseau-de-la-machine-virtuelle/</link>
		<comments>http://naeh.net/virtualbox-configurer-la-connexion-reseau-de-la-machine-virtuelle/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 22:18:51 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - OS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows - Logiciels]]></category>
		<category><![CDATA[Windows - OS]]></category>
		<category><![CDATA[connexion]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[réseau]]></category>
		<category><![CDATA[virtualBox]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=63</guid>
		<description><![CDATA[Après l'installation d'une machine virtuelle avec VirtualBox, il faut bien sûr la connecter à Internet, pour cela on a 2 méthodes :

Le mode NAT
Adaptateur réseau hôte

Le mode NAT :
Avec ce type de configuration, la machine aura accès au net, mais sans plus, elle ne sera pas joignable, elle ne sera pas visible sur le réseau, [...]]]></description>
			<content:encoded><![CDATA[<p>Après l'installation d'une machine virtuelle avec VirtualBox, il faut bien sûr la connecter à Internet, pour cela on a 2 méthodes :</p>
<ol>
<li>Le mode NAT</li>
<li>Adaptateur réseau hôte</li>
</ol>
<h3>Le mode NAT :</h3>
<p>Avec ce type de configuration, la machine aura accès au net, mais sans plus, elle ne sera pas joignable, elle ne sera pas visible sur le réseau, c'est le plus simple, le plus rapide, mais pas le plus efficace, néanmoins, ça peut suffire dans la plupart des cas. D'ailleurs, c'est la configuration par défaut de VirtualBox, donc il n'y a rien à faire pour que ça fonctionne.</p>
<h3>Adaptateur réseau du système hôte :</h3>
<p>Cette configuration fait que, non seulement, la machine virtuelle aura accès au net, mais elle sera elle même joignable depuis le réseau, avec cette configuration, la machine virtuelle apparaitra sur le réseau comme une machine indépendante du système hôte, ce qui est plutôt appréciable pour certaines utilisations, indispensable pour d'autres.</p>
<p>Nous allons voir comment procéder à cette configuration dans le cadre d'un système hôte sous XP (ou Vista) et une machine virtuelle sous Linux (Debian Etch en l'occurrence).</p>
<p>Tout d'abord, aller dans les paramètres de la machine virtuelle (éteinte ;-) ) et modifier les options du réseau, dans la partie basse de la fenêtre ajouter une interface réseau (cliquez sur le "+" a droite de la fenêtre, cela créera une interface réseau supplémentaire qu'on utilisera plus tard (visible dans les connexions réseau).</p>
<p>dans "Attaché à :" sélectionnez "Adaptateur réseau hôte", puis validez.</p>
<p>aller dans les connexions réseau, sélectionnez votre connexion habituelle (en général elle s'appelle :"connexion au réseau local") et la connexion virtuelle créée précédemment, puis cliquez sur le bouton droit de la souris (il faut sélectionner les 2 en même temps), et dans le menu contextuel cliquez sur "connexion de ponts", ceci va créer un pont entre les 2 connexions réseau (en gros il va donner la connexion a l'interface virtuelle).</p>
<p>normalement si tout va bien votre machine virtuelle est ajouté au réseau (il faut l'allumer hein ;-) ), elle obtient directement son adresse IP (si vous avez un serveur DHCP sur le réseau bien sûr, sinon rester en NAT ou configurez une IP fixe).</p>
<p>En cas de problème n'hésitez pas à recommencer, parfois ça a du mal a fonctionner.</p>
<h4>Quelques pistes en cas de problème :</h4>
<p>parfois, si on a fait plusieurs tests, bidouillé un peu /etc/network/interfaces etc. l'interface coté linux peut changer de nom, en général c'est eth0 mais c'est pas toujours le cas, voici un moyen simple de savoir comment est appelée l'interface réseau :</p>

<div class="wp_codebox"><table><tr id="p6323"><td class="code" id="p63code23"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>dev</pre></td></tr></table></div>

<p>dans le résultat de cette commande on voit le nom de l'interface, pratique pour la configurer à la main (IP statique par exemple) en tout cas ça m'a bien servi pour voir que mon interface s'appelait eth4 ;-)</p>
<p>n'oublier pas une petit</p>

<div class="wp_codebox"><table><tr id="p6324"><td class="code" id="p63code24"><pre class="bash" style="font-family:monospace;"><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>networking restart</pre></td></tr></table></div>

<p>après chanque changement dans /etc/network/interfaces</p>
<p>Bonne chance, et bonne virtualisation :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/virtualbox-configurer-la-connexion-reseau-de-la-machine-virtuelle/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Installer libssh2, ssh2 pour php</title>
		<link>http://naeh.net/installer-libssh2-ssh2-pour-php/</link>
		<comments>http://naeh.net/installer-libssh2-ssh2-pour-php/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 20:51:00 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[libssh2]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[ssh2]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=56</guid>
		<description><![CDATA[Dans cet article nous allons voir comment installer l'extension ssh2 pour php5, cette extension permet l'utilisation de fonctionnalités SSH2 avec php (très utiles quand on veut faire du SFTP par exemple) pour plus d'informations cf. la documentation officielle sur php.net
Pour l'installation, ce n'est pas très compliqué, il suffit de suivre ces quelques étapes à la [...]]]></description>
			<content:encoded><![CDATA[<p>Dans cet article nous allons voir comment installer l'extension ssh2 pour php5, cette extension permet l'utilisation de fonctionnalités SSH2 avec php (très utiles quand on veut faire du SFTP par exemple) pour plus d'informations cf. <a href="http://fr.php.net/manual/fr/book.ssh2.php" target="_blank">la documentation officielle sur php.net</a></p>
<p>Pour l'installation, ce n'est pas très compliqué, il suffit de suivre ces quelques étapes à la lettre et tout ira très bien ;-)</p>
<p>tout d'abord il faut s'assurer d'avoir les bons paquets d'installés, en voici une liste :</p>
<ul>
<li>php5-dev</li>
<li>openssl</li>
<li>libssl-dev</li>
<li>gcc</li>
<li>make</li>
<li>etc. je suppose que si vous installez cette extension, c'est que vous avez déjà php, apache etc.</li>
</ul>
<p><em>Toute la suite s'effectue en root</em></p>
<p>mais avant toute chose, n'oublions pas de faire un petit :</p>

<div class="wp_codebox"><table><tr id="p5635"><td class="code" id="p56code35"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade</pre></td></tr></table></div>

<p>en suite il faut créer un répertoire de travail :</p>

<div class="wp_codebox"><table><tr id="p5636"><td class="code" id="p56code36"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> libssh2
<span style="color: #7a0874; font-weight: bold;">cd</span> libssh2</pre></td></tr></table></div>

<p>ensuite télécharger libssh2 :</p>

<div class="wp_codebox"><table><tr id="p5637"><td class="code" id="p56code37"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ovh.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>libssh2<span style="color: #000000; font-weight: bold;">/</span>libssh2-<span style="color: #000000;">0.14</span>.tar.gz</pre></td></tr></table></div>

<p>puis l'extraire :</p>

<div class="wp_codebox"><table><tr id="p5638"><td class="code" id="p56code38"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> libssh2-<span style="color: #000000;">0.14</span>.tar.gz</pre></td></tr></table></div>

<p>aller dans le répertoire créé et installer libssh2 :</p>

<div class="wp_codebox"><table><tr id="p5639"><td class="code" id="p56code39"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> libssh2-<span style="color: #000000;">0.14</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> all <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>maintenant que libssh2 est installée, passons a ssh2 :</p>
<p>on sort du repertoire de libssh2 et on télécharge ssh2 :</p>

<div class="wp_codebox"><table><tr id="p5640"><td class="code" id="p56code40"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>pecl.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>ssh2-<span style="color: #000000;">0.10</span>.tgz</pre></td></tr></table></div>

<p>extraire l'archive téléchargée :</p>

<div class="wp_codebox"><table><tr id="p5641"><td class="code" id="p56code41"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> ssh2-<span style="color: #000000;">0.10</span>.tgz</pre></td></tr></table></div>

<p>aller dans le répertoire créé et installer ssh2 :</p>

<div class="wp_codebox"><table><tr id="p5642"><td class="code" id="p56code42"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ssh2-<span style="color: #000000;">0.10</span>
phpize <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-ssh2</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span></pre></td></tr></table></div>

<p>maintenant que l'installation est terminée, on active l'extension, ici on va copier le fichier ssh2.so dans le répertoire des extension de php5 (il peut être différent du mien selon la distrib et l'installation) :</p>

<div class="wp_codebox"><table><tr id="p5643"><td class="code" id="p56code43"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> modules<span style="color: #000000; font-weight: bold;">/</span>ssh2.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">20060613</span>+lfs</pre></td></tr></table></div>

<p>puis on ajoute l'extension en créant un fichier ssh2.ini dans le répertoire conf.d (comme pour toutes les autres extensions de php) on n'oublie pas de le faire pour apache mais aussi pour le mode CLI.</p>

<div class="wp_codebox"><table><tr id="p5644"><td class="code" id="p56code44"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;extension=ssh2.so&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>cli<span style="color: #000000; font-weight: bold;">/</span>conf.d<span style="color: #000000; font-weight: bold;">/</span>ssh2.ini
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;extension=ssh2.so&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>conf.d<span style="color: #000000; font-weight: bold;">/</span>ssh2.ini
<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>apache2 restart</pre></td></tr></table></div>

<p>Et voilà, notre extension est installée, a vous ssh2 et sftp avec php :)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/installer-libssh2-ssh2-pour-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Additions client pour VirtualBox</title>
		<link>http://naeh.net/additions-client-pour-virtualbox/</link>
		<comments>http://naeh.net/additions-client-pour-virtualbox/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 15:31:13 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[Linux - OS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows - Logiciels]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[virtualBox]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=54</guid>
		<description><![CDATA[Ici nous allons voir comment installer les additions client sur une virtualbox sous Windows et pour une Debian Etch en guest.
ça parait simple, mais quand on a installé une Debian assez maigre (avec presque rien dessus) la tache ne se résume plus a un simple clic, voici donc ce qu'il faut faire :
la première étape [...]]]></description>
			<content:encoded><![CDATA[<p>Ici nous allons voir comment installer les additions client sur une virtualbox sous Windows et pour une Debian Etch en guest.</p>
<p>ça parait simple, mais quand on a installé une Debian assez maigre (avec presque rien dessus) la tache ne se résume plus a un simple clic, voici donc ce qu'il faut faire :</p>
<p>la première étape est obligatoire pour nous éviter un message d'erreur du type :</p>
<blockquote><p>"Please install the build and header files for your current Linux kernel.<br />
The current kernel version is 2.6.17-5mdv<br />
Please install the GNU compiler.<br />
Problems were found which would prevent VirtualBox from installing.<br />
Please correct these problems and try again." </p></blockquote>

<div class="wp_codebox"><table><tr id="p5447"><td class="code" id="p54code47"><pre class="bash" style="font-family:monospace;">debian-guest:~<span style="color: #666666; font-style: italic;"># apt-get install linux-headers-`uname -r` build-essential</span></pre></td></tr></table></div>

<p>après il faut aller dans : Périphériques >> Installer les additions client...</p>
<p>retourner dans Debian et faire :</p>

<div class="wp_codebox"><table><tr id="p5448"><td class="code" id="p54code48"><pre class="bash" style="font-family:monospace;">debian-guest:~<span style="color: #666666; font-style: italic;"># cd /media/</span>
debian-guest:~<span style="color: #666666; font-style: italic;"># mount cdrom0</span>
debian-guest:~<span style="color: #666666; font-style: italic;"># cd cdrom</span>
debian-guest:~<span style="color: #666666; font-style: italic;"># sh VBoxLinuxAddition-XXXX.run (le XXX c'est la version adm64 ou x86)</span></pre></td></tr></table></div>

<p>redémarrez les machine virtuelle est ca devrait être bon ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/additions-client-pour-virtualbox/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>changer la locale sous debian</title>
		<link>http://naeh.net/changer-la-locale-sous-debian/</link>
		<comments>http://naeh.net/changer-la-locale-sous-debian/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 21:35:17 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux - OS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[Serveur]]></category>

		<guid isPermaLink="false">http://naeh.net/changer-la-locale-sous-debian/</guid>
		<description><![CDATA[aller, une petite astuce que j'ai mis du temps a trouver, je voulais changer la locale de mon serveur pour passer de fr_FR.ISOXXXXX à fr_FR.UTF-8.
il faut s'assurer que le paquet locale est deja installé (par défaut sur une etch il me semble) et faire un coup de :

dpkg-reconfigure locales

et là on sélectionne la locale voulue [...]]]></description>
			<content:encoded><![CDATA[<p>aller, une petite astuce que j'ai mis du temps a trouver, je voulais changer la locale de mon serveur pour passer de fr_FR.ISOXXXXX à fr_FR.UTF-8.</p>
<p>il faut s'assurer que le paquet locale est deja installé (par défaut sur une etch il me semble) et faire un coup de :</p>

<div class="wp_codebox"><table><tr id="p5350"><td class="code" id="p53code50"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure locales</pre></td></tr></table></div>

<p>et là on sélectionne la locale voulue en la mettant par défaut, se déconnecter, se reconnecter et le tour est joué :)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/changer-la-locale-sous-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment installer fileinfo sous debian</title>
		<link>http://naeh.net/installation-fileinfo/</link>
		<comments>http://naeh.net/installation-fileinfo/#comments</comments>
		<pubDate>Wed, 14 May 2008 15:43:14 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fileinfo]]></category>
		<category><![CDATA[libmagic]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[phpize]]></category>

		<guid isPermaLink="false">http://naeh.net/installation-fileinfo/</guid>
		<description><![CDATA[Les fonctions de l'extension FileInfo essaient de savoir le type de contenu et l’encodage d’un fichier en regardant certaines séquences d’octet "magique" à des positions spécifiques à l’intérieur du fichier. Bien qu'il ne s'agit pas d'une approche infaillible, la méthode heuristique effectue un très bon travail.
le problème avec cette extension c'est qu'elle est un peu [...]]]></description>
			<content:encoded><![CDATA[<p>Les fonctions de l'extension <a href="http://fr3.php.net/manual/fr/book.fileinfo.php" target="_blank">FileInfo</a> essaient de savoir le type de contenu et l’encodage d’un fichier en regardant certaines séquences d’octet "magique" à des positions spécifiques à l’intérieur du fichier. Bien qu'il ne s'agit pas d'une approche infaillible, la méthode heuristique effectue un très bon travail.</p>
<p>le problème avec cette extension c'est qu'elle est un peu dur à installer, en réalité pas si dur que ça, il suffit de prendre le temps de le faire. Il faut juste savoir qu'un simple <strong>apt-get install php5-fileinfo</strong> ne suffira pas, tout simplement parce qu'il n'existe pas de paquet debian pour cette extension (pas encore...).</p>
<p>Donc pour l'installer, voici la procédure :<br />
Il faut d'abord installer <a href="http://pear.php.net/manual/fr/introduction.php" target="_blank">PEAR</a> :</p>

<div class="wp_codebox"><table><tr id="p5157"><td class="code" id="p51code57"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php-pear</pre></td></tr></table></div>

<p>ensuite il faut installer php5-dev si ce n'est pas déjà fait, ceci installera phpize ce qui nous évitera l'erreur :</p>

<div class="wp_codebox"><table><tr id="p5158"><td class="code" id="p51code58"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span>: phpize: <span style="color: #7a0874; font-weight: bold;">command</span> not found
ERROR: <span style="color: #000000; font-weight: bold;">`</span>phpize<span style="color: #ff0000;">' failed</span></pre></td></tr></table></div>

<p>installation de php5-dev :</p>

<div class="wp_codebox"><table><tr id="p5159"><td class="code" id="p51code59"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-dev</pre></td></tr></table></div>

<p>c'est presque bon mais pas encore :<br />
maintenant il faut installer libmagic pour nous éviter une erreur lors de l'installation de fileinfo :</p>

<div class="wp_codebox"><table><tr id="p5160"><td class="code" id="p51code60"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libmagic-dev</pre></td></tr></table></div>

<p>maintenant tout est bon, nous allons enfin pouvoir lancer l'installation de notre extension :</p>

<div class="wp_codebox"><table><tr id="p5161"><td class="code" id="p51code61"><pre class="bash" style="font-family:monospace;">pecl <span style="color: #c20cb9; font-weight: bold;">install</span> fileinfo</pre></td></tr></table></div>

<p>Voilà, maintenant fileinfo est installée, nous allons pouvoir vérifier les types mime des fichiers avec des méthodes plus fiables ;-)</p>
<p>Normalement tout devrait fonctionner maintenant, mais il ce peut que l'extension ne soit pas activée comme il faut, dans ce cas il faudra créer un fichier <strong>fileinfo.ini</strong> dans <strong>/etc/php5/apache2/conf.d</strong> avec le contenu suivant :</p>

<div class="wp_codebox"><table><tr id="p5162"><td class="code" id="p51code62"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">extension</span>=fileinfo.so</pre></td></tr></table></div>

<p>reloader apache avec /etc/init.d/apache2 reload et le tour est joué :)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/installation-fileinfo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installer PHPDoc et générer une documentation</title>
		<link>http://naeh.net/installation-phpdoc/</link>
		<comments>http://naeh.net/installation-phpdoc/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 14:33:16 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[phpdoc]]></category>
		<category><![CDATA[Serveur]]></category>

		<guid isPermaLink="false">http://naeh.net/installation-phpdoc/</guid>
		<description><![CDATA[Dans cet article nous allons voir comment à partir d'un code source bien commenté, générer une documentation comme on aimerait avoir pour tout projet ou application digne de son nom.
Pour cela nous allons utiliser PHPDocumentor. qui va nous permetre de générer une documentation à paritr des sources de notre projet.
Il faut d'abord l'installer avec la [...]]]></description>
			<content:encoded><![CDATA[<p>Dans cet article nous allons voir comment à partir d'un code source bien commenté, générer une documentation comme on aimerait avoir pour tout projet ou application digne de son nom.</p>
<p>Pour cela nous allons utiliser <a href="http://www.phpdoc.org/" target="_blank">PHPDocumentor</a>. qui va nous permetre de générer une documentation à paritr des sources de notre projet.</p>
<h2>Il faut d'abord l'installer avec la commande suivante :</h2>

<div class="wp_codebox"><table><tr id="p4766"><td class="code" id="p47code66"><pre class="bash" style="font-family:monospace;">pear <span style="color: #c20cb9; font-weight: bold;">install</span> phpdocumentor</pre></td></tr></table></div>

<p>(si pear n'est pas installé faites un <strong>apt-get install php-pear</strong><em>)</em></p>
<p><em>Si vous rencontrez un problème de dépassement  de mémoire alouée avec PHP, allez dans /etc/php5/cli/php.ini et augmenter cette limite (il s'agit du paramètre memory_limit).</em></p>
<h2>création d'un fichier de configuration pour le projet :</h2>
<p>pour générer la documentation d'un projet nous avons besoin d'un fichier de configuration par projet, en voici un exemple :<br />
fichier nom_du_projet.conf :</p>

<div class="wp_codebox"><table><tr id="p4767"><td class="code" id="p47code67"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Parse Data<span style="color: #7a0874; font-weight: bold;">&#93;</span>
title = Titre de la documentation
hidden = <span style="color: #c20cb9; font-weight: bold;">false</span>
parseprivate = off
javadocdesc = off
defaultcategoryname = Documentation
defaultpackagename = Projet
target = <span style="color: #000000; font-weight: bold;">/</span>PATH<span style="color: #000000; font-weight: bold;">/</span>OU<span style="color: #000000; font-weight: bold;">/</span>SERA<span style="color: #000000; font-weight: bold;">/</span>ENREGISTRE<span style="color: #000000; font-weight: bold;">/</span>LA<span style="color: #000000; font-weight: bold;">/</span>DOCUMENTATION
readmeinstallchangelog = README, INSTALL, FAQ, LICENSE
directory =   <span style="color: #000000; font-weight: bold;">/</span>PATH<span style="color: #000000; font-weight: bold;">/</span>VERS<span style="color: #000000; font-weight: bold;">/</span>LE<span style="color: #000000; font-weight: bold;">/</span>PROJET
ignore = templates<span style="color: #000000; font-weight: bold;">/</span>,<span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">*</span>.php
sourcecode = on
<span style="color: #007800;">output</span>=HTML:frames:earthli</pre></td></tr></table></div>

<p>et pour tester exécutez la commande suivante (après avoir créé le répertoire cible de la documentation)</p>

<div class="wp_codebox"><table><tr id="p4768"><td class="code" id="p47code68"><pre class="bash" style="font-family:monospace;">phpdoc <span style="color: #660033;">-c</span> nom_du_projet.conf</pre></td></tr></table></div>

<p>et voilà, la génération prend un peu de temps, en fonction de la machine et de la taille du projet.</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/installation-phpdoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sécuriser une Debian</title>
		<link>http://naeh.net/securiser-une-debian/</link>
		<comments>http://naeh.net/securiser-une-debian/#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux - OS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[sécurité]]></category>
		<category><![CDATA[Serveur]]></category>

		<guid isPermaLink="false">http://wp.naeh.info/?p=11</guid>
		<description><![CDATA[Ici nous allons voir comment sécuriser un serveur tournant sous Debian :
Toutes ses commandes sont a exécuter en tant que root
Se protéger contre les Smurf Attack:
# echo "1" &#62; /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
Eviter le source routing:
# echo "0" &#62; /proc/sys/net/ipv4/conf/all/accept_source_route
Se protéger des attaques de type Syn Flood:
# echo "1" &#62; /proc/sys/net/ipv4/tcp_syncookies

# echo "1024" &#62; /proc/sys/net/ipv4/tcp_max_syn_backlog

# echo "1" &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Ici nous allons voir comment sécuriser un serveur tournant sous Debian :<br />
Toutes ses commandes sont a exécuter en tant que <em>root</em></p>
<p>Se protéger contre les Smurf Attack:</p>
<pre># echo "1" &gt; /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts</pre>
<p>Eviter le source routing:</p>
<pre># echo "0" &gt; /proc/sys/net/ipv4/conf/all/accept_source_route</pre>
<p>Se protéger des attaques de type Syn Flood:</p>
<pre># echo "1" &gt; /proc/sys/net/ipv4/tcp_syncookies

# echo "1024" &gt; /proc/sys/net/ipv4/tcp_max_syn_backlog

# echo "1" &gt; /proc/sys/net/ipv4/conf/all/rp_filter</pre>
<p>Désactivez l'autorisation des redirections ICMP:</p>
<pre># echo "0" &gt; /proc/sys/net/ipv4/conf/all/accept_redirects

# echo "0" &gt; /proc/sys/net/ipv4/conf/all/secure_redirects</pre>
<p>Eviter le log des paquets icmp erroné:</p>
<pre># echo "1" &gt; /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses</pre>
<p>Active le logging des packets aux adresses sources falficiées ou non routables:</p>
<pre># echo "1" &gt; /proc/sys/net/ipv4/conf/all/log_martians</pre>
<p>Source : <a href="http://www.dedibox-news.com/doku.php?id=distrib:debian:securiser_sa_debian" target="_blank">http://www.dedibox-news.com/doku.php?id=distrib:debian:securiser_sa_debian</a></p>
<p>Pour en discuter c'est par ici : <a href="http://naeh.net/forum/index.php?topic=14.0" target="_blank">http://naeh.net/forum/index.php?topic=14.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/securiser-une-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
