Skip to content

Instantly share code, notes, and snippets.

@hieubuiduc
Created December 12, 2015 17:42
Show Gist options
  • Save hieubuiduc/105989131e1192e0d680 to your computer and use it in GitHub Desktop.
Save hieubuiduc/105989131e1192e0d680 to your computer and use it in GitHub Desktop.
Install Gearman PHP extension on CentOS 6,7
#!/bin/sh
# Auto update
yum update
# Install the required packages
yum install libgearman-devel gcc
# Install php
yum -y install php php-pear php-mysql php-mcrypt php-mbstring
# Install php-devel dependency via yum
yum -y install php-devel
# Get the latest stable build from Gearman PECL extension page.
# The current stable release is version 1.1.2
wget http://pecl.php.net/get/gearman-1.1.2.tgz
tar -xzvf gearman-1.1.2.tgz
cd gearman-1.1.2
# Now phpize and complie it:
phpize
./configure
make
make install
# You will finally see something like this:
# Installing shared extensions: /usr/lib64/php/modules/
# Update PHP.INI file:
# The following line will need to be added to all php.ini files, usually located in /etc/php*.
# extension=”gearman.so”
# Or create the file configuration file
touch /etc/php.d/gearman.ini
echo 'extension=gearman.so' >> /etc/php.d/gearman.ini
# Verify the installation by viewing a phpinfo page or just via the command line.
# You will see "gearman" in the list
php -m
# Restart php
# service php-fpm restart
# Now restart the web server and you’re good to go:
# service nginx restart
@sumonst21
Copy link

sumonst21 commented Aug 11, 2020

What about sudo yum install php71-php-pecl-gearman

Thank you very much 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment