vendredi 24 avril 2015

Installation rapide de XHProf sur Debian Squeeze

XHprof est un PHP profiler, crée par Facebook, permettant de faire du profilling php.

Installation "automatique" :


apt-get install php5-common
apt-get install php5-dev
apt-get install make
apt-get install graphviz
pecl config-set preferred_state beta
pecl install xhprof
touch /etc/php5/conf.d/xhprof.ini

Rajouter le module php :
sudo vi /etc/php5/conf.d/xhprof.ini

Avec le contenu suivant :
[xhprof]
extension=xhprof.so
xhprof.output_dir="/tmp/xhprof"

Installation manuelle :


root@server:/tmp# pecl download xhprof-beta
root@server:/tmp# tar xvf xhprof-0.9.2.tgz
root@server:/tmp# cd ./xhprof-0.9.2/extension/
root@server:/tmp/xhprof-0.9.2/extension/# phpize
root@server:/tmp/xhprof-0.9.2/extension/# ./configure --with-php-config=/usr/bin/php-config
root@server:/tmp/xhprof-0.9.2/extension/# make && make install

Rajouter le module php :
sudo vi /etc/php5/conf.d/xhprof.ini

Avec le contenu suivant :
[xhprof]
extension=xhprof.so
xhprof.output_dir="/tmp/xhprof"

Aucun commentaire:

Enregistrer un commentaire