How to Install Gearman on Ubuntu 14.04

Similar to our guide on installing Gearman on Ubuntu 12.04, this guide will get you all set up and running with Gearman on Ubuntu 14.04.

In case you don’t know, Gearman is a task runner and a job server that allows you to parallelize tasks easily and run different workers in different languages smoothly.

Below we will describe and lay out the necessary steps to getting Gearman installed.

Step 1: Install Software-Properties-Common and the Gearman PPA

In Ubuntu 14.04, python-software-properties were replaced by software-properties-common. We will go ahead and install this along with a useful Gearman PPA.

Step 2: Install the Gearman Job Server & Dev Tools, & Perform Upgrade

Next, we install the job server and the tools for Gearman. Once again, the beauty of the apt-get command makes this painless and easy.

Step 3: Install PECL & Use It to Install Gearman (CLI, Client, Worker)

Now, in case you don’t have it, we need to install PECL and then use it to install Gearman.

Step 4: Update Our php.ini (CLI and Server) to Use Gearman

The last step is to let PHP know to use the extension when it runs. There are two php.ini files that generally need to be updated. The first is the CLI version and the other is the Apache version.

For the CLI php.ini (/etc/php5/cli/php.ini)

Open your php.ini in your favorite text editor.

Add the following line in the “Dynamic Extensions” section of your php.ini.

For the Apache-based php.ini (/etc/php5/apache2/php.ini)

Open your php.ini in your favorite text editor. Please note this is a different file than the one we just covered.

Add the “Dynamic Extension” again in this file.

Restart Apache:

Step 5: Try the Examples

Gearman also offers examples you can use to test and verify your Gearman installation.


That was easy, huh?! If you have any problems or any additions, subtractions, or modifications, please let us know in the comments below.

Ryan Frankel

Ryan Frankel has been a professional in the tech industry for more than 10 years and has been developing websites for more than 15. With his background in integrated circuit design and digital signal processing, he has a fundamental understanding of hardware systems and the software that runs them. Ryan now sits as the CTO of Digital Brands Inc. and manages all of the server infrastructure of their websites, as well as their development team. In addition, Ryan has a passion for guitars, good coffee, and puppies.