XHProf安装全解析

[root@vm11040010 ~]# ls
anacdump.txt  anaconda-ks.cfg  install.log  install.log.syslog  trunk  updatesrv64.sh
[root@vm11040010 ~]# wget wget http://pecl.php.net/get/xhprof-0.9.2.tgz
--2011-08-31 15:51:18--  http://wget/
Resolving wget... failed: Name or service not known.
wget: unable to resolve host address `wget'
--2011-08-31 15:51:18--  http://pecl.php.net/get/xhprof-0.9.2.tgz
Resolving pecl.php.net... 76.75.200.106
Connecting to pecl.php.net|76.75.200.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 931660 (910K) [application/octet-stream]
Saving to: `xhprof-0.9.2.tgz'


100%[========================================================================================================================================>] 931,660     25.8K/s   in 85s     


2011-08-31 15:52:45 (10.8 KB/s) - `xhprof-0.9.2.tgz' saved [931660/931660]


FINISHED --2011-08-31 15:52:45--
Downloaded: 1 files, 910K in 1m 25s (10.8 KB/s)
[root@vm11040010 ~]# ls
anacdump.txt  anaconda-ks.cfg  install.log  install.log.syslog  trunk  updatesrv64.sh  xhprof-0.9.2.tgz
[root@vm11040010 ~]# 
[root@vm11040010 ~]# 
[root@vm11040010 ~]# tar -zxvf xhprof-0.9.2.tgz 
package.xml
xhprof-0.9.2/examples/sample.php
xhprof-0.9.2/extension/tests/common.php
xhprof-0.9.2/extension/tests/xhprof_001.phpt
xhprof-0.9.2/extension/tests/xhprof_002.phpt
xhprof-0.9.2/extension/tests/xhprof_003.phpt
xhprof-0.9.2/extension/tests/xhprof_004_inc.php
xhprof-0.9.2/extension/tests/xhprof_004_require.php
xhprof-0.9.2/extension/tests/xhprof_004.phpt
xhprof-0.9.2/extension/tests/xhprof_005.phpt
xhprof-0.9.2/extension/tests/xhprof_006.phpt
xhprof-0.9.2/extension/tests/xhprof_007.phpt
xhprof-0.9.2/extension/tests/xhprof_008.phpt
xhprof-0.9.2/extension/config.m4
xhprof-0.9.2/extension/php_xhprof.h
xhprof-0.9.2/extension/xhprof.c
xhprof-0.9.2/xhprof_html/css/xhprof.css
xhprof-0.9.2/xhprof_html/docs/index.html
xhprof-0.9.2/xhprof_html/docs/sample-callgraph-image.jpg
xhprof-0.9.2/xhprof_html/docs/sample-diff-report-flat-view.jpg
xhprof-0.9.2/xhprof_html/docs/sample-diff-report-parent-child-view.jpg
xhprof-0.9.2/xhprof_html/docs/sample-flat-view.jpg
xhprof-0.9.2/xhprof_html/docs/sample-parent-child-view.jpg
xhprof-0.9.2/xhprof_html/jquery/indicator.gif
xhprof-0.9.2/xhprof_html/jquery/jquery-1.2.6.js
xhprof-0.9.2/xhprof_html/jquery/jquery.autocomplete.css
xhprof-0.9.2/xhprof_html/jquery/jquery.autocomplete.js
xhprof-0.9.2/xhprof_html/jquery/jquery.tooltip.css
xhprof-0.9.2/xhprof_html/jquery/jquery.tooltip.js
xhprof-0.9.2/xhprof_html/js/xhprof_report.js
xhprof-0.9.2/xhprof_html/callgraph.php
xhprof-0.9.2/xhprof_html/index.php
xhprof-0.9.2/xhprof_html/typeahead.php
xhprof-0.9.2/xhprof_lib/display/typeahead_common.php
xhprof-0.9.2/xhprof_lib/display/xhprof.php
xhprof-0.9.2/xhprof_lib/utils/callgraph_utils.php
xhprof-0.9.2/xhprof_lib/utils/xhprof_lib.php
xhprof-0.9.2/xhprof_lib/utils/xhprof_runs.php
xhprof-0.9.2/CHANGELOG
xhprof-0.9.2/CREDITS
xhprof-0.9.2/README
xhprof-0.9.2/LICENSE
[root@vm11040010 ~]# 
[root@vm11040010 ~]# 
[root@vm11040010 ~]# cd xhprof-0.9.2
[root@vm11040010 xhprof-0.9.2]# 
[root@vm11040010 xhprof-0.9.2]# 
[root@vm11040010 xhprof-0.9.2]# 
[root@vm11040010 xhprof-0.9.2]# cd extension/
[root@vm11040010 extension]# ls
config.m4  php_xhprof.h  tests  xhprof.c
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# /usr/local/
apache2/              etc/                  lib/                  mysql/                share/                sina_sysstat/         
bin/                  games/                lib64/                net-snmp/             sina_rd_info_collect/ src/                  
cfengine/             include/              libexec/              sbin/                 sinasrv2/             
[root@vm11040010 extension]# /usr/local/
apache2/              etc/                  lib/                  mysql/                share/                sina_sysstat/         
bin/                  games/                lib64/                net-snmp/             sina_rd_info_collect/ src/                  
cfengine/             include/              libexec/              sbin/                 sinasrv2/             
[root@vm11040010 extension]# /usr/local/s
sbin/                 share/                sina_rd_info_collect/ sinasrv2/             sina_sysstat/         src/                  
[root@vm11040010 extension]# /usr/local/sina
sina_rd_info_collect/ sinasrv2/             sina_sysstat/         
[root@vm11040010 extension]# /usr/local/sinasrv2/
bin/     etc/     include/ lib/     lib64/   modules/ sbin/    share/   var/     
[root@vm11040010 extension]# where is php
-bash: where: command not found
[root@vm11040010 extension]# whereis php
php: /usr/local/bin/php
[root@vm11040010 extension]# whereis phpize
phpize:
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# whereis a
a:
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# /usr/local/sinasrv2/lib
lib/   lib64/ 
[root@vm11040010 extension]# /usr/local/sinasrv2/lib/
apr-util-1/                            libevent-1.3e.so.1.0.3                 libmemcached_functions_mysql.la        libsybdb.la
httpd/                                 libevent.la                            libmemcached_functions_mysql.so        libsybdb.so
ImageMagick-6.3.7/                     libevent.so                            libmemcached_functions_mysql.so.0      libsybdb.so.5
libapr-1.la                            libMagick.la                           libmemcached_functions_mysql.so.0.0.0  libsybdb.so.5.0.0
libapr-1.so                            libMagick++.la                         libmemcached.la                        libtidy-0.99.so.0
libapr-1.so.0                          libMagick.so                           libmemcached.so                        libtidy-0.99.so.0.0.0
libapr-1.so.0.4.2                      libMagick++.so                         libmemcached.so.2                      libtidy.la
libaprutil-1.la                        libMagick.so.10                        libmemcached.so.2.0.0                  libtidy.so
libaprutil-1.so                        libMagick++.so.10                      libmemcachedutil.la                    libWand.la
libaprutil-1.so.0                      libMagick.so.10.0.9                    libmemcachedutil.so                    libWand.so
libaprutil-1.so.0.3.9                  libMagick++.so.10.0.9                  libmemcachedutil.so.0                  libWand.so.10
libct.la                               libmcrypt/                             libmemcachedutil.so.0.0.0              libWand.so.10.0.9
libct.so                               libmcrypt.la                           libmhash.la                            php/
libct.so.4                             libmcrypt.so                           libmhash.so                            pkgconfig/
libct.so.4.0.0                         libmcrypt.so.4                         libmhash.so.2                          X11/
libevent-1.3e.so.1                     libmcrypt.so.4.4.8                     libmhash.so.2.0.1                      
[root@vm11040010 extension]# /usr/local/sinasrv2/lib/php/
Archive/                   DB/                        IceBox/                    Log/                       PEAR5.php                  SSOClient.php
build/                     doc/                       IceBox.php                 Log.php                    pearcmd.php                SSOClientUCMailCookie.php
Cache/                     DPCounter.php              IceGrid/                   Mail/                      PEAR.php                   SSOConfig.php
.channels/                 DPSimpleDB.php             IceGrid.php                Mail.php                   peclcmd.php                SSOCookie.php
Config/                    DPUtils/                   IcePatch2/                 MDB2/                      .registry/                 SSOWeiboClient.php
Config.php                 extensions/                IcePatch2.php              MDB2.php                   Session.php                SSOWeiboCookie.php
Console/                   Glacier2/                  Ice.php                    Net/                       SINA/                      Structures/
cookie.conf                Glacier2.php               IceStorm/                  OS/                        siplookup/                 System.php
data/                      HTML/                      IceStorm.php               Pager/                     Smarty/                    test/
Date/                      HTTP/                      iplookup/                  Pager.php                  SquidPurge.php             VFS/
Date.php                   Ice/                       json.php                   PEAR/                      SSOBase.php                XML/
[root@vm11040010 extension]# /usr/local/sinasrv2/bin/php
php         php-cgi     php-config  phpize      
[root@vm11040010 extension]# /usr/local/sinasrv2/bin/phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# /usr/local/sinasrv2/bin/p
pear        peardev     pecl        php         php-cgi     php-config  phpize      
[root@vm11040010 extension]# ./configure --with-php-config=/usr/local/sinasrv2/bin/php-config
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/sinasrv2
checking for PHP includes... -I/usr/local/sinasrv2/include/php -I/usr/local/sinasrv2/include/php/main -I/usr/local/sinasrv2/include/php/TSRM -I/usr/local/sinasrv2/include/php/Zend -I/usr/local/sinasrv2/include/php/ext -I/usr/local/sinasrv2/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/sinasrv2/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /usr/local/sinasrv2/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable xhprof support... yes, shared
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no


creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
[root@vm11040010 extension]# make
/bin/sh /root/xhprof-0.9.2/extension/libtool --mode=compile cc  -I. -I/root/xhprof-0.9.2/extension -DPHP_ATOM_INC -I/root/xhprof-0.9.2/extension/include -I/root/xhprof-0.9.2/extension/main -I/root/xhprof-0.9.2/extension -I/usr/local/sinasrv2/include/php -I/usr/local/sinasrv2/include/php/main -I/usr/local/sinasrv2/include/php/TSRM -I/usr/local/sinasrv2/include/php/Zend -I/usr/local/sinasrv2/include/php/ext -I/usr/local/sinasrv2/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/xhprof-0.9.2/extension/xhprof.c -o xhprof.lo 
mkdir .libs
 cc -I. -I/root/xhprof-0.9.2/extension -DPHP_ATOM_INC -I/root/xhprof-0.9.2/extension/include -I/root/xhprof-0.9.2/extension/main -I/root/xhprof-0.9.2/extension -I/usr/local/sinasrv2/include/php -I/usr/local/sinasrv2/include/php/main -I/usr/local/sinasrv2/include/php/TSRM -I/usr/local/sinasrv2/include/php/Zend -I/usr/local/sinasrv2/include/php/ext -I/usr/local/sinasrv2/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/xhprof-0.9.2/extension/xhprof.c  -fPIC -DPIC -o .libs/xhprof.o
/bin/sh /root/xhprof-0.9.2/extension/libtool --mode=link cc -DPHP_ATOM_INC -I/root/xhprof-0.9.2/extension/include -I/root/xhprof-0.9.2/extension/main -I/root/xhprof-0.9.2/extension -I/usr/local/sinasrv2/include/php -I/usr/local/sinasrv2/include/php/main -I/usr/local/sinasrv2/include/php/TSRM -I/usr/local/sinasrv2/include/php/Zend -I/usr/local/sinasrv2/include/php/ext -I/usr/local/sinasrv2/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o xhprof.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/xhprof-0.9.2/extension/modules  xhprof.lo 
cc -shared  .libs/xhprof.o   -Wl,-soname -Wl,xhprof.so -o .libs/xhprof.so
creating xhprof.la
(cd .libs && rm -f xhprof.la && ln -s ../xhprof.la xhprof.la)
/bin/sh /root/xhprof-0.9.2/extension/libtool --mode=install cp ./xhprof.la /root/xhprof-0.9.2/extension/modules
cp ./.libs/xhprof.so /root/xhprof-0.9.2/extension/modules/xhprof.so
cp ./.libs/xhprof.lai /root/xhprof-0.9.2/extension/modules/xhprof.la
PATH="$PATH:/sbin" ldconfig -n /root/xhprof-0.9.2/extension/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/xhprof-0.9.2/extension/modules


If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'


See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------


Build complete.
Don't forget to run 'make test'.


[root@vm11040010 extension]# make install
Installing shared extensions:     /usr/local/sinasrv2/lib/php/extensions/no-debug-non-zts-20060613/
[root@vm11040010 extension]# 
[root@vm11040010 extension]# make test
/bin/sh /root/xhprof-0.9.2/extension/libtool --mode=install cp ./xhprof.la /root/xhprof-0.9.2/extension/modules
cp ./.libs/xhprof.so /root/xhprof-0.9.2/extension/modules/xhprof.so
cp ./.libs/xhprof.lai /root/xhprof-0.9.2/extension/modules/xhprof.la
PATH="$PATH:/sbin" ldconfig -n /root/xhprof-0.9.2/extension/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/xhprof-0.9.2/extension/modules


If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'


See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------


Build complete.
Don't forget to run 'make test'.




=====================================================================
PHP         : /usr/local/sinasrv2/bin/php 
PHP_SAPI    : cli
PHP_VERSION : 5.2.14
ZEND_VERSION: 2.2.0
PHP_OS      : Linux - Linux vm11040010 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:30:06 EDT 2010 x86_64
INI actual  : /root/xhprof-0.9.2/extension/tmp-php.ini
More .INIs  :  
CWD         : /root/xhprof-0.9.2/extension
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2011-08-31 16:01:54
=====================================================================
PASS XHPRrof: Basic Profiling Test
Author: Kannan [tests/xhprof_001.phpt] 
PASS XHPRrof: Test (direct and indirect) recursive function calls.
Author: Kannan [tests/xhprof_002.phpt] 
PASS XHPRrof: Test Class Methods, Constructors, Destructors.
Author: Kannan [tests/xhprof_003.phpt] 
PASS XHPRrof: Test Include File (load/run_init operations)
Author: Kannan [tests/xhprof_004.phpt] 
PASS XHPRrof: Timer Tests5.phpt]
Author: Kannan [tests/xhprof_005.phpt] 
PASS XHPRrof: Basic Sampling Test
Author: mpal [tests/xhprof_006.phpt] 
PASS XHPRrof: Test excluding call_user_func and similar functions
Author: mpal [tests/xhprof_007.phpt] 
PASS XHPRrof: Sampling Mode Test
Author: kannan [tests/xhprof_008.phpt] 
=====================================================================
TIME END 2011-08-31 16:01:57


=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   17
---------------------------------------------------------------------


Number of tests :    8                 8
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    8 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken      :    3 seconds
=====================================================================


We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.
Do you want to send this report now? [Yns]: n
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# vim /usr/local/sinasrv2/lib/php.ini
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 
[root@vm11040010 extension]# 

[root@vm11040010 extension]# 

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值