<?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>piouPiouM&#039;s dev&#187; Archives pour le tag sysadmin – piouPiouM&#039;s dev</title>
	<atom:link href="http://pioupioum.fr/tag/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://pioupioum.fr</link>
	<description>Bloc-note d&#039;un développeur web</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:47:44 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP&#160;: installer APC sous Mac OS X Leopard</title>
		<link>http://pioupioum.fr/snippets/php-installer-apc-macosx.html</link>
		<comments>http://pioupioum.fr/snippets/php-installer-apc-macosx.html#comments</comments>
		<pubDate>Thu, 06 May 2010 18:47:30 +0000</pubDate>
		<dc:creator>piouPiouM</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://pioupioum.fr/?p=376</guid>
		<description><![CDATA[Sous Mac OS X Leopard, l&#8217;installation du système de cache APC via PECL est en carton. Pour faire simple, l&#8217;extension n&#8217;est disponible que pour la version CLI de PHP.

Il est cependant possible d&#8217;y remédier1 et ainsi disposer d&#8217;APC avec la configuration de base fourni par Apple.

Récupérer la dernière version d&#8217;APC

$ curl http://pecl.php.net/get/APC -o ~/Downloads/APC-latest.tgz
$ tar [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Sous Mac OS X Leopard, l&#8217;installation du système de cache <a href="http://php.net/manual/fr/book.apc.php" title="PHP: APC - Manual">APC</a> <em>via</em> <a href="http://pecl.php.net/" title="PECL :: The PHP Extension Community Library">PECL</a> est en carton. Pour faire simple, l&#8217;extension n&#8217;est disponible que pour la version CLI de PHP.</p>

<p>Il est cependant possible d&#8217;y remédier<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> et ainsi disposer d&#8217;<strong>APC</strong> avec la configuration de base fourni par Apple.</p>

<h2>Récupérer la dernière version d&#8217;APC</h2>

<pre>$ curl http://pecl.php.net/get/APC -o ~/Downloads/APC-latest.tgz
$ tar -zxf !$ -C ~/Downloads/
$ cd ~/Downloads/APC-3.1.3p1/</pre>

<p>La version utilisée ici est la 3.1.3p1.</p>

<h2>Préparer l&#8217;environnement de compilation</h2>

<pre>$ /usr/bin/phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519</pre>

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

<h2>Lancer la compilation</h2>

<p>Copier-coller dans la commande qui suit dans son intégralité. Attention à ne pas inclure de retours à la ligne.</p>

<pre>MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./configure</pre>

<p>Puis un coup de <code>make</code>&#160;:</p>

<pre>$ make
...
----------------------------------------------------------------------
Libraries have been installed in:
   /Users/mehdi/Downloads/APC-3.1.3p1/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.</pre>

<p>Et pour finir, on installe l&#8217;extension APC.</p>

<pre>$ sudo make install
Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20060613/</pre>

<h2>Activer l&#8217;extension APC pour PHP</h2>

<p>Éditer le fichier <code>php.ini</code> pour ajouter la configuration qui suit&#160;:</p>


<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">extension</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> apc.so</span>
apc.enabled <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span>
apc.enable_cli <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span>
apc.mmap_file_mask <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /tmp/apc.XXXXXX</span>
apc.num_files_hint <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1024</span>
apc.shm_segments <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span>
apc.shm_size <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 128</span>
apc.ttl <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 7200</span>
apc.user_ttl <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 7200</span></pre></div></div>


<p>Relancer Apache pour qu&#8217;il prenne en compte la nouvelle extension.</p>

<h3 class='related_post_title'>Continuez votre lecture sur des sujets similaires</h3>

<ul class='related_post'><li><a href='http://pioupioum.fr/snippets/textmate-commande-exporter-mots-word-wrap.html' title='TextMate : commande &laquo;&nbsp;Export words&nbsp;&raquo;'>TextMate&#160;: commande &laquo;&nbsp;Export words&nbsp;&raquo;</a></li><li><a href='http://pioupioum.fr/snippets/php-convertir-datetime-unix-timestamp.html' title='PHP : convertir un DATETIME en un timestamp UNIX'>PHP&#160;: convertir un DATETIME en un timestamp UNIX</a></li><li><a href='http://pioupioum.fr/snippets/php-uncamel-fonction-convertir-camel-case.html' title='PHP : fonction uncamel() pour inverser une notation en CamelCase'>PHP&#160;: fonction uncamel() pour inverser une notation en CamelCase</a></li><li><a href='http://pioupioum.fr/snippets/apache-rotation-logs.html' title='Rotation des logs Apache'>Rotation des logs Apache</a></li><li><a href='http://pioupioum.fr/snippets/convertir-icone-icns-png.html' title='Convertir une icône ICNS en une image PNG'>Convertir une icône ICNS en une image PNG</a></li></ul>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>Source&#160;: <a href="http://discussions.apple.com/thread.jspa?threadID=1578979" title="Apple - Support - Discussions - Entropy php5 with GD support and APC ...">Forum du support Apple</a>.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://pioupioum.fr/snippets/php-installer-apc-macosx.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rotation des logs Apache</title>
		<link>http://pioupioum.fr/snippets/apache-rotation-logs.html</link>
		<comments>http://pioupioum.fr/snippets/apache-rotation-logs.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 09:14:46 +0000</pubDate>
		<dc:creator>piouPiouM</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[astuces]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://pioupioum.fr/?p=306</guid>
		<description><![CDATA[Effectuer une rotation de ses logs Apache chaque semaine à l&#8217;aide de rotatelogs&#160;:

CustomLog "&#124;/usr/sbin/rotatelogs /var/log/www/mondomaine.tld/mondomaine.tld-access_log 604800" "combined"


Notez le pipe au début d&#8217;argument qui permet la redirection du logfile vers rotatelogs.
Merci à patpro pour l&#8217;astuce.

Continuez votre lecture sur des sujets similaires

PHP&#160;: installer APC sous Mac OS X LeopardOptimiser le chargement des AdSenseWordPress&#160;: autoriser l&#8217;upload de fichiers [...]]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Effectuer une <strong>rotation de ses logs Apache</strong> chaque semaine à l&#8217;aide de <strong><a href="http://httpd.apache.org/docs/2.0/programs/rotatelogs.html" title="rotatelogs - Piped logging program to rotate Apache logs - Apache HTTP Server">rotatelogs</a></strong>&#160;:</p>

<pre><code>CustomLog "|/usr/sbin/rotatelogs /var/log/www/mondomaine.tld/mondomaine.tld-access_log 604800" "combined"
</code></pre>

<p>Notez le <em>pipe</em> au début d&#8217;argument qui permet la redirection du logfile vers rotatelogs.<br />
Merci à <a href="http://www.patpro.net/" title="Je pensais qu'il était avec vous... | patpro.net">patpro</a> pour l&#8217;astuce.</p>

<h3 class='related_post_title'>Continuez votre lecture sur des sujets similaires</h3>

<ul class='related_post'><li><a href='http://pioupioum.fr/snippets/php-installer-apc-macosx.html' title='PHP : installer APC sous Mac OS X Leopard'>PHP&#160;: installer APC sous Mac OS X Leopard</a></li><li><a href='http://pioupioum.fr/developpement/optimiser-rapidite-chargement-adsense-jquery.html' title='Optimiser le chargement des AdSense'>Optimiser le chargement des AdSense</a></li><li><a href='http://pioupioum.fr/snippets/wordpress-autoriser-upload-media-format-inconnu.html' title='WordPress : autoriser l&#8217;upload de fichiers au format non-supporté'>WordPress&#160;: autoriser l&#8217;upload de fichiers au format non-supporté</a></li><li><a href='http://pioupioum.fr/developpement/git-alias-productivite.html' title='Git : des alias pour aller plus vite'>Git&#160;: des alias pour aller plus vite</a></li><li><a href='http://pioupioum.fr/developpement/git-10-commandes-utiles.html' title='Git : 10 commandes utiles'>Git&#160;: 10 commandes utiles</a></li></ul>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://pioupioum.fr/snippets/apache-rotation-logs.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
