Installation and installation of the Linux rabbitmq amqp php plugin, rabbitmqamqp_php tutorial

Source: Internet
Author: User
Tags composer install rabbitmq amq

Installation and installation of the Linux rabbitmq amqp php plugin, RABBITMQAMQP


RABBITMQ is a message agent. Its core principle is very simple: to receive and send messages. You can think of it as a post office: If you put the letter in your mailbox, the postman will post the letter to your recipient. In this analogy, RABBITMQ is a mailbox, post Office, postman. The main difference between RABBITMQ and the post office is that it handles not paper, but instead receives, stores, and sends binary data--messages.

First step to install Erlang RABBITMQ dependency

wget http://www.erlang.org/download/otp_src_17.4.tar.gz
TAR-ZXVF otp_src_17.4.tar.gz
CD otp_src_17.4
./configure--prefix=/data/klj/erlang #我自己指定位置
Make
Make install
cd/data/klj/erlang/
#set Erlang Environment
Export path= $PATH:/data/klj/erlang/bin #修改 ~/.bash_profile
Source profile makes the file effective

Online says I need to download and install Simplejson installation RABBITMQ dependencies
wget https://pypi.python.org/packages/source/s/simplejson/simplejson-3.6.5.tar.gz
TAR-ZXVF simplejson-3.6.5.tar.gz
CD simplejson-3.6.5
Python setup.py Install

The second step is to get the rabbitmq3.4.2 version of the latest stable version
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.2/rabbitmq-server-generic-unix-3.4.2.tar.gz
TAR-ZXVF rabbitmq-server-generic-unix-3.4.2.tar.gz
CD RABBITMQ_SERVER-3.4.2/
CD sbin/
#./rabbitmq-server-detached #网上说后台执行 but not on a Mac.
./rabbitmq-server #启动rabbitmq的服务

./rabbitmq-plugins Enable Rabbitmq_management #进入管理模式web
Access Address: Http://127.0.0.1:15672/guest Guest
User Configuration: http://www.rabbitmq.com/man/rabbitmqctl.1.man.html#
Rabbitmqctl add_user KONGLJ 123456 #设定用户名
Rabbitmqctl set_user_tags KONGLJ Administrator #设定用户类型

Step three install rabbitmq-c then install the AMQP extension

Download rabbitmq-c-0.5.2.tar.gz https://github.com/alanxz/rabbitmq-c/via browser
CD rabbitmq-c-0.5.2
./configure
Make && make install
./examples/amqp_listen localhost 5672 amq.direct test
./examples/amqp_sendstring localhost 5672 amq.direct test "Hello World"
./examples/amqp_sendstring localhost 5672 amq.direct test "Hello World"
./examples/amqp_sendstring 127.0.0.1 5672 amq.direct test "Hello World"

The expansion of the PHP-AMQP immediately after the installation
wget http://pecl.php.net/get/amqp-1.3.0.tgz
TAR-ZXVF amqp-1.3.0.tgz
CD amqp-1.3.0
/data/klj/php/bin/phpize
./configure--with-php-config=/data/klj/php/bin/php-config--WITH-AMQP
Make
Make install


Error: Please reinstall the LIBRABBIT-MQ distribution http://jingyan.baidu.com/article/e4511cf3362b872b845eafb9.html Troubleshoot LIBRABBIT-MQ installation Issues
#./configure--with-php-config=/data/klj/php/bin/php-config--WITH-AMQP--with-librabbitmq-dir=/data/source/ rabbitmq-c-0.5.2

The fourth step uses the php-amqplib provided by the official website
Download Php-amqplib https://github.com/videlalvaro/php-amqplib
Download compressed package decompression via git without download complete
Installation Document Modification Couposer.json
Then execute Composer.phar install to replace with/usr/local/bin/composer install #没有composer需要先安装composer


Installation of composer Php-amqplib dependent environment
Curl-ss Https://getcomposer.org/installer | Php
MV Composer.phar/usr/local/bin/composer

Php-amqplib Environment Construction
The entire environment has been built and can be tested and developed.

Reference articles
http://www.rabbitmq.com/features.html RABBITMQ Official website
Https://github.com/videlalvaro/php-amqplib Php-amqplib Official website
Https://getcomposer.org/doc/00-intro.md#installation-nix Composer Official website
http://www.yuansir-web.com/2013/05/31/rabbitmq%E5%AE%98%E6%96%B9%E4%B8%AD%E6%96%87%E5%85%A5%E9%97%A8%E6%95%99% e7%a8%8bphp%e7%89%88-%e7%ac%ac%e4%ba%8c%e9%83%a8%e5%88%86%e5%b7%a5%e4%bd%9c%e9%98%9f%e5%88%97%ef%bc% 88work-queues%ef%bc%89/Learning Blog

http://jingyan.baidu.com/article/e4511cf3362b872b845eafb9.html Troubleshooting LIBRABBIT-MQ Installation Issues
Installation and configuration of http://www.cnblogs.com/astroboyx/archive/2012/04/09/2739902.html RABBITMQ

http://www.bkjia.com/PHPjc/929486.html www.bkjia.com true http://www.bkjia.com/PHPjc/929486.html techarticle Linux RABBITMQ installs and installs the AMQP PHP plugin, RABBITMQAMQP RABBITMQ is a message agent. Its core principle is very simple: to receive and send messages. You can think of it as a ...

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