Install PHP XDebug via Pecl
Even though you may find xdebug in a yum repository, due to version incompatibilities you may need to compile/install it using Pecl. Following are several easy steps to achieve exactly that:
> pecl install xdebug
check the output of the command above, if everything went well, you should see something like :\
Installing '/usr/lib64/php/modules/xdebug.so' install ok: channel://pecl.php.net/xdebug-2.0.5
at the end of the output. Note the location of the .so file and using it create /etc/php.d/xdebug.ini file that rads something like:
; Enable xdebug zend_extension="/usr/lib64/php/modules/xdebug.so"
If you want to use xdebug for profiling you can also add configuration like:\
; profiler settings xdebug.profiler_append=1 xdebug.profiler_enable=0 xdebug.profiler_enable_trigger=1 xdebug.profiler_output_name = cachegrind.out.%s xdebug.profiler_output_dir=/xdebug/
Whenever you want to run profiler, you can change xdebug.profiler_enable to one, but be careful not to forget it on, when you are not profiling since it will cause each page load to produce megabytes worth of debug output file.
Please also note that for profiler to run properly /xdebug/ folder must exist and be writable by Apache process.
Once you are done with the installation, restart Apache and check the PHP module list with: "php -m", you should see "xdebug" appear in the list.