有史以来最坑爹的一次扩展安装,不晓得诸位有没有尝试过…………各种报错啊!有木有?!¥#@%%&*……
捣鼓半天,只编译了个0.1.x的扩展版本,瞅了下,擦,函数少的可怜啊- -|||
不行,继续~
经过一天的努力,老天总算开眼了,赶紧总结下吧~
----------------------------------------------- 我是分割线 ---------------------------------------------------
AMQP——高级消息队列协议,目前比较有名气的实现大概就是大名鼎鼎的RabbitMQ了。
(不了解的童鞋先看下我这篇转载吧:《[RabbitMQ+Python入门经典] 兔子和兔子窝》)
PHP扩展当然还是官方推荐的好了。OK,就它了 http://php.net/manual/en/book.amqp.php
To install the AMQP PHP extension, you must first install the » librabbitmq library. You will need the 0-9-1 version of the rabbitmq-c client library, linked to the rabbitmq-codegen version that corresponds to the version of the broker you are using. Use the following steps to download and install the library:
# Download the rabbitmq-c library @ version 0-9-1
hg clone http://hg.rabbitmq.com/rabbitmq-c/rev/b01825ecc112 rabbitmq-c
cd rabbitmq-c
# Add the codegen requirement. To find the full list, go here: http://hg.rabbitmq.com/rabbitmq-codegen/tags
# and copy the URL for the appropriate broker version.
hg clone http://hg.rabbitmq.com/rabbitmq-codegen/rev/16bbcb711380 codegen
# Configure, compile and install
autoreconf -i && ./configure && make && sudo make install
扩展是C写的,由于C与RabbitMQ通信一般需要依赖rabbitmq-c库(也就是librabbitmq),所以编译扩展前需要先装依赖库。好吧,那就按要求装吧~
原文是用hg工具,需要装mercurial(一个轻量级的版本控制系统),这里就不介绍了,我