Xhprof is a tool used by FB to analyze the performance of PHP programs, using lightweight and convenient. Official address: Http://mirror.facebook.net/facebook/xhprof/doc.html#installation
1, installation use:
wget http://pecl.php.net/get/xhprof-0.9.2.tgz
Tar zxf xhprof-0.9.2.tgz
CD xhprof-0.9.2
Cp-r xhprof_html Xhprof_lib <directory_for_htdocs>
CD extension
Phpize
./configure–with-php-config=/usr/local/php/bin/php-confg
Make
Make install
edit php.ini:
[Xhprof]
Extension=xhprof.so
;
; Directory used by default implementation of the Ixhprofruns
; Interface (namely, the Xhprofruns_default Class) for storing
; Xhprof runs.
;
Xhprof.output_dir=<directory_for_storing_xhprof_runs>
Note Setting directory permissions for Xhprof.output_dir
Restart the service so that the changes take effect, you can now use Xhprof, but in order to show the effect is more dazzling, it is best to continue to install Graphviz.
Use Phpinfo () to confirm that the installation is correct
Install libiconv-1.13.1.tar.gz
Install Graphviz
wget http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.24.0.tar.gz
Tar zxf graphviz-2.24.0.tar.gz
CD graphviz-2.24.0
./configure
Make
Make install