A detailed tutorial on manually compiling PHP-AMQP extensions in Linux under Ubuntu

Source: Internet
Author: User
Tags install php php compiler git clone rabbitmq

PHP official website of the AMQP module introduced here, I do not introduce more. Below to enter the focus of the installation process.

http://www.php.net/manual/en/book.amqp.php

The default source for Ubuntu is not PHP5-AMQP this package, so use the AMQP Test manual compilation.

Preparatory work:

# Install PHP compiler tool

sudo apt-get install Php5-dev

# Install the RABBITMQ library


sudo apt-get install Librabbitmq-dev

Then, if you don't have git installed, install git, because we're going to get the source code from the official version library.

#克隆并准备好代码

git clone git://github.com/alanxz/rabbitmq-c.git
CD rabbitmq-c


git submodule update

# Compile Extensions


Autoreconf-i &&/configure && make && sudo make install

Then we need to download the PHP extension source code, address here:

Http://pecl.php.net/package/amqp

Current Latest version is 1.0.7


wget http://pecl.php.net/get/amqp-1.0.7.tgz

Tar zxf amqp-1.0.7.tgz
CD amqp-1.0.7/


Phpize &&/configure--with-amqp && make && sudo make install

# Create a configuration file


sudo echo "extension = amqp.so" >/etc/php5/conf.d/amqp.ini

Then reboot your Web server or PHP-FPM and print the phpinfo, and if you see the following, expand the installation.

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.