Home  >  Article  >  Backend Development  >  php 安装amqp通讯 扩展

php 安装amqp通讯 扩展

WBOY
WBOYOriginal
2016-06-20 12:41:19975browse

需要用到的 安装包 请到我的百度云自行下载
http://pan.baidu.com/s/1qXgFVNQ

安装php的amqp (rabbitmq) 扩展 需要先安装 rabbitmq-c

安装rabbitmq-c-0.4.1
tar zxvf rabbitmq-c-0.4.1.tar.gz
cd rabbitmq-c-0.4.1
./configure --prefix=/usr/local/rabbitmq-c-0.4.1

安装php amqp 扩展
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 --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.4.1/
make && make install

vim /usr/local/php/etc/php.ini

输入
      extension=amqp.so

重启 nginx
重启 php-fpm

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn