【转】Gearman php extension on ubuntu

http://con.cept.me/blog/post/7/install-gearman-php-extension-on-ubuntu

Gearman is a really cool job queue to deal with processes that are too heavy to be done on only one server. By default the php extension for Gearman will not compile on Ubuntu 10.10 here is how to get it working.

Let's get pecl


1
sudo apt-get install php-pear

We need the php dev package to compile extensions


1
sudo apt-get install php5-dev

Now we need to open the backports to get the latest version


1
sudo nano /etc/apt/sources .list

Uncomment the following 2 lines


1
2
deb http://nl.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse

Install gearman


1
sudo apt-get install gearman libgearman-dev gearman-tools uuid-dev

Install the php extension


1
sudo pecl install channel: //pecl .php.net /gearman-0 .7.0

Create the ini file for php extension

1
sudo nano /etc/php5/conf .d /gearman .ini

Add the extension file in it.

1
2
;Gearman extension
extension=gearman.so

Now check to see if it's installed

1
php -m | grep gearman

猜你喜欢

转载自yexingren23.iteye.com/blog/1474607