安装php的rabbitmq扩展amqp

2012-7-19 foooy

1、在https://github.com/alanxz/rabbitmq-c下载rabbitmq-c

https://github.com/alanxz/rabbitmq-c/releases/download/v0.5.0/rabbitmq-c-0.5.0.tar.gz
tar zxvf rabbitmq-c-0.5.0.tar.gz
cd rabbitmq-c-0.5.0
下载https://github.com/rabbitmq/rabbitmq-codegen
wget https://github.com/rabbitmq/rabbitmq-codegen/archive/rabbitmq_v3_3_3.tar.gz    #就下载到上面rabbitmq-c-0.5.0目录里面
tar zxvf rabbitmq_v3_3_3.tar.gz
mv rabbitmq-codegen-rabbitmq_v3_3_3 codegen

# 配置、编译、安装
autoreconf -i
./configure
make
make install


3、安装安装php的amqp扩展:

wget https://pecl.php.net/get/amqp-1.4.0.tgz
tar -zxvf amqp-1.4.0.tgz
cd amqp-1.4.0
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp
make
make install
vim /usr/local/php/etc/php.ini
添加 extension = "amqp.so"
重启php即可


标签: linux centos 消息队列 rabbitmq amqp

发表评论:

Powered by emlog 鄂ICP备14000186号-1 sitemap