centos6.5 安装gearman和php扩展


1、下载 Gearman 安装软件
https://launchpad.net/gearmand

2、升级或安装相关软件
yum install boost  boost-devel -y
boost 的版本必须大于 1.39 

3、解压和安装
tar zxvf gearmand-1.1.4.tar.gz
cd gearmand-1.1.4
./configure --prefix=/usr/local/gearmand --with-boost=/usr/local/boost
make 
make install

4、启动Gearman
/usr/local/gearmand/sbin/gearmand -d -u root -l /usr/local/gearmand/data/gearmand.log -P /usr/local/gearmand/data/gearmand.pid

5、把Gearman 加到 机器重启程序也启动
打开 /etc/rc.local  文件
添加 :

/usr/local/gearmand/sbin/gearmand -d -u root -l /usr/local/gearmand/data/gearmand.log -P /usr/local/gearmand/data/gearmand.pid

下载安装php扩展

1、下载PHP Gearman的扩展

http://pecl.php.net/get/gearman-1.1.1.tgz

2、解压和安装
tar zxvf gearman-1.1.1.tgz
cd gearman-1.1.1
/usr/local/php/bin/phpize
./configure –with-gearman=/usr/local/gearmand/ –with-php-config=/usr/local/php/bin/php-config
make
make install

3、打开 php.ini  添加如下一行

extension=gearman.so

4、查看PHP是否安装上了 Gearman 模块


转载自http://luhuang.sinaapp.com/linux-php-gearman/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值