mkdir ~/opt && cd ~/opt wget http://xdebug.org/files/xdebug-2.2.2.tgz tar -xzvf xdebug-2.2.2.tgz && cd xdebug-2.2.2/ phpize auto-apt run ./configure make sudo checkinstall sudo nano /etc/php5/mods-available/xdebug.ini sudo php5enmod xdebug php -i | grep xdebug
Explanation
- Create directory opt inside the home directory and change to created directory. Change directory name and location as needed
- Get the latest version of Xdebug. Adjust URL to point to the latest or desired Xdebug version
- Prepare the build environment for a PHP extension. See phpize manual.
- Use auto-apt just in case there are missing dependencies. Not likely to happen in this case.
- Build extension
- Create and install deb package. For details see Checkinstall wiki.
- The package documentation directory ./doc-pak does not exist.
- Should I create a default set of package docs? [y]:
- Type y
- Please write a description for the package.
- End your description with an empty line or EOF.
- Enter Xdebug 2.2.2 or whatever might be suitable
- This package will be built according to these values:
- Options 0 to 13 listed
- Enter a number to change any of them or press ENTER to continue:
- Make changes as needed
- Create extension configuration file. For details see Xdebug Documentation.
- Enable extension
- Check if extension is installed and configured
Basic extension configuration
zend_extension=/usr/lib/php5/20100525/xdebug.so
Prerequests
See Compiling Software wiki entry. Aside from basics php5-dev package must be installed on the system.
Or you can just use:
ReplyDeletesudo pecl install xdebug
for the same effect.
Case you need to install it on a single machine it does not make a difference. If you have to install it on several machines creating deb package is a way to go no doubt.
Deletezend_extension=/usr/lib/php5/20100525/xdebug.so
ReplyDeletei apply the same steps but i can not find the 20100525 folder for zend_extension ... can u help me ?
Check output of phpize. It should look like:
Delete$ phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Zend Module Api No should correspond to folder name in which xdebug.so is located.
You could also list content of folder /usr/lib/php5 and find desired folder name.
ls /usr/lib/php5
Finally you could use command locate.
locate xdebug.so You might need to run sudo updateddb before running locate command.
This comment has been removed by the author.
ReplyDelete