centos7下为php添加amqp扩展
//安装amqp-c wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gz tar -zxvf rabbitmq-c-0.8.0.tar.gz cd rabbitmq-c-0.8.0 ./configure --prefix=/usr/local/rabbitmq-c make && make install
//安装amqp扩展 yum install epel-release yum install autoconf gcc gcc-c++ librabbitmq librabbitmq-devel wget https://pecl.php.net/get/amqp-1.9.4.tgz tar xf amqp-1.9.4.tgz cd amqp-1.9.4 phpize ./configure --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c --with-php-config=/usr/local/php/bin/php-config make && make install
vim /www/server/php/74/etc/php.ini 追加
extension = /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/amqp.so
extension = /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/amqp.so