php7.1 Installing the AMQP extension

Source: Internet
Author: User
Tags zts rabbitmq

When using RABBITMQ Message Queuing in PHP development, you need to install the PHP extension AMQP, which is the following installation steps:

Install the AMQP extension directly using the PECL

/usr/local/php/bin/pecl Install AMQP

If the LIBRABBITMQ library file is missing, you need to install LIBRABBITMQ first, the following steps:

1 wget https://GITHUB.COM/ALANXZ/RABBITMQ-C/RELEASES/DOWNLOAD/V0.7.1/ rabbitmq-c-0.7.1.tar.gz2 tar-zxvf Rabbitmq-c-0.7.1.tar. GZ 3 CD rabbitmq-c-0.7.14 ./configure--prefix=/usr/local/rabbitmq-C5 Make & & Make Install

LIBRABBITMQ after the installation is complete, continue execution

/usr/local/php/bin/pecl Install AMQP

You will need to enter the installation directory/usr/local/rabbitmq-c where LIBRABBITMQ is installed, and get the amqp.so extension path at this time/usr/local/php/lib/php/extensions/ No-debug-non-zts-20160303/amqp.so, join the php.ini configuration file,

[Amqp]extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/amqp.so

Restart PHP-FPM:

PHP-FPM restart

Execution at this time

php-m | grep AMQP

You can see the AMQP extension, which means that the AMQP extension is successfully installed and now you can use RABBITMQ in PHP!

php7.1 Installing the AMQP extension

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.