First we need to download latest release of gearmand server at the gearman homepage.
#!/bin/bash
apt-get install libevent-dev uuid-dev build-essential g++
wget http://launchpad.net/gearmand/trunk/0.14/+download/gearmand-0.14.tar.gz
tar xvzf gearmand-0.14.tar.gz
cd gearmand-0.14
./configure
make
make install
ldconfig |
At configure i ran in some errors. Many of them you can find at Problems on installing Gearmand.
Before we can use the gearmand Server we must install a client extension which can communicate with the server. For gearman existing some Client libraries in serveral languages. You can get a list from the download link above. In my case I use of course the php extension. Installation Instructions can be found here:
Setting up an Gearman Client on php5 as Extension
After you had sucessfully installed the Gearmand Server you can start it with following command:
First determine that your system has the phpize command. The base php5 package of Debian does not include phpize. You can install that with following command:
gearclient1:~# apt-get install php5-dev |
Before you can start you must install the gearmen libraries from the post Setting up an Gearman Cluster on Debian.
Now you can download the libraries from PECL.
#!/bin/bash
wget http://pecl.php.net/get/gearman-0.7.0.tgz
tar xvzf gearman-0.7.0.tgz
cd gearman-0.7.0
phpize
./configure
make
make install |
Now add the extension tou your php.ini and restart your Apache.
gearclient1:~# /etc/init.d/apache2 restart |
After this you should see another position in phpinfo. At CLI run the following command:
gearclient1:~# php -i | grep gearman
gearman
gearman support => enabled
libgearman version => 0.14 |
On executing ./configure i get the following error:
configure: error: No working C++ Compiler has been found. gearmand requires a C+
The Solution is to install following Packages:
gearserver:~# apt-get install build-essential g++ |
No the Installation work fine.
Starting the Gearman Daemon
At command gearman I became the next error:
error while loading shared libraries: libgearman.so.4:
Google tolds me the solution: