PHP compiler Installation PHP-AMQ extended concise tutorial _php Tips

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

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

Usage: This extension is used to manipulate the RABBITMQ service-side

First, the installation of the umbrella

1. Compile and install LIBRABBITMQ Library

This is a library of open source C language. Used to communicate with RABBITMQ

The PHP-AMQP extension of PHP is to use this library to communicate with the server. So you must first install this open source Library.

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

Click here to download the site.

2, compile PHP-AMQP extension of the source code

Note: Two versions to be specified, avoid conflicts. The LIBRABBITMQ library is version 0.5.2. PHP-AMQ is version 1.4.0

This extension is PHP official in maintenance, go to PHP official download: HTTP://PECL.PHP.NET/PACKAGE/AMQP

Second, the compilation steps

The 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 the directory to which the library is installed, and the second step to install PHP-AMQP is to introduce this library. Suggested Catalog:/USR/LOCAL/LIBRABBITMQ/0.5.2/

5, make && make install

Step two: Compile the PHP-AMQP module

Version requirements: Need to 1.4.0.

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 LIBRABBITMQ library installation location

5,

Make && make install

Step three, restart PHP-FPM to make the new module effective

PHP-FPM's restart commands are: PHP installation directory/sbin/init.d.php-fpm restart

More interested in PHP related content readers can view the site topics: "PHP object-oriented Program Design Primer", "PHP Mathematical Arithmetic Skills summary", "PHP Operations Office document tips (including word,excel,access,ppt)", "PHP Array ( Array) Operation Skills Encyclopedia, "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 will help you with the PHP program design.

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.