参考:http://segmentfault.com/a/1190000002608306
首先下载xdebug的源码,到http://www.xdebug.com/download.php
#wget http://www.xdebug.com/files/xdebug-2.3.3.tgz
解压缩
#phpize
#./configure
#make
#make install
安装后会看到提示信息
Installing shared extensions: /usr/lib64/php/modules/
+----------------------------------------------------------------------+
| |
| INSTALLATION INSTRUCTIONS |
| ========================= |
| |
| See http://xdebug.org/install.php#configure-php for instructions |
| on how to enable Xdebug for PHP. |
| |
| Documentation is available online as well: |
| - A list of all settings: http://xdebug.org/docs-settings.php |
| - A list of all functions: http://xdebug.org/docs-functions.php |
| - Profiling instructions: http://xdebug.org/docs-profiling2.php |
| - Remote debugging: http://xdebug.org/docs-debugger.php |
| |
| |
| NOTE: Please disregard the message |
| You should add "extension=xdebug.so" to php.ini |
| that is emitted by the PECL installer. This does not work for |
| Xdebug. |
| |
+----------------------------------------------------------------------+
#vim /etc/php.ini
添加一行 zend_extension=/usr/lib64/php/modules/xdebug.so
#service php-ftpm restart
如果需要远程调试,再加入下面两行:
xdebug.remote_enable = on
xdebug.remote_host = 10.10.10.10