PHP 安装使用 gearman

1、安装服务器端:
官方下载,请到https://launchpad.net/gearmand。

yum install boost-devel* gperf* libevent-devel* libuuid-devel
wget https://launchpad.net/gearmand/1.2/1.1.2/+download/gearmand-1.1.2.tar.gz
tar zxvf gearmand…
cd gearmand …
./configure (如果需要指定安装目录:--prefix=/usr/local/gearmand)
make && make install

2、安装gearman的php扩展
下载扩展程序:http://pecl.php.net/package/gearman

wget http://pecl.php.net/get/gearman-1.1.2.tgz
tar zxvf gearman-1….
cd gearman-1 …
phpize
./configure –with-php-config=/usr/local/php/bin/php-config --with-gearman=/usr/local/gearmand/
make && make install

3、如果制定了gearmand的安装目录,n那么开启守护是这样的, /usr/local/gearmand/sbin/gearmand -L 127.0.0.1 -u root -p 4730 -d,前面的路径就是安装路径

 

posted @ 2017-01-16 14:31  添天灯  阅读(462)  评论(0编辑  收藏  举报