Main menu

Installing Gearman for PHP and Ubuntu

I've been using Gearman lately in a project that I'm working on, and of course a month later when I came to deploy the code, I had to look up all over again what was required for a gearman server in order to put it on the new platform. Here is the short version for my future reference (and yours, if you like)

Ubuntu Packages

If you're not on ubuntu then hopefully you can adapt this information for your system, add a comment if you do! For ubuntu I simply needed:

sudo aptitude install gearman-job-server gearman-dev

There should be a running task which is /usr/sbin/gearmand, this listens on port 4730 of localhost by default.

PECL Package

The gearman package in pecl is still in beta (I have no idea why, the documentation seems thin but it does work fine for me), so to install it I had to do:

sudo pecl install gearman-beta

(on Ubuntu 10.10 this worked flawlessly, but there are known issues on earlier versions where make fails due to an old version of libgearman - see the pecl bug for more information)

At this point, everything is set up and I could start using Gearman - I will write more about my experiences as I have them.

I've introduced Gearman into a project I'm working on, and since a few people have asked I thought I'd share my experiences. Basically, this application generates some PDFs from a variety of data sources, makes images, and emails it. Since the whole dat

If anyone is trying to install the pecl php extension and getting error like "can't read /usr/lib/libuuid.la: No such file or directory
libtool: link: `/usr/lib/libuuid.la' is not a valid libtool archive" refer to this: http://mgribov.blogspot.com/2010/05/gearman-pecl-package-on-ubuntu-lucid.html
Open /usr/lib/libgearman.la as root, and find a line that says:
dependency_libs=' -L/usr/lib /usr/lib/libuuid.la'

Replace it with:
dependency_libs=' -L/usr/lib -luuid'

if dependency_libs=' -L/usr/lib /usr/lib/libuuid.la' is not found, simply add
dependency_libs=' -L/usr/lib -luuid' to the end of the file