php rabbitmq的扩展
1.下载:https://github.com/alanxz/rabbitmq-c/archive/v0.9.0.tar.gz
mkdir build && cd build # 这一步是在rabbitmq-c的根目录下创建一个build子目录
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/librabbitmq .. # 这一步是让cmake根据../CMakeList.txt,即rabbitmq-c的根目录下的CMakeList.txt创建Makefile文件,Makefile文件会被创建到build目录中
cmake --build . # 这一步是真正的build rabbitmq-c库的,注意,不要漏掉结尾的点 '.' make make install 错误:
/usr/local/src/rabbitmq-c-0.9.0/tools/publish.c:87:23: note: each undeclared identifier is reported only once for each function it appears in
gmake[2]: *** [tools/CMakeFiles/amqp-publish.dir/publish.c.o] Error 1
gmake[1]: *** [tools/CMakeFiles/amqp-publish.dir/all] Error 2
gmake: *** [all] Error 2
解决:yum -y install popt popt-devel # 还是不成功
http://freshmeat.sourceforge.net/projects/popt,源码安装 ok
2.下载php 扩展
http://pecl.php.net/get/amqp-1.9.0.tgz
tar zvxf amqp-1.9..tgz #解压
cd amqp-1.9. #打开目录
/usr/bin/phpize
./configure --with-php-config=/usr/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/librabbitmq make
make install
报错:
/usr/bin/ld: cannot find -lrabbitmq
collect2: error: ld returned exit status
make: *** [amqp.la] Error 1
解决:yum install librabbitmq-devel
php -i |grep php.ini
extension=amqp.so #extension_dir自己定义
service php-fpm restart #重启
参考资料:https://www.cnblogs.com/spectrelb/p/6856246.html
https://www.jianshu.com/p/65490900a937
php rabbitmq的扩展的更多相关文章
- RabbitMQ PHP扩展安装
RabbitMQ PHP扩展安装 # 安装rabbitmq-c依赖包 yum install libtool autoconf # 安装rabbitmq-c ( 最好下载 0.5的,0.6安装可能会报 ...
- RabbitMQ学习之(三)_Centos6下RabbitMQ PHP扩展的安装
安装rabbitmq-c依赖包 yum install libtool autoconf 下载安装rabbitmq-c wget https://github.com/alanxz/rabbitmq- ...
- rabbitmq php扩展amqp安装
configure: error: Please reinstall the librabbitmq distribution itself or (re)install librabbitmq de ...
- RabbitMQ+PHP 消息队列环境配置
参考文档:http://www.cnblogs.com/phpinfo/p/4104551...http://blog.csdn.net/historyasamirror/ar... 依赖包安装 yu ...
- RabbitMQ 入门【精+转】
rabbitmq可以用一本书取讲,这里只是介绍一些使用过程中,常用到的基本的知识点.官方文档覆盖的内容,非常全面:http://www.rabbitmq.com/documentation.html ...
- RabbitMQ 声明队列时候的参数解释
参考链接:http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v3.6.6/rabbitmq-dotnet-client-3.6.6-cli ...
- 【消息队列】RabbitMQ+PHP实现
本文链接:http://www.cnblogs.com/aiweixiao/p/7374249.html 文档提纲: 扫描关注微信公众号 1.[下载和安装] 1)gitHub下载地址: https:/ ...
- RabbitMQ快速入门
最近一段项目实践中大量使用了基于RabbitMQ的消息中间件,也积累的一些经验和思考,特此成文,望大家不吝赐教. 本文包括RabbitMQ基本概念.进阶概念.实践与思考等三部分,着重强调相关概念和基于 ...
- RabbitMq install on Centos
安装服务(root) erlang官方安装说明:https://www.erlang-solutions.com/resources/download.html step 1: 安装erlang的yu ...
随机推荐
- activity 与 service 之间的通信
activity和service通信:通过binder 举个我实际项目中的例子:在service中下载更新应用 首先是下载更新apk的service: public class UpdateVersi ...
- 交互式shell脚本对话框----whiptail指令
当你在linux环境下setup软件的时候就会有相应的对话框让你输入.虽然我们已经习惯了这种交互的方法,但是如果有一种直观的界面来输入是不是会更加友好和方便呢,在shell脚本中你可以使用-whipt ...
- python 中的os模块
python os模块 Python os 模块提供了一个统一的操作系统接口函数 一.对于系统的操作 1.os.name 当前使用平台 其中 ‘nt’ 是 windows,’posix’ 是lin ...
- python基础-异常(exception)处理
python基础-异常(exception)处理 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 程序中难免出现错误,而错误分成两种,即语法错误和逻辑错误.语法错误根本过不了pyth ...
- JS获取当前时间并格式化"yyyy-MM-dd HH:mm:ss"
先来看下JS中的日期操作: var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年 ...
- CSS3 box-sizing:border-box的好处
无论如何改动border,margin与padding的值,都不会导致box总尺寸发生变化.
- Spark记录-Scala基础语法
如果您熟悉Java语言语法和编程,那么学习Scala将会很容易.Scala和Java之间最大的句法差异在于行结束字符的分号(;) 是可选的. 当编写Scala程序时,它可以被定义为通过调用彼此的方法进 ...
- linux缓存手动清理
一般情况下不建议这么做, 如果你确定向的话还是可以的首先运行sync把未存盘的cache都写入磁盘,稍等片刻, 或者是直接运行sync 两遍 然后echo 1 试试应该大部分缓存可以释放 释放ca ...
- 戴尔PowerEdge R430 机架式服务器 安装ubuntu server 14.04.1 LTS 64 位
硬件配置: 服务编号:5Z04X72 软件配置 1.Ubuntu 系统下载地址: https://certification.ubuntu.com/certification/hardware/201 ...
- android edittext 获取焦点并弹出软键盘
editText.setFocusable(true); editText.setFocusableInTouchMode(true); editText.requestFocus(); activi ...