Installer xcache sur Debian Lenny ISPConfig
Suivre ce tutorial.
Une fois le fichier info.php installé sur le serveur alors:
http://ksxxxx.kimsufi.com/info.php
PHP 5.3.4-0.dotdeb.0 with Suhosin-Patch (cli) (built: Jan 3 2011 19:56:59)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Pour trouver les fichier relatifs à XCache:
Pour le configurer:
[xcache-common]
;extension = xcache.so ; La librairie est copiee dans `/etc/php5/apache2/conf.d`
zend_extension = /usr/lib/php5/20090626+lfs/xcache.so
[xcache.admin]
xcache.admin.user = "admin"
;xcache.admin.pass = md5($your_password)
xcache.admin.pass = "xxxxxxx6d956dee1b4cdbc9d6da3"
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M ; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 2
xcache.slots = 8K ; ttl of the cache item, 0=forever
xcache.ttl = 0 ; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 0 ; same as aboves but for variable cache
xcache.var_size = 2M
xcache.var_count = 2
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.test = Off ; N/A for /dev/zero
xcache.readonly_protection = Off
xcache.mmap_path = "/tmp/xcache"
xcache.coredump_directory = "" ; per request settings
xcache.cacher = On
xcache.stat = On
xcache.optimizer = On
[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""
<Directory "/usr/share/doc/php5-xcache/misc/admin">
Options Indexes MultiViews
Deny from All
Allow from <mon adresse IP>
</Directory>
Remarque:
Parfois le répertoire d'administration peut se trouver dans le répertoire "/usr/share/xcache/admin/"
Une fois le fichier info.php installé sur le serveur alors:
http://ksxxxx.kimsufi.com/info.php
- apt-get install php5-xcache
- php -v
PHP 5.3.4-0.dotdeb.0 with Suhosin-Patch (cli) (built: Jan 3 2011 19:56:59)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Pour trouver les fichier relatifs à XCache:
- locate xcache
Pour le configurer:
- cd /etc/php5/apache2/conf.d
- vi xcache.ini
Le fichier xcache.ini doit ressembler au suivant:
[xcache-common]
;extension = xcache.so ; La librairie est copiee dans `/etc/php5/apache2/conf.d`
zend_extension = /usr/lib/php5/20090626+lfs/xcache.so
[xcache.admin]
xcache.admin.user = "admin"
;xcache.admin.pass = md5($your_password)
xcache.admin.pass = "xxxxxxx6d956dee1b4cdbc9d6da3"
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M ; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 2
xcache.slots = 8K ; ttl of the cache item, 0=forever
xcache.ttl = 0 ; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 0 ; same as aboves but for variable cache
xcache.var_size = 2M
xcache.var_count = 2
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.test = Off ; N/A for /dev/zero
xcache.readonly_protection = Off
xcache.mmap_path = "/tmp/xcache"
xcache.coredump_directory = "" ; per request settings
xcache.cacher = On
xcache.stat = On
xcache.optimizer = On
[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""
Créer le mot de passe pour l'administration
- echo -n toto | md5sum
Pour d'administrer, modifier la configuration d'Apache en ajoutant le vhost suivant:
- vi /etc/apache2/sites-available/default
<Directory "/usr/share/doc/php5-xcache/misc/admin">
Options Indexes MultiViews
Deny from All
Allow from <mon adresse IP>
</Directory>
Remarque:
Parfois le répertoire d'administration peut se trouver dans le répertoire "/usr/share/xcache/admin/"
Redémarrer Apache:
Pour vérifier que xcache est actif, deux méthodes:
- /etc/init.d/apache2 restart
Pour vérifier que xcache est actif, deux méthodes:
- http://<serveur>/phpinfo.php
- php -v
Ce qui donne:
# php -v
PHP 5.3.6-6~dotdeb.0 with Suhosin-Patch (cli) (built: Apr 17 2011 13:37:29)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with XCache v1.3.1, Copyright (c) 2005-2010, by mOo
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Articles intéressants:
http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/
http://www.howtoforge.com/xcache-php5-apache2-debian-etch
http://vin0x64.fr/lang/fr/2011/03/accelerer-son-blog-php-avec-xcache/
http://xcache.lighttpd.net/wiki/Release-1.3.1
# php -v
PHP 5.3.6-6~dotdeb.0 with Suhosin-Patch (cli) (built: Apr 17 2011 13:37:29)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with XCache v1.3.1, Copyright (c) 2005-2010, by mOo
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Articles intéressants:
http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/
http://www.howtoforge.com/xcache-php5-apache2-debian-etch
http://vin0x64.fr/lang/fr/2011/03/accelerer-son-blog-php-avec-xcache/
http://xcache.lighttpd.net/wiki/Release-1.3.1
Commentaires
Enregistrer un commentaire