Centos6.5安装rabbitmq的php扩展

1、wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.4.1/rabbitmq-c-0.4.1.tar.gz

2、tar zxvf rabbitmq-c-0.4.1.tar.gz

3、wget http://pecl.php.net/get/amqp-1.2.0.tgz

4、tar zxvf amqp-1.2.0.tgz

5、cd rabbitmq-c-0.4.1

6、./configure --prefix=/usr/local/rabbitmq-c-0.4.1

7、make && make install

8、cd amqp-1.2.0

9、phpize

10、如果没有phpize,安装:yum install php-devel

11、./configure --with-php-config=/usr/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.4.1/

12、make && make install

13、vi /etc/php.ini

14、[rabbitmq]

       extension=amqp.so

15、service httpd restart

16、开启rabbitmq

       service rabbitmq-server start

你可能感兴趣的:(rabbitmq)