RPM Build: Gearman-0.14 for CentOS-5.5



Introduction

I was recently tasked with working on getting PHP 5.3 installed with Gearman on CentOS 5.5. I've learned quite a few of the pains of working with RPMs and have reminded myself why I don't work with RHEL on a regular basis (for personal items anyway). I have had some success in getting everything working correctly and the following is the quick easy way to get this done on an x86_64 CentOS 5.5 install (although other RHELs should work as well).

Step 1: Upgrade PHP

First, we need to upgrade PHP from the IUS Community Repository. Once you have the EPEL and IUS repositories installed and working, you simply run these commands:

yum remove php
yum install php53

If the second yum command complains, simply remove all php packages installed (i.e. rpm -qa | grep ^php) and install the corresponding php53 packages.

Step 2: Install Gearman

I recompiled the Fedora source RPMs (with a slightly modified spec file) to get Gearman to play nicely with the CentOS 5.5 environment. These RPMs are available in RHELL. Install these RPMs and you'll have the gearman installation required to install the PHP bindings for Gearman.

If you have any issues, please let me, Alex Brandt, know.

Step 3: Install PHP's Gearman Bindings

The easiest part of this ordeal is to simply install the PECL package for the PHP Gearman bindings:

pear install channel://pecl.php.net/gearman-0.7.0

Conclusion

If you must use RHEL, this guide should help you get gearman running with PHP.

Comments


Comments powered by Disqus