Install Gearman Ubuntu 14 04

How to Install Gearman on Ubuntu 14.04

Written by: Ryan Frankel

Ryan Frankel

Ryan began developing websites in the late '90s and has personally tested just about every web host and cloud platform worth trying on the market today. With a masters degree in electrical and computer engineering from the University of Florida, he leverages his extensive knowledge of hardware, software, and their engineering relationship to inform HostingAdvice readers of the technical implications of their hosting choices. Ryan's subject matter expertise includes, but is not limited to, WordPress, cloud infrastructure management, product UI/UX design, and popular web development languages such as JavaScript and PHP.

See full bio »

Edited by: Lillian Castro

Lillian Castro

Lillian brings more than 30 years of editing and journalism experience to our team. She has written and edited for major news organizations, including The Atlanta Journal-Constitution and the New York Times, and she previously served as an adjunct instructor at the University of Florida. Today, she edits HostingAdvice content for clarity, accuracy, and reader engagement.

See full bio »

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.

sudo apt-get install software-properties-common  sudo add-apt-repository ppa:gearman-developers/ppa  sudo apt-get update

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.

sudo apt-get install gearman-job-server libgearman-dev  sudo apt-get upgrade

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.

sudo apt-get install php-pear  sudo apt-get install php5-dev  sudo pecl 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 gearman.so 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.

sudo vim /etc/php5/cli/php.ini

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

extension=gearman.so

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.

sudo vim /etc/php5/apache2/php.ini

Add the “Dynamic Extension” again in this file.

extension=gearman.so

Restart Apache:

sudo service apache2 restart

Step 5: Try the Examples

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

Conclusion

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

Advertiser Disclosure

HostingAdvice.com is a free online resource that offers valuable content and comparison services to users. To keep this resource 100% free, we receive compensation from many of the offers listed on the site. Along with key review factors, this compensation may impact how and where products appear across the site (including, for example, the order in which they appear). HostingAdvice.com does not include the entire universe of available offers. Editorial opinions expressed on the site are strictly our own and are not provided, endorsed, or approved by advertisers.

Our Editorial Review Policy

Our site is committed to publishing independent, accurate content guided by strict editorial guidelines. Before articles and reviews are published on our site, they undergo a thorough review process performed by a team of independent editors and subject-matter experts to ensure the content’s accuracy, timeliness, and impartiality. Our editorial team is separate and independent of our site’s advertisers, and the opinions they express on our site are their own. To read more about our team members and their editorial backgrounds, please visit our site’s About page.

ABOUT THE AUTHOR

Ryan Frankel has been a professional in the tech industry for more than 20 years and has been developing websites for more than 25. With a master's degree in electrical and computer engineering from the University of Florida, 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.

« BACK TO: HOW-TO
Follow the Experts
We Know Hosting

$

4

8

,

2

8

3

spent annually on web hosting!

Hosting How-To Guides