php7 安装rabbitmq 扩展 amqp扩展

# 安装rabbitmq-c ( 最好下载 0.5的,0.6安装可能会报错)

# 版本下载:https://github.com/alanxz/rabbitmq-c/releases/tag/v0.5.0

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.8.0.tgz
tar -zxvf amqp-1.8.0.tgz
cd amqp-1.8.0
/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

原文地址:https://www.cnblogs.com/lgj8/p/14024199.html