首页 > 系统服务 > 详细

ubuntu安装XHProf

时间:2016-01-27 10:29:29      阅读:147      评论:0      收藏:0      [点我收藏+]

1. 安装XHProf
wget http://pecl.php.net/get/xhprof-0.9.2.tgz

tar zxf xhprof-0.9.2.tgz
cd xhprof-0.9.2

sudo su
#安装php5-dev
apt-get install php5-dev

cd extension/
phpize
#下一步非常重要:
./configure –with-php-config=/usr/bin/php-config

make&&make install
make test

然后找到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=/opt/xhprof/

创建/opt/xhprof文件,更改文件权限

安装graphviz ,以图形形式查看结果
apt-get install graphviz

重起apache2,查看phpinfo,出现xhprof的配置

ubuntu安装XHProf

原文:http://www.cnblogs.com/aipiaoborensheng/p/5162223.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!