How to compile and install xdebug in Ubuntu environment

How to compile and install xdebug in Ubuntu environment

This article describes how to compile and install xdebug in Ubuntu environment. Share with you for your reference, the details are as follows:

We have previously introduced how to compile and install PHP and Nginx in Ubuntu. Here we will explain how to compile and install xdebug from source code.

Download and unzip xdebug

xdebug download address: https://xdebug.org/download.php

I downloaded 2.3.3. Actually, I don’t know the difference between these versions, so I just downloaded one at random.

cd /usr/local/src
wget https://xdebug.org/files/xdebug-2.3.3.tgz
tar -zxvf xdebug-2.3.3.tgz

Compile and install xdebug

PHP is installed in 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-config
make && make install

After successful installation, the following information will be displayed:

Installing shared extensions:
/opt/php/lib/php/extensions/no-debug-non-zts-20131226/

Configure php.ini

We add the xdebug extension at the end of php.ini:

zend_extension=/opt/php/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so

Restart nginx to take effect.

If you can't 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 unzipped php source code.

I hope this article will help you configure your Ubuntu environment.

You may also be interested in:
  • Building a PHP development environment under Ubuntu (nginx+(cgi)php5fpm+memcached+xdebug)
  • Detailed installation and configuration of Xdebug, a PHP code debugging tool in Windows and Linux
  • CentOS installation PHP5.5+Redis+XDebug+Nginx+MySQL full record
  • Detailed installation and use of php Xdebug
  • Detailed explanation of PHP plug-in installation and Xdebug configuration in Eclipse
  • Installation and use of php Xdebug debugging extension.
  • How to install the debugging tool Xdebug extension in PHP 7
  • Detailed steps for installing xdebug in PHP/installing pear in PHP/phpunit (picture)
  • Install PHP Xdebug on Mac

<<:  MySQL 8.0.12 Simple Installation Tutorial

>>:  Vue.js cloud storage realizes image upload function

Recommend

Detailed explanation of Javascript event capture and bubbling methods

Table of contents 1. Event Processing Model 1. Ev...

JavaScript common statements loop, judgment, string to number

Table of contents 1. switch 2. While Loop 3. Do/W...

Docker case analysis: Building a MySQL database service

Table of contents 1 Create configuration and data...

Solve the problem of docker's tls (ssl) certificate expiration

Problem phenomenon: [root@localhost ~]# docker im...

How to use Linux paste command

01. Command Overview The paste command will merge...

A universal nginx interface to implement reverse proxy configuration

1. What is a proxy server? Proxy server, when the...

Docker Machine in-depth explanation

Differences between Docker and Docker Machine Doc...

How to calculate the value of ken_len in MySQL query plan

The meaning of key_len In MySQL, you can use expl...

Detailed explanation of the use of Vue.js draggable text box component

Table of contents Registering Components Adding C...

JS implements a detailed plan for the smooth version of the progress bar

The progress bar is not smooth I believe that mos...

Detailed explanation of Linux system directories sys, tmp, usr, var!

The growth path from a Linux novice to a Linux ma...