参考:http://hi.baidu.com/zx68555/item/6b094e8964fe5f18c31627d3
amqp:advanced message queuing protocol
需要安装 amqp的支持依赖
https://github.com/alanxz/rabbitmq-c/tags
我选择:
https://github.com/alanxz/rabbitmq-c/tree/rabbitmq-c-v0.3.0
查找资料,看好多没有成功,只是实验一次;
#rabbitmq-codegen下载:
#https://nodeload.github.com/rabbitmq/rabbitmq-codegen/legacy.tar.gz/master
tar zxvf master
mv rabbitmq-rabbitmq-codegen* codegen
cp codegen/* rabbitmq-c-rabbitmq-v0.3.0/codegen/
cd rabbitmq-c-rabbitmq-v0.3.0/
autoreconf -i
./configure
make
make install
php-amqp最新版,在这里选择:
http://pecl.php.net/package/amqp
tar zxvf amqp-1.0.9.tar.gz
cd amqp-1.0.9
phpize
./configure --with-amqp --with-php-config=/usr/local/php5/bin/php-config
完成后,
在php.ini中添加: extension = amqp.so
php -m |grep amqp 如出现 amqp 扩展,如果报错,再按照提示cp,则安装完毕
phpinfo里面已经有amqp扩展了