The method of compiling and installing xdebug in Ubuntu Environment
This paper gives an example of the method of compiling and installing xdebug in Ubuntu environment. Share with you for your reference, the details are as follows:
Earlier, we introduced the method of compiling and installing PHP and Nginx in Ubuntu environment, and here we will explain the method of compiling and installing xdebug with source code.
Download and extract xdebug
Xdebug download address: https://xdebug.org/download.php
I downloaded 2.3.3. In fact, I didn't know the difference between these versions, so I downloaded one at random.
Cd / usr/local/srcwget https://xdebug.org/files/xdebug-2.3.3.tgztar-zxvf xdebug-2.3.3.tgz
Compile and install xdebug
Php is installed under the / opt/php path
Cd / usr/local/src/xdebug-2.3.3/opt/php/bin/phpize./configure-- prefix=/opt/xdebug-- with-php-config=/opt/php/bin/php-configmake & & make install
After the installation is successful, the following information is displayed:
Installing shared extensions:
/ opt/php/lib/php/extensions/no-debug-non-zts-20131226/
Configure php.ini
We added the xdebug extension at the end of php.ini:
Zend_extension=/opt/php/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
Restarting nginx takes effect.
If you cannot find php.ini, you can use / opt/php/bin/php-I | grep php.ini to find the path information of php.ini. If there is no php.ini file in the corresponding path, you can cpoy a php.ini-development or php.ini-production from the extracted php source code.
I hope what is described in this article will be helpful to the configuration of your Ubuntu environment.