cd /tmp
wget http://pecl.php.net/get/gearman-0.7.0.tgz
tar xzf gearman-0.7.0.tgz
cd gearman-0.7.0
Before installing the Gearman PHP extension you need to install the autoconf package first. Here is how you do it on Debian Linux.
apt-get install autoconf
After installing autoconf, run the following commands to configure, compile, test, and install Gearman PHP extension on your Debian Linux machine.
# in the gearman PECL extension directory
phpize;
./configure –with-gearman=/opt/gearman/;
apt-get install libgearman-dev; # if error
make ;
make install;
extension installed to /user/bin/php5/
Add extension to /etc/php5/cli/php.ini
extension=gearman.so
Try gearman worker & client: gearman example