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

 

posted @ 2023-08-25 17:08  童年的回忆  阅读(74)  评论(0编辑  收藏  举报
如果本博客解决了您的问题,可以微信支付宝打赏鼓励一下作者哦,在此表示感谢