There is a wizard available that provides you with the correct file to download, and which paths to use.
You compile Xdebug separately from the rest of PHP. Note, however, that you need access to the scripts 'phpize' and 'php-config'. If your system does not have 'phpize' and 'php-config', you will need to compile and install PHP from a source tarball first, as these script are by-products of the PHP compilation and installation processes. (Debian users can install the required tools with apt-get install php5-dev
). It is important that the source version matches the installed version as there are slight, but important, differences between PHP versions. Once you have access to 'phpize' and 'php-config', do the following:
这一步装完,会有提示:
[lein@lein xdebug-2.2.5]$ sudo make install Installing shared extensions: /usr/lib64/php/modules/ +----------------------------------------------------------------------+ | | | 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. | | | +----------------------------------------------------------------------+ [lein@lein xdebug-2.2.5]$ ll /usr/lib64/php/modules/ total 10988 -rwxr-xr-x. 1 root root 32568 Jan 22 17:09 bcmath.so -rwxr-xr-x. 1 root root 24696 Jan 22 17:09 bz2.so -rwxr-xr-x. 1 root root 33752 Jan 22 17:09 calendar.so -rwxr-xr-x. 1 root root 15568 Jan 22 17:09 ctype.so -rwxr-xr-x. 1 root root 86912 Jan 22 17:09 curl.so -rwxr-xr-x. 1 root root 180608 Jan 22 17:09 dom.so -rwxr-xr-x. 1 root root 65496 Jan 22 17:09 exif.so -rwxr-xr-x. 1 root root 2713344 Jan 22 17:09 fileinfo.so -rwxr-xr-x. 1 root root 53624 Jan 22 17:09 ftp.so -rwxr-xr-x. 1 root root 120896 Jan 22 17:09 gd.so -rwxr-xr-x. 1 root root 15640 Jan 22 17:09 gettext.so -rwxr-xr-x. 1 root root 45080 Jan 22 17:09 iconv.so -rwxr-xr-x. 1 root root 40840 Aug 1 2014 json.so -rwxr-xr-x. 1 root root 1420712 Jan 22 17:09 mbstring.so -rwxr-xr-x. 1 root root 45256 Jan 22 17:09 mcrypt.so -rwxr--r--. 1 root root 329181 Feb 25 23:04 memcached.so -rwxr--r--. 1 root root 288786 Feb 25 23:04 memcache.so -rwxr-xr-x. 1 root root 141320 Jan 22 17:09 mysqlnd_mysqli.so -rwxr-xr-x. 1 root root 53544 Jan 22 17:09 mysqlnd_mysql.so -rwxr-xr-x. 1 root root 2362280 Jan 22 17:09 mysqlnd.so -rwxr-xr-x. 1 root root 32896 Jan 22 17:09 pdo_mysqlnd.so -rwxr-xr-x. 1 root root 116240 Jan 22 17:09 pdo.so -rwxr-xr-x. 1 root root 29168 Jan 22 17:09 pdo_sqlite.so -rwxr-xr-x. 1 root root 271984 Jan 22 17:09 phar.so -rwxr-xr-x. 1 root root 32880 Jan 22 17:09 posix.so -rwxr--r--. 1 root root 1075737 Feb 25 23:04 redis.so -rwxr-xr-x. 1 root root 15624 Jan 22 17:09 shmop.so -rwxr-xr-x. 1 root root 54168 Jan 22 17:09 simplexml.so -rwxr-xr-x. 1 root root 91368 Jan 22 17:09 sockets.so -rwxr-xr-x. 1 root root 51328 Jan 22 17:09 sqlite3.so -rwxr-xr-x. 1 root root 19880 Jan 22 17:09 sysvmsg.so -rwxr-xr-x. 1 root root 11496 Jan 22 17:09 sysvsem.so -rwxr-xr-x. 1 root root 15720 Jan 22 17:09 sysvshm.so -rwxr-xr-x. 1 root root 53896 Jan 22 17:09 tidy.so -rwxr-xr-x. 1 root root 19712 Jan 22 17:09 tokenizer.so -rwxr-xr-x. 1 root root 36720 Jan 22 17:09 wddx.so -rwxr-xr-x 1 root root 925237 Mar 18 23:27 xdebug.so -rwxr-xr-x. 1 root root 32888 Jan 22 17:09 xmlreader.so -rwxr-xr-x. 1 root root 54080 Jan 22 17:09 xml.so -rwxr-xr-x. 1 root root 49152 Jan 22 17:09 xmlwriter.so -rwxr-xr-x. 1 root root 37104 Jan 22 17:09 xsl.so -rwxr-xr-x. 1 root root 62480 Jan 29 2014 zip.so
/wherever/you/put/it/xdebug.so 就是 /usr/lib64/php/modules/xdebug.so