Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of compiling and installing xdebug in Ubuntu Environment

Shulou Source: shulou.com Published: 2022-06-02 04:10:02 11月08日 Update

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.

Tags: Compilation method environment path source code information configuration clarity success address instance file source code version reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Shulou Information OPPO Reno MariaDB