murshed ahmmad khan (usamurai) on May 1st, 2013
  • Sharebar

What is Gearman

Installing Gearman on CentOS 6.2

The latest Gearman version available in the EPEL repository is not always up to date. The latest version of Gearman at this moment is 1.1.6. So, here is the procedure to install the Latest version from source. It’s easy to install but I’ve run into some problems while installing that in an amazon EC2 large instance. So added the troubleshooting parts too.

Install Gearman’s dependencies

Use yum to install the dependencies that Gearman needs:

yum install uuid-devel libuuid libuuid-devel uuid boost-devel libevent libevent-devel

Download the latest gearmand source

Download the latest Gearman version from Launchpad. I’ve picked Gearman 1.1.6

# cd /usr/share/
# wget https://launchpad.net/gearmand/1.2/1.1.6/+download/gearmand-1.1.6.tar.gz

Untar, compile and install

Now unpack it (gearmand version 1.1.6 in this example):

# tar -xvzf gearmand-1.1.6.tar.gz

and then compile and install it:

# cd gearmand-1.1.6

# ./configure && make && make test && make install

That’s all, gearman is installed and ready to use.

Build Troubleshoot:

Unfortunately, for my case it shows couple of errors and then terminated. Here is how I resolved that.

1. While configuring, i’ve got the following error:

checking for the toolset name used by Boost for g++… configure: WARNING: could not figure out which toolset name to use for g++

checking for Boost headers version >= 1.39.0… no
configure: error: cannot find Boost headers version >= 1.39.0

Solution: The reason is either you don’t have the “boost-devel” package installed, but I had already installed it before in the first phase (yum install boost-devel). For my case, it seems that I didn’t install g++ (found in the gcc-c++ package). So Installing the gcc-c++ package fixed the issue. ref: Building Gearman 0.27 on CentOS 6

# yum install gcc-c++

2. Now it proceeds further but throws error while running “make”, while compiling the libhostile.c file:

libhostile/function.c: In function ‘print_function_cache_usage’:
libhostile/function.c:54:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
libhostile/function.c:54:3: note: use option -std=c99 or -std=gnu99 to compile your code
CC libhostile/libhostile_libhostile_la-poll.lo
make[1]: *** [libhostile/libhostile_libhostile_la-function.lo] Error 1
make[1]: *** Waiting for unfinished jobs….
libhostile/poll.c: In function ‘poll’:
libhostile/poll.c:93:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
libhostile/poll.c:93:9: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [libhostile/libhostile_libhostile_la-poll.lo] Error 1
make[1]: Leaving directory `/usr/share/gearmand-1.1.6′
make: *** [all] Error 2

The solution was hard to find, but as it suggests it is failing because the -std=c99 is required. The libhostile C code requires C99. There are some bug reports for this, but forcing the CFLAGS environment variable will fix this.

Solution: Run ./configure –help, you will see a list of configurable variables.

[.. gearmand-1.1.6]# ./configure –help

Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory

I tried to specify gnu99 library,
# CFLAGS=-std=gnu99 ./configure && make && make test && make install

or you can also use c99, and it works:

# CFLAGS=-std=c99 ./configure && make && make test && make install

ref: libpq configuration on ubuntu

3. Finally I ran into the mysql.h header file missing error while in “make”:

libgearman-server/plugins/queue/mysql/queue.cc:49:19: fatal error: mysql.h: No such file or directory
compilation terminated.

Solution: The solution is simple, i had missing “mysql-devel” package. So installing it solves the problem.

# yum install mysql-devel

so now you can run the gearman as below:

# gearmand -d -u root

Next to code Gearman’s client and worker process you need to install Gearman PHP extension. It’s very easy and straightforward, to do so, please follow this link: Installing Gearman PHP extension on CentOS

Reference:
You might also look into this:
1. Installing Gearman on CentOS 6.2
2. Getting started with Gearman
3. Gearman 0.14 on CentOS 5.5 and PHP bindings

Hope that it’ll help someone.

96 Responses to “Install Gearman daemon from source in CentOS”

  1. thanks, that really helps me a lot ~~

  2. A nice and well written article.
    It helped me a lot.

  3. West Ham boss Sam Allardyce ‘I believe that, with no disrespect to Nigel Adkins because he came via a very difficult spell and got Southampton up and out of the relegation zone, you draw on experience. Being in the Premier League for as long as I have with three clubs you already know what to expect. He was just an excited 000000 enthusiast who knew web design and was unaware how protective some forum admins could be, as well as some members who dedicate themselves to simply a single forum. Need

  4. Recently, I been taking photos for them in the form of candids, group photos, and staff headshots. All that media is live now, which means you definitely run across some of my stuff while perusing their site. So spare a thought for the ”common” brushtail possum which is rapidly becoming ”uncommon” in nonurban areas. These are easily made or can be purchased at cost price from wildlife organisations. Cookies have been of concern for Internet privacy, given that they can be used for tracking 0

  5. Bryant had played Clark in junior tournaments about a dozen times, losing just once. After a rough patch late in the first set, she settled down and finished it off.kind of got recorded on myself in the first set, Bryant said. The majority of the front 000000 consists of a Gorilla Glass panel for the display, with touchsensitive areas that expand past the screen for use with the gestures needed to navigate around the user interface. This didn’t take long to master these, and six years on few peo

  6. I have read several just right stuff here. Definitely price bookmarking for revisiting.
    I wonder how a lot attempt you put to create any such excellent informative site.

  7. Greetings I am so glad I found your webpage, I really found you
    by accident, while I was searching on Yahoo for something else, Nonetheless I am here now and would just
    like to say thank you for a tremendous post and a all round thrilling blog (I
    also love the theme/design), I dont have time to read through it all at
    the moment but I have bookmarked it and also added in your
    RSS feeds, so when I have time I will be back to
    read a great deal more, Please do keep up the excellent jo.

  8. Usually posts some really interesting stuff like this. If youre new to this site.

  9. always a significant fan of linking to bloggers that I love but dont get lots of link appreciate from

  10. that is the finish of this article. Here you will find some web pages that we think youll appreciate, just click the hyperlinks over

  11. usually posts some quite exciting stuff like this. If youre new to this site

  12. we like to honor many other net web sites around the web, even when they arent linked to us, by linking to them. Below are some webpages worth checking out

  13. always a significant fan of linking to bloggers that I really like but dont get a lot of link adore from

  14. That is the end of this article. Right here youll locate some web sites that we assume youll enjoy, just click the hyperlinks.

  15. usually posts some really interesting stuff like this. If youre new to this site

  16. usually posts some extremely intriguing stuff like this. If youre new to this site

  17. we like to honor numerous other internet web-sites around the net, even when they arent linked to us, by linking to them. Below are some webpages worth checking out

  18. we prefer to honor quite a few other online web pages around the internet, even if they arent linked to us, by linking to them. Below are some webpages really worth checking out

  19. we prefer to honor several other online websites on the net, even if they arent linked to us, by linking to them. Beneath are some webpages worth checking out

  20. that will be the finish of this report. Right here youll obtain some websites that we feel you will enjoy, just click the links over

  21. that may be the end of this article. Right here you will obtain some internet sites that we think youll enjoy, just click the hyperlinks over

  22. below youll find the link to some websites that we think you should visit

  23. that could be the end of this post. Right here youll obtain some websites that we think youll enjoy, just click the links over

  24. below youll come across the link to some websites that we believe you’ll want to visit

  25. we like to honor many other web web-sites on the internet, even though they arent linked to us, by linking to them. Underneath are some webpages really worth checking out

  26. always a large fan of linking to bloggers that I appreciate but dont get a lot of link enjoy from

  27. that could be the finish of this write-up. Here you will discover some sites that we consider youll enjoy, just click the hyperlinks over

  28. usually posts some very interesting stuff like this. If youre new to this site

  29. that is the end of this report. Right here you will obtain some websites that we feel youll appreciate, just click the links over

  30. below youll discover the link to some websites that we consider you ought to visit

  31. we prefer to honor a lot of other online internet sites around the web, even though they arent linked to us, by linking to them. Below are some webpages really worth checking out

  32. below youll come across the link to some websites that we believe you should visit

  33. below youll obtain the link to some sites that we think you should visit

  34. below youll come across the link to some internet sites that we assume it is best to visit

  35. always a big fan of linking to bloggers that I enjoy but dont get lots of link adore from

  36. below youll uncover the link to some web pages that we believe you’ll want to visit

  37. always a big fan of linking to bloggers that I like but dont get a whole lot of link love from

  38. we like to honor lots of other world-wide-web web pages around the internet, even though they arent linked to us, by linking to them. Underneath are some webpages really worth checking out

  39. always a major fan of linking to bloggers that I adore but dont get a good deal of link really like from

  40. always a massive fan of linking to bloggers that I like but dont get lots of link like from

  41. we prefer to honor numerous other net websites on the net, even though they arent linked to us, by linking to them. Under are some webpages really worth checking out

  42. Usually posts some extremely exciting stuff like this. If youre new to this site.

  43. that may be the end of this report. Here youll obtain some web sites that we feel you will appreciate, just click the hyperlinks over

  44. we prefer to honor many other internet web pages around the web, even when they arent linked to us, by linking to them. Under are some webpages really worth checking out

  45. that would be the end of this report. Right here youll locate some internet sites that we assume youll value, just click the links over

  46. we prefer to honor quite a few other world-wide-web internet sites on the internet, even though they arent linked to us, by linking to them. Beneath are some webpages really worth checking out

  47. below youll come across the link to some websites that we feel it is best to visit

  48. usually posts some incredibly intriguing stuff like this. If youre new to this site

  49. that will be the end of this post. Here you will find some sites that we believe youll enjoy, just click the hyperlinks over

  50. we like to honor numerous other online internet sites on the net, even when they arent linked to us, by linking to them. Below are some webpages really worth checking out

  51. always a significant fan of linking to bloggers that I really like but dont get a good deal of link like from

  52. Below youll uncover the link to some internet sites that we think you must visit.

  53. that is the end of this write-up. Right here youll come across some websites that we feel youll value, just click the links over

  54. We like to honor many other net websites on the web, even if they arent linked to us, by linking to them. Underneath are some webpages worth checking out.

  55. usually posts some pretty intriguing stuff like this. If youre new to this site

  56. below youll locate the link to some websites that we think you need to visit

  57. we like to honor lots of other world wide web internet sites on the internet, even though they arent linked to us, by linking to them. Below are some webpages really worth checking out

  58. below youll uncover the link to some web sites that we believe you need to visit

  59. we like to honor numerous other world wide web web sites around the internet, even when they arent linked to us, by linking to them. Under are some webpages worth checking out

  60. usually posts some pretty interesting stuff like this. If youre new to this site

  61. we like to honor lots of other world wide web sites on the net, even though they arent linked to us, by linking to them. Under are some webpages really worth checking out

  62. We like to honor numerous other world wide web websites on the internet, even though they arent linked to us, by linking to them. Underneath are some webpages worth checking out.

  63. we prefer to honor numerous other web web sites on the internet, even if they arent linked to us, by linking to them. Under are some webpages really worth checking out

  64. below youll obtain the link to some sites that we think you’ll want to visit

  65. always a large fan of linking to bloggers that I like but dont get a great deal of link love from

  66. that may be the end of this post. Right here youll uncover some web sites that we assume you will value, just click the links over

  67. Below youll obtain the link to some internet sites that we feel you must visit.

  68. usually posts some quite interesting stuff like this. If youre new to this site

  69. below youll come across the link to some web-sites that we think you should visit

  70. usually posts some very fascinating stuff like this. If youre new to this site

  71. That may be the finish of this write-up. Here you will uncover some internet sites that we assume youll enjoy, just click the links.

  72. we like to honor many other world wide web internet sites on the internet, even when they arent linked to us, by linking to them. Under are some webpages really worth checking out

  73. Below youll discover the link to some internet sites that we assume you need to visit.

  74. that would be the end of this write-up. Right here you will locate some websites that we think youll appreciate, just click the hyperlinks over

  75. usually posts some pretty fascinating stuff like this. If youre new to this site

  76. below youll obtain the link to some web-sites that we feel you need to visit

  77. below youll uncover the link to some web pages that we assume you’ll want to visit

  78. that may be the finish of this write-up. Right here youll discover some websites that we consider youll appreciate, just click the links over

  79. below youll uncover the link to some websites that we consider you need to visit

  80. we like to honor many other web web pages around the net, even if they arent linked to us, by linking to them. Below are some webpages worth checking out

  81. below youll obtain the link to some web pages that we believe you need to visit

  82. we prefer to honor numerous other online web pages around the web, even if they arent linked to us, by linking to them. Beneath are some webpages really worth checking out

  83. we like to honor many other world wide web internet sites around the internet, even when they arent linked to us, by linking to them. Underneath are some webpages worth checking out

  84. We prefer to honor several other world-wide-web web-sites on the internet, even when they arent linked to us, by linking to them. Beneath are some webpages worth checking out.

  85. we like to honor lots of other net web pages around the internet, even if they arent linked to us, by linking to them. Beneath are some webpages really worth checking out

  86. usually posts some very intriguing stuff like this. If youre new to this site

  87. we like to honor several other internet web-sites on the net, even though they arent linked to us, by linking to them. Under are some webpages really worth checking out

  88. we prefer to honor several other net sites on the net, even if they arent linked to us, by linking to them. Below are some webpages really worth checking out

  89. we like to honor quite a few other net web-sites around the web, even when they arent linked to us, by linking to them. Underneath are some webpages really worth checking out

  90. that will be the finish of this article. Here youll obtain some web pages that we consider youll enjoy, just click the hyperlinks over

Trackbacks/Pingbacks

  1. Install Gearman PHP extension from PECL | exploring the IT underworld
  2. GearmanD | Phil Mellor - PHP Developer
  3. CentOS 上安装Gearman及其PHP扩展 | William Sang
  4. php安装gearman扩展实现异步分步式任务 | 小喵爱你
  5. Install Gearman PHP extension from PECL
  6. CentOS 上安装Gearman及其PHP扩展 – 日入一书

Leave a Reply