RabbitMQ concept and environment setup (I) Single-node installation and configuration, and rabbitmq nodes

Source: Internet
Author: User
Tags rabbitmq

RabbitMQ concept and environment setup (I) Single-node installation and configuration, and rabbitmq nodes
######################################## #######
# Asynchronous and distributed Message Processing Model
######################################## #######

Binding + ---------- ++ ---------------- +
/------------ + Queue + --- + consumer +
+ --------------- ++ ---------------- + | + ----------- ++ ---------------- +
+ Publisher + --- + exchange + --- |
+ --------------- ++ ---------------- + \ + ----------- ++ ---------------- +
----------- + Queue + --- + consumer +
Binding + ----------- ++ ---------------- +

######################################## ########
RabbitMQ Server Installation
######################################## ########
1. Install Erlang
Sudo yum install erlang

2. Install RabbitMQ Server
Import key first
Sudo rpm -- import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
You can save the content to the hosts file first. For example, rabbitmq-signing-key-public.asc.txt
Sudo rpm -- import rabbitmq-signing-key-public.asc.txt

3. Install rabbitmq-server-3.4.1-1.noarch.rpm
Sudo yum install rabbitmq-server-3.4.1-1.noarch.rpm

4. Start RabbitMQ Server
Register as a system service
Sudo chkconfig rabbitmq-server on
Start RabbitMQ Server
Sudo/etc/init. d rabbitmq-server stop/start/etc
Sudo service rabbitmq-server stop/start/etc

5. Check whether the port is occupied if startup fails.
4369 (epmd), 25672 (Erlang distribution)
5672,567 1 (AMQP 0-9-1 without and with TLS)
15672 (if management plugin is enabled)
61613,616 14 (if STOMP is enabled)
1883,888 3 (if MQTT is enabled)

Refer:
Http://www.rabbitmq.com/install-rpm.html

######################################## ##########
RabbitMQ Server Configuration
######################################## ##########
1. Configure through environment variables
You can directly configure it in Shell.
Or configure in rabbitmq-env.conf

2. Configure through the configuration file
Sudo cp/usr/share/doc/rabbitmq-server-3.4.1/rabbitmq. config. example/etc/rabbitmq. config
Sudo vim/etc/rabbitmq. config

Related File Location
For RPM/etc/rabbitmq/, such as/etc/rabbitmq. config,/etc/rabbitmq/rabbitmq-env.conf

3. runtime configuration

Refer:
Http://www.rabbitmq.com/configure.html

######################################## #########
# RabbitMQ logs, users, and clients
######################################## #########
1. Logs
Ls-l/var/log/rabbitmq

2. Default virtual host and Default user
Virtual host :/
User: guest
Passwd: guest
Note: by default, users can only connect to/on localhost and have full permissions.

3. RabbitMQ Client
Python client
Pika-0.9.14.tar.gz
Tar-xzvf pika-0.9.14.tar.gz
Cd pika-0.9.14
Sudo python27 setup. py install

JS client
Amqp. node

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.