安装http://php.net/manual/zh/mongo.installation.php 1步 安装rabbitmq-c
增加一下内容:
wget 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
autoreconf -i
./configure --prefix=/usr/local/rabbitmq-c
make
make install
wget http://pecl.php.net/get/amqp-1.6.1.tgz
tar zxvf amqp-1.6.1.tgz
cd amqp-1.6.1
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c
make
make install
# 编辑php.ini文件,增加amqp扩展支持
vim /usr/local/php/etc/php.ini
# 增加rabbitmq扩展支持
extension=amqp.so