Installation de Turck MMCache

Un article de Wiki SOS-ADMIN.



Sommaire

Introduction

HomePage - Turck MMCache pour PHP

Ce guide à été testé sur une distribution Gentoo avec les élements suivants :

  • net-www/apache-1.3.34-r11
  • dev-php/mod_php-4.4.0-r9


Préparation

# On telecharge
cd /tmp
wget http://switch.dl.sourceforge.net/sourceforge/turck-mmcache/turck-mmcache-2.4.6.tar.bz2 -O turck-mmcache-2.4.6.tar.bz2

# On extrait
tar xjvf turck-mmcache-2.4.6.tar.bz2
rm --force turck-mmcache-2.4.6.tar.bz2

# On compile
cd turck-mmcache-2.4.6
export PHP_PREFIX="/usr"
$PHP_PREFIX/bin/phpize
./configure --enable-mmcache=shared --with-php-config=$PHP_PREFIX/bin/php-config
make


Installation

# On installe le module
make install

# On créer le répertoire du cache
mkdir /tmp/mmcache
chmod 0777 /tmp/mmcache


Configuration

Ensuite, on insère ça dans son php.ini (dans mon cas : /etc/php/apache1-php4/php.ini) :

extension="mmcache.so"
mmcache.shm_size="16"
mmcache.cache_dir="/tmp/mmcache"
mmcache.enable="1"
mmcache.optimizer="1"
mmcache.check_mtime="1"
mmcache.debug="0"
mmcache.filter=""
mmcache.shm_max="0"
mmcache.shm_ttl="0"
mmcache.shm_prune_period="0"
mmcache.shm_only="0"
mmcache.compress="1"

Pensez à redémarrer Apache si vous utilisez PHP en module :)

Nettoyage

cd ..
rm -rf turck-mmcache-2.4.6


Vos commentaires

Merci d'ajouter vos commentaires à la page de discussion... Discuter:Installation_de_Turck_MMCache

Credits

--DaviXX 16 fév 2006 à 12:57 (CET)