centos7.2 安装xdebug

  1. 下载

到官网下载源码  https://xdebug.org/download.php

cd /wwwroot
https://xdebug.org/files/xdebug-2.7.0alpha1.tgz

2.解压安装

mkdir xdebug   #创建目录
cp xdebug-2.7.0alphal.tgz --target-directory=./xdebug  #拷贝到创建目录
cd xdebug  #进入目录
tar -xvf xdebug-2.7.0alphal.tgz  #解压
cd xdebug-2.7.0alphal
 /usr/local/php/bin/php -m  #查看是否已经看装模块
 /usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make instal #编译安装

3.安装成功会提示

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/

  +----------------------------------------------------------------------+
  |                                                                      |
  |   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.                                                            |
  |                                                                      |
  +----------------------------------------------------------------------+

4.php.ini添加扩展  

 cd /usr/local/php/etc
 vim php.ini 
 #最后一行写入 
 
[xDebug]
zend_extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so"

5.  echo phpinfo();查看

Adam博客
请先登录后发表评论
  • 最新评论
  • 总共0条评论
  • Powered by bjyblog modified by Adam © 2014-2024 www.lixiaopeng.com 版权所有 ICP证:鲁ICP备15039297号
  • 联系邮箱:14846869@qq.com