Skip to content

Instantly share code, notes, and snippets.

@BlakeGardner
Last active April 25, 2017 07:03
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BlakeGardner/5988163 to your computer and use it in GitHub Desktop.
Save BlakeGardner/5988163 to your computer and use it in GitHub Desktop.
How to compile and install the Gearman PECL extension on CentOS release 5.9
# Install IUS and EPEL yum repos
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/epel-release-5-4.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/ius-release-1.0-11.ius.centos5.noarch.rpm
rpm -i ius-release-1.0-11.ius.centos5.noarch.rpm epel-release-5-4.noarch.rpm
# make sure your system is up to date for good measure
yum update
# Install the required packages
yum install libgearman-devel php53u-devel gcc
# download gearman
wget http://pecl.php.net/get/gearman-0.8.0.tgz
# extract the archive
tar -xvf gearman-0.8.0.tgz
# compile gearman
cd gearman-0.8.0
export GEARMAN_LIB_DIR=/usr/include/libgearman
export GEARMAN_INC_DIR=/usr/include/libgearman
phpize
./configure
make
make test
make install
# create the file configuration file
touch /etc/php.d/gearman.ini
# add the following line to the configuration file
# extension=gearman.so
# restart apache
service httpd restart
# verify the installation by viewing a phpinfo page or just via the command line.
# You will see "gearman" in the list
php -m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment