You are reading the documentation for Statusengine 3.x - Switch to Version 2.x for old stable

Install PHP-Gearman yourself

Use APT on Ubuntu

Ubuntu 14.04 (Trusty)

apt-get install php5-gearman

Ubuntu 18.04 (Bionic)

apt-get install php-gearman

Ubuntu 16.04 (Xenial)

Unfortunately the php-gearman extension is missing in Ubuntu 16.04.

You can use the version for Debian Stretch on Ubuntu as well without any issues.

I have tested it with the file php-gearman_2.0.2+1.1.2-1_amd64.deb which is the reason why I am mirroring this file! (License: PHP-3.01)

I am not the author of the Debian Package! This is Ondřej Surý <ondrej@debian.org>. I did not modified the package!

If you don't trust me, you can also download this file from the official Debian Mirrors https://packages.debian.org/stretch/php-gearman

Checksums to verify what you have downloaded:

md5: cae789a6163171ef4b25a2535d5901fd
sha1: 67b9530cf1276a9140605c9f8b05b605fdd4d9f1
sha256: 13440a0b6dac41dfc3269087e177e96fd53393cd3807e92e75dc7de2f20b6932
sha384: 114ac173253b94bd79355c5ce244ea80bbd168d5b37c9c2918336a4f3959a5d943f981847ea5a006c8a28191e82303db

Install the debian file

wget https://statusengine.org/uploads/php-gearman_2.0.2+1.1.2-1_amd64.deb
dpkg -i php-gearman_2.0.2+1.1.2-1_amd64.deb

This will throw an error and complain about missing dependencies. You can simply resolve this by running:

apt-get install -f

Now the extension is installed and loaded. You can check this using the following command:

root@xenial:~# php -m | grep gearman
gearman

Compile it yourself

Fair warning

Compiling software yourself may be fail. If possible always use the packages from your distribution

apt-get install git libgearman-dev php-dev
git clone https://github.com/wcgallego/pecl-gearman.git
cd pecl-gearman/
phpize
./configure
make
make install
echo "extension=gearman.so" > /etc/php/7.0/mods-available/gearman.ini
phpenmod -s ALL gearman

Now the extension is installed and loaded. You can check this using the following command:

root@xenial:~# php -m | grep gearman
gearman