Php compilation and installation php-amq extension concise tutorial, php-amq concise tutorial. Php compilation and installation php-amq extension concise tutorial, php-amq concise tutorial this article describes how to compile and install php-amq extension. For your reference, refer to: usage: php compilation and installation php-amq extension concise tutorial, php-amq concise tutorial
This article describes how to compile and install the php-amq extension in php. We will share this with you for your reference. The details are as follows:
Purpose: This extension is used to operate the rabbitmq server.
I. Installation Summary
1. Compile and install the librabbitmq Library
This is an open-source C Language Library. Used to communicate with rabbitmq
The php-amqp extension of php uses this library to communicate with the server. Therefore, you must first install this open source library.
: Https://github.com/alanxz/rabbitmq-c/
Click here to download.
2. Compile the php-amqp extension source code.
Note: You must specify two versions to avoid conflict. The librabbitmq Library is version 0.5.2. Php-amq Version 1.4.0
This extension is officially maintained by php, go to php official download: http://pecl.php.net/package/amqp
II. compilation steps
Step 1: First install Library: librabbitmq
Version requirement: version 0.5.2 is required.
Compilation sequence
1,
tar -xzvf rabbitmq-c-0.5.2.tar.gz
2,
cd rabbitmq-c-0.5.2
3,
autoreconf -i
4../configure -- prefix = specifies the directory to which the library is installed. you need to introduce this library when installing php-amqp in step 2. Recommended Directory:/usr/local/librabbitmq/0.5.2/
5. make & make install
Step 2: compile the php-amqp module
Version requirement: 1.4.0 is required.
Download location: http://pecl.php.net/package/amqp
Compilation sequence
1. decompress the amqp-1.4.0 source code compressed package
2. cd amqp-1.4.0
3. phpize # The phpize path depends on the location of the server phpize
4,
./Configure -- with-php-config =/apps/php-5.5.18/bin/php-config -- with-amqp -- with-librabbitmq-dir = enter the installation location of the first librabbitmq library here
5,
make && make install
Step 3. restart php-fpm to make the new module take effect.
The restart command for php-fpm is generally: php installation directory/sbin/init. d. php-fpm restart