<?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>Not My Idea &#187; apache</title>
	<atom:link href="http://www.notmyidea.org/article/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.notmyidea.org</link>
	<description>Carnets Web d&#039;Alexis Métaireau</description>
	<lastBuildDate>Mon, 16 Aug 2010 19:09:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installation de PHP 5.3 en tant que CGI</title>
		<link>http://www.notmyidea.org/article/installation-de-php-5-3-en-tant-que-cgi/</link>
		<comments>http://www.notmyidea.org/article/installation-de-php-5-3-en-tant-que-cgi/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 01:34:33 +0000</pubDate>
		<dc:creator>Alexis Metaireau</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[php5.3]]></category>

		<guid isPermaLink="false">http://www.notmyidea.org/?p=120</guid>
		<description><![CDATA[PHP 5.3 est disponible depuis peu sur le site de php. J&#8217;ai sauté sur l&#8217;occasion pour le télécharger et l&#8217;installer sur ma machine de développement, pour pouvoir profiter des nombreuses et alléchantes nouvelles fonctionnalités offertes par cette version.
Ayant besoin de garder une version de PHP 5.2 disponible, j&#8217;ai choisi d&#8217;installer PHP 5.3 en tant que [...]]]></description>
			<content:encoded><![CDATA[<p>PHP 5.3 est disponible depuis peu sur le site de php. J&#8217;ai sauté sur l&#8217;occasion pour le télécharger et l&#8217;installer sur ma machine de développement, pour pouvoir profiter des nombreuses et alléchantes nouvelles fonctionnalités offertes par cette version.</p>
<p>Ayant besoin de garder une version de PHP 5.2 disponible, j&#8217;ai choisi d&#8217;installer PHP 5.3 en tant que CGI pour Apache. Rien de très compliqué, mais si je peux vous éviter de tourner en rond, voila comment j&#8217;ai procédé sur un système à base de debian (ubuntu ici).<br />
<span id="more-120"></span></p>
<p>D&#8217;abord, pour les pressés (enfin, il vous faudra quand même un petit café le temps de la compilation), vous pouvez directement copier/coller cette ligne dans une console (en mode su<sup>1</sup>):</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libxml2-dev <span style="color: #660033;">-y</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>fr2.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.3.0.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>fr.php.net<span style="color: #000000; font-weight: bold;">/</span>mirror <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> php-5.3.0.tar.gz <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> php-5.3.0 <span style="color: #000000; font-weight: bold;">&amp;&amp;</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> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> a2enmod actions <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'ScriptAlias /cgi-bin/ /usr/local/bin/'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>apache2.conf <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> apache2ctl restart <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">exit</span></div></div>
<p>Le détail est par ici:</p>
<p>On commence par installer les bibliothèques dépendantes:</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libxml2-dev <span style="color: #660033;">-y</span></div></div>
<p>On télécharge la dernière archive surphp.net:</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>fr2.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.3.0.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>fr.php.net<span style="color: #000000; font-weight: bold;">/</span>mirror</div></div>
<p>On l&#8217;extrait:</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> php-5.3.0.tar.gz</div></div>
<p>On compile ..</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> php-5.3.0<br />
.<span style="color: #000000; font-weight: bold;">/</span>configure<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>C&#8217;est quasiment prêt, les fichiers binaires ont étés crées dans /usr/local/bin/ , il ne reste plus qu&#8217;à activer le module actions pour apache (pour pouvoir utiliser les CGIs):</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod actions</div></div>
<p>et à spécifier l&#8217;emplacement de nos cgis à Apache:</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'ScriptAlias /cgi-bin/ /usr/local/bin/'</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>apache2.conf</div></div>
<p>Voila, il ne vous reste plus qu&#8217;à relancer apache à coup de</p>
<div class="codecolorer-container text notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">apachectl restart</div></div>
<p>et c&#8217;est parti !</p>
<p>Maintenant, pour utiliser PHP 5.3 au lieu de la version installée par défaut, il vous faudra créer un htaccess avec le contenu suivant (vous pouvez passer aussi directement par le vhost ):</p>
<div class="codecolorer-container bash notmyidea" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddHandler x-httpd-php5 .php<br />
Action x-httpd-php5 <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>php-cgi</div></div>
<p>A nous les joies de php 5.3 !<br />
<img class="aligncenter size-full wp-image-127" title="php-53" src="http://www.notmyidea.org/wp-content/uploads/2009/03/php-53.png" alt="php-53" width="400" height="378" /></p>
<ol class="footnotes"><li id="footnote_0_120" class="footnote">sudo su</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.notmyidea.org/article/installation-de-php-5-3-en-tant-que-cgi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LAMP &#8211; Installation et configuration d&#8217;un serveur Apache-MySQL-PHP sur Ubuntu Linux</title>
		<link>http://www.notmyidea.org/article/lamp-apache-mysql-php-installation-on-ubuntu-linux/</link>
		<comments>http://www.notmyidea.org/article/lamp-apache-mysql-php-installation-on-ubuntu-linux/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 13:58:51 +0000</pubDate>
		<dc:creator>Alexis Metaireau</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Libre]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[planet-libre]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.notmyidea.org/lamp-apache-mysql-php-installation-on-ubuntu-linux/</guid>
		<description><![CDATA[Un petit billet, sous forme de note, pour ceux qui (ré)installent (régulièrement) leur solution AMP à des fins de développement:
Apache2 + mySQL-server-5.0 + phpMyAdmin
Pour commencer, installons notre serveur Apache2, avec PHPmyAdmin et MySQL-5.0
L&#8217;habituelle ligne de commande magique:
sudo aptitude install phpmyadmin mysql-server-5.0
Ou pour ceux qui préfèrent, les liens apt:

pour phpmyadmin
pour serveur mySQL-5.0

Sélectionnez &#171;&#160;apache2&#8243; lorsqu&#8217;on vous demande [...]]]></description>
			<content:encoded><![CDATA[<p>Un petit billet, sous forme de note, pour ceux qui (ré)installent (régulièrement) leur solution <acronym title="Apache-MySQL-PHP">AMP</acronym> à des fins de développement:</p>
<h3 id="toc-apache2-mysql-server-5-0-phpmyadmin">Apache2 + mySQL-server-5.0 + phpMyAdmin</h3>
<p>Pour commencer, installons notre serveur Apache2, avec <a href="http://www.phpmyadmin.net/home_page/index.php">PHPmyAdmin</a> et MySQL-5.0</p>
<p>L&#8217;habituelle ligne de commande magique:</p>
<blockquote><p>sudo aptitude install phpmyadmin mysql-server-5.0</p></blockquote>
<p>Ou pour ceux qui préfèrent, les liens apt:</p>
<ul>
<li>pour <a href="apt://phpmyadmin">phpmyadmin</a></li>
<li>pour <a href="apt://phpmyadmin">serveur mySQL-5.0</a></li>
</ul>
<p>Sélectionnez &laquo;&nbsp;apache2&#8243; lorsqu&#8217;on vous demande de faire un choix de serveur.</p>
<p>A la fin de l&#8217;installation, si vous pouvez accéder à votre serveur web à l&#8217;adresse <a href="http://127.0.0.1/">http;//127.0.0.1</a>, c&#8217;est que tout à fonctionné correctement.</p>
<h3 id="toc-configuration">Configuration</h3>
<h4 id="toc-emplacement-des-fichiers-a-publier-methode-1">Emplacement des fichiers à publier: méthode 1</h4>
<p>Il est possible que l&#8217;emplacement du dossier www (situé dans /var/www/) ne vous convienne pas. Il est très facile de le modifier.</p>
<p>Ouvrez avec votre éditeur de texte favori (en mode superutilisateur) le fichier /etc/apache2/sites-avalaible/default.</p>
<p>Chez moi ça donne</p>
<blockquote><p>sudo nano /etc/apache2/sites-available/default</p></blockquote>
<p>, mais d&#8217;autres préférerons l&#8217; interface un peu plus intuitive (et surtout avec une souris) de gedit:</p>
<blockquote><p>gksu gedit /etc/apache2/sites-available/default &amp;</p></blockquote>
<p>.</p>
<p>Et modifiez le chemin par defaut (/var/www/) par celui que vous préférez (ça sera pour moi /home/alexis/www/). Attention, <span style="text-decoration: underline;">il y à deux occurrences </span> de /var/www/ !</p>
<p>Pour vérifier que les modifications ont bien fonctionné, redémarrons apache et affichons la racine de notre serveur. Théoriquement, les fichiers souhaités apparaissent.</p>
<blockquote><p>sudo /etc/init.d/apache2 force-reload</p></blockquote>
<p class="message info">J&#8217;en profite à cette étape là pour généralement changer la directive  <em>AllowOverride NONE</em> en  <em>AllowOverride ALL</em> pour que mes <a href="http://en.wikipedia.org/wiki/Rewrite_engine">ré-écritures d&#8217;URL</a> fonctionnent correctement.</p>
<p>Si vous souhaitez en savoir plus sur les directives apache, vous pouvez télécharger le paquet <a href="apt://apache2-doc">apache2-doc</a> disponible dans les dépôts officiels, ou <a href="http://httpd.apache.org/docs/2.2/">consulter la documentation en ligne</a>.</p>
<h4 id="toc-emplacement-des-fichiers-a-publier-methode-2">Emplacement des fichiers à publier: méthode 2</h4>
<p>Vous pouvez également activer l&#8217;option <em>User Home Directory</em> dans le fichier <strong>httpd.conf</strong>:</p>
<blockquote><p># User home directories<br />
Include etc/extra/httpd-userdir.conf</p></blockquote>
<p>Vos fichiers sont alors disponible via http://localhost/~nom_utilisateur/ et compris dans le sous répertoire <strong>public_html</strong> de votre Home.</p>
<p>Merci <a href="http://wazzaaabid.free.fr/blog/index.php">@wazzabid</a> pour l&#8217;astuce.</p>
<h4 id="toc-activer-lurl-rewriting">Activer l&#8217;URL Rewriting</h4>
<p>De plus en plus de personnes et d&#8217;applications mettent à profit la ré-écriture d&#8217;url, si c&#8217;est votre cas, deux lignes suffisent pour l&#8217;activer avec apache2:</p>
<blockquote><p>sudo a2enmod rewrite</p></blockquote>
<p class="message info">Vous pouvez aussi désactiver un module avec la commande <em>a2dismod</em></p>
<h4 id="toc-configurer-php">Configurer PHP</h4>
<p>Par défaut, PHP ne notifie pas toutes les erreurs qu&#8217;il rencontre (et d&#8217;un point de vue sécuritaire, pour des sites en production, c&#8217;est bien-venu). Pour un développeur, il est quand même utile de voir s&#8217;afficher tous les avertissements.</p>
<p>Rien de bien compliqué: éditez le fichier <strong> /etc/php5/apache2/php.ini</strong> et changez la valeur du <em>error_reporting</em> (~ligne 317 chez moi). Il doit en résulter la ligne suivante:</p>
<blockquote><p>error_reporting  =  E_ALL | E_STRICT</p></blockquote>
<p>Libre à vous de choisir les options que vous préférez.</p>
<h4 id="toc-desactiver-le-lancement-des-serveurs-au-demarrage">Désactiver le lancement des serveurs au démarrage</h4>
<p>Une fois installés, les serveurs Apache et MySQL se lancent automatiquement au démarrage de votre machine, en tant que service. Vous pouvez les désactiver via Système -&gt; Administration -&gt; Services.</p>
<h4 id="toc-securisation-de-mysql">Sécurisation de mySQL</h4>
<p>mySQL fournit un outil fort interessant peremttant d&#8217;effectuer quelques opérations courantes menant à une meilleure sécurisation du serveur mySQL de base. Il suffit de taper la commande dans un terminal:</p>
<blockquote><p>mysql_secure_installation</p></blockquote>
<p>Merci <a href="http://www.tenshu.fr/">@Tenshu</a> pour l&#8217;astuce!</p>
<h3 id="toc-conclusion">Conclusion</h3>
<p>Et voila, vous disposez d&#8217;une solution AMP pour le développement. N&#8217;oubliez pas de Redémarrer votre serveur Apache une fois les modifications effectuées.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notmyidea.org/article/lamp-apache-mysql-php-installation-on-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
