Compiling and installing PHP-AMQ extensions

Source: Internet
Author: User
Tags rabbitmq amq

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.