PHP compilation Installation PHP-AMQ extension concise tutorial, Php-amq Concise tutorial _php Tutorial

Source: Internet
Author: User
Tags php compiler php regular expression rabbitmq amq

PHP compilation Installation PHP-AMQ extension concise tutorial, Php-amq Concise tutorial


This article describes how PHP compiles and installs PHP-AMQ extensions. Share to everyone for your reference, as follows:

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.

Download Address: https://github.com/alanxz/rabbitmq-c/

Click here to download this site.

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

More readers interested in PHP related content can view the topic: "PHP Primer for Object-oriented programming", "PHP Math Skills Summary", "PHP operation Office Document Skills Summary (including word,excel,access,ppt)", "PHP Array ( Array), "PHP Data structure and algorithm tutorial", "PHP Programming Algorithm Summary", "PHP Regular Expression Usage Summary", and "PHP Common database Operation Skills Summary"

I hope this article is helpful to you in PHP programming.

http://www.bkjia.com/PHPjc/1138981.html www.bkjia.com true http://www.bkjia.com/PHPjc/1138981.html techarticle PHP Compiler installation PHP-AMQ extension Concise tutorial, Php-amq Concise Tutorial This article describes the PHP compiler installation PHP-AMQ extension methods. Share to everyone for your reference, as follows: Use: this ...

  • 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.