Manual php-amqp extension compilation in ubuntu in linux

Source: Internet
Author: User

For more information about how to manually compile php-amqp extensions in ubuntu in linux, see.

The amqp module on the PHP official website is described here. The following describes the key installation steps.

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

For ubuntu default source there is no php5-amqp this package, so use the amqp to test the manual compilation.

Preparations:

# Install the php compilation tool

Sudo apt-get install php5-dev

# Install the library of rabbitmq


Sudo apt-get install librabbitmq-dev

If you have not installed git, install git because we need to obtain the source code from the official version library.

# Clone and prepare the code

Git clone git: // github.com/alanxz/rabbitmq-c.git
Cd rabbitmq-c


Git submodule update

# Compilation Extension


Autoreconf-I &./configure & make & sudo make install

Then we need to download the php extension source code:

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

The 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

Restart your web server or php-fpm and print phpinfo. If you see the following content, the extension is installed.

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.