Php compilation and installation php-amq extension concise tutorial, php-amq concise tutorial _ PHP Tutorial

Source: Internet
Author: User
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

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.