Purpose: This extension is used to operate the RABBITMQ server
First, the installation of the overall
1. Compile and install LIBRABBITMQ Library
This is an open source C language library. Used to communicate with the RABBITMQ
The PHP-AMQP extension of PHP is to use this library to communicate with the server. So you have to install this open source Library first.
: https://github.com/alanxz/rabbitmq-c/
2, compiled php-amqp Extension of the source code
Note: Two versions to specify, avoid conflicts. The LIBRABBITMQ library is version 0.5.2. PHP-AMQ is 1.4.0 version
This extension is PHP official in maintenance, go to PHP official download: HTTP://PECL.PHP.NET/PACKAGE/AMQP
Second, compile the steps
First step: Install the Library first: LIBRABBITMQ
Version requirements: 0.5.2 version required.
Compilation order
1, TAR-XZVF rabbitmq-c-0.5.2.tar.gz
2. CD rabbitmq-c-0.5.2
3, Autoreconf-i
4./configure--prefix= Specifies which directory the library is installed in, and the second step is to introduce this library when installing PHP-AMQP. Suggested directory:/usr/local/librabbitmq/0.5.2/
5. Make && make install
Step two: Compile the PHP-AMQP module
Version requirements: 1.4.0 required.
Download location: HTTP://PECL.PHP.NET/PACKAGE/AMQP
Compilation order
1, decompression amqp-1.4.0 source compression package
2. CD amqp-1.4.0
3, Phpize #phpize路径根据服务器phpize的位置而定
4./configure--with-php-config=/apps/php-5.5.18/bin/php-config--WITH-AMQP--with-librabbitmq-dir= Here is the first step to the installation location of the LIBRABBITMQ library
5. Make && make install
Step three, restart PHP-FPM to make the new module effective
The PHP-FPM Restart command is typically: PHP installation directory/sbin/init.d.php-fpm restart
Compiling and installing PHP-AMQ extensions