代码拉取完成,页面将自动刷新
from http://www.open-open.com/lib/view/open1453899928714.html
##下载编译安装的命令如下:
$ wget https://github.com/phacility/xhprof/archive/master.zip
$ unzip ./xhprof_master.zip
$ cd ./xhprof_master/extension
$ /usr/local/php/bin/phpize
$ ./configure --with-php-config=/usr/local/php/bin/php-config
$ make
$ make install
php -m
$ mkdir -p /www/sites/xhprof
$ cp -r ./xhprof_master/xhprof_html /www/sites/xhprof
$ cp -r ./xhprof_master/xhprof_lib /www/sites/xhprof
在nginx中增加如下代码:
server {
listen 8999;
root /opt/sites/xhprof/;
index index.php index.html;
location ~ .*\.php$ {
add_header Cache-Control "no-cache, no-store, max-age=0, must-revalidate";
add_header Pragma no-cache;
add_header Access-Control-Allow-Origin *;
add_header Via "1.0 xgs-150";
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。