美文网首页
centros 6.5编译安装xDebug

centros 6.5编译安装xDebug

作者: 搬砖的作家 | 来源:发表于2016-11-02 20:43 被阅读27次

相信能够搜索到我这篇文章的同学,都已经知道xdebug是什么,以及安装xdebug以后对我们开发的种种便利,我在这里就不再多说xdebug的有点,直接切入正题,如何安装xdebug.

第一步 下载xdebug源码

网址:https://xdebug.org/files/xdebug-2.4.1.tgz
最新版本可以到后面这个网址找:https://xdebug.org/

第二步 解压

tar -xzf 命令

第三步 找到自己的phpize

find / -name phpize
我的电脑找到目录为
/usr/local/php/bin/phpize
/root/src/php-5.6.26/scripts/phpize

具体以上操作的代码为

wget  https://xdebug.org/files/xdebug-2.4.1.tgz  // 下载命令
tar -xzf xdebug-2.4.1.tgz   // 解压缩
cd xdebug-2.4.1 
/usr/local/php/bin/phpize
./configure --enable-xdebug
make
make install

注意:

./configure --enable-xdebug 这一步可能会报
configure: error: Cannot find php-config. Please use --with-php-config=PATH的错误
解决方法:
使用命令
find / -name php-config
找到这个文件并且使用
./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config

最后一步

在php-ini 配置文件加上
zend_extension="/usr/local/php/lib/php/extensions/no-debug-zts-20131226/xdebug.so"
后面跟的是 xdebug.so的路径
不知道怎么办
肯定是用上面的命令查 find / -name xdebug.so
选取 在php目录里面的那个

配置好以后,重新启动一下服务器 恭喜你xdebug已经安装完成
给上我安装好的截图
相信能够搜索到我这篇文章的同学,都已经知道xdebug是什么,以及安装xdebug以后对我们开发的种种便利,我在这里就不再多说xdebug的有点,直接切入正题,如何安装xdebug.

第一步 下载xdebug源码

网址:https://xdebug.org/files/xdebug-2.4.1.tgz
最新版本可以到后面这个网址找:https://xdebug.org/

第二步 解压

tar -xzf 命令

第三步 找到自己的phpize

find / -name phpize
我的电脑找到目录为
/usr/local/php/bin/phpize
/root/src/php-5.6.26/scripts/phpize

具体以上操作的代码为

wget  https://xdebug.org/files/xdebug-2.4.1.tgz  // 下载命令
tar -xzf xdebug-2.4.1.tgz   // 解压缩
cd xdebug-2.4.1 
/usr/local/php/bin/phpize
./configure --enable-xdebug
make
make install

注意:

./configure --enable-xdebug 这一步可能会报
configure: error: Cannot find php-config. Please use --with-php-config=PATH的错误
解决方法:
使用命令
find / -name php-config
找到这个文件并且使用
./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config

最后一步

在php-ini 配置文件加上
zend_extension="/usr/local/php/lib/php/extensions/no-debug-zts-20131226/xdebug.so"
后面跟的是 xdebug.so的路径
不知道怎么办
肯定是用上面的命令查 find / -name xdebug.so
选取 在php目录里面的那个

配置好以后,重新启动一下服务器 恭喜你xdebug已经安装完成
给上我安装好的截图

QQ截图20161102204523.png

相关文章

网友评论

      本文标题:centros 6.5编译安装xDebug

      本文链接:https://www.haomeiwen.com/subject/zcxbuttx.html