Wednesday, December 14, 2011

Installing Gearman on Ubuntu 10.04

This is a quick guide on how to install Gearman on Ubuntu 10.04 LTS.

I found numerous guides online, but none of them seems to do the complete trick for me. I know most installations are different from each other, so that is probably the reason why non of them worked on my setup. So here is my addition to the list of Gearman install guides.

  1. The first thing you need to do is to find a PPA repository with an updated version of Gearman. The one bundled in Ubuntu by default is very old. The only reasonable up to date repository I could find is

    https://launchpad.net/~gearman-developers/+archive/ppa

  2. If you do not have the add-apt-repository command installed, you have to install it

    $ sudo apt-get install python-software-properties

  3. Now you can add the repository by issuing the following command

    $ sudo add-apt-repository ppa:gearman-developers/ppa

  4. After adding the repository, you should update the package list

    $ sudo apt-get update

  5. Now you can install the latest version of Gearman

    $ sudo apt-get install gearman gearman-job-server gearman-tools libgearman4 libgearman-dev

    Please note that as of December 2011 the latest update to the repository was in May 2011 with Gearman version 0.14.
  6. You are now free to install Gearman extension to whatever language  you like. Most requirements should be covered by the above mentioned packages.
    You can start the Gearman job server by the following comand

    $ gearman -d
References