Ubuntu Installation Rabbitmq-server

Source: Internet
Author: User
Tags bz2 rabbitmq

RABBITMQ is written in Erlang, so we need to install Erlang, install Erlang and install Python and Simplejson, so we'll start with Python:

1. Install Python:

[PHP]View Plaincopy
    1. #wget http://www.python.org/ftp/python/2.5.2/python-2.5.2.tar.bz2
    2. #tar-JXVF python-2.5.2.tar.bz2
    3. #cd Python-2.5.2
    4. #./configure
    5. #make && make Install
    6. Test: Enter python at the command line and the Python interpreter will indicate that it is installed correctly.


2, installation Simplejson:

[HTML]View Plaincopy
    1. #wget http://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.9.tar.gz
    2. #tar ZXVF simplejson-2.0.9.tar.gz
    3. #cd simplejson-2.0.9
    4. #python setup.py Build
    5. #python setup.py Install


3. Installing Erlang

[HTML]View Plaincopy
  1. Install the following dependencies first, and don't ask why the installation is done by line or you're bitter.
  2. #yum-y install make GCC gcc-c++ kernel-devel M4 ncurses-devel Openssl-devel
  3. #yum install libx* java* tk unixODBC unixodbc-devel
  4. #yum-y Install Ncurses-devel
  5. #yum Install Ncurses-devel
  6. #yum-y Install Xmlto
  7. #wget http://www.erlang.org/download/otp_src_R13B04.tar.gz
  8. #mv otp_src_r16b02 erlang_r16b #重命名解压厚的文件
  9. #cd erlang_r16b/
  10. #./configure --prefix=/usr/local/erlang--with-ssl--enable-threads--enable-smp-support--enable-kernel-poll-- Enable-hipe--without-javac
  11. #make && make Install
  12. #vi/etc/profile
  13. Erl_home=/usr/local/erlang
  14. Path= $ERL _home/bin: $PATH
  15. Export Erl_home PATH
  16. #source/etc/profile
  17. Update environment variables
  18. Execute Erl, enter Erlang Shell to successfully install test if installation is successful, enter command Erl in console

4, Installation RabbitMQ

[PHP]View Plaincopy
    1. #yum Install NC (nc.x86_64)
    2. Cd/usr/local
    3. #wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.1/rabbitmq-server-3.1.1.tar.gz
    4. #cd rabbitmq-server-3.1.1
    5. #make
    6. #make Install TARGET_DIR=/OPT/MQ/RABBITMQ Sbin_dir=/opt/mq/rabbitmq/sbin Man_dir=/opt/mq/rabbitmq/man
    7. The latest package to add to other directories, forget what is the directory. Make install to see the error message. Compiling RABBITMQ into the/OPT/MQ/RABBITMQ directory


5. Install the Web plugin management interface

[PHP]View Plaincopy
    1. #cd/opt/mq/rabbitmq/sbin
    2. #mkdir/etc/rabbitmq/
    3. #rabbitmq-plugins Enable Rabbitmq_management
[PHP]View Plaincopy
    1. #./rabbitmq-server Start &
[PHP]View Plaincopy
    1. To start the RABBITMQ service:
    2. Foreground run: Rabbitmq-server start (after the user closes the connection, the process automatically ends)
[PHP]View Plaincopy
    1. Running in the background: rabbitmq-server-detached


6, good, to here RABBITMQ has been configured, you can start:

[HTML]View Plaincopy
    1. Let's look at the default listening port 5672 for RABBITMQ:
    2. #netstat-tnlp|grep 5672
    3. It is best that we can enter the http://ip:15672/login admin interface on the browser:
    4. The username and password used for login are counted as guest by default, and the following pages are logged in:
    5. Another machine accesses the RABBITMQ (just outside the machine) and needs to open port 15672
    6. #vi/etc/sysconfig/iptables to add the 15672 port in. Then restart service iptables restart


Http://www.oschina.net/news/66104/rabbitmq-3-5-5-rc2?utm_source=tuicool

RABBITMQ Common Commands

Rabbitmq-server Start or service rabbitmq-server start #启动rabbitmq

Rabbitmqctl list_exchanges

Rabbitmqctl list_bindings

Rabbitmqctl list_queues #分别查看当前系统种存在的Exchange和Exchange上绑定的Queue信息.

Rabbitmqctl Status #查看运行信息

Rabbitmqctl Stop #停止运行rabbitmq

Rabbitmq-plugins Enable Rabbitmq_management

#启动rabbitmq的图形管理界面, this operation must restart RABBITMQ, and then http://10.109.18.226:15672 the user name and password in the Web is guest guest. If the LAN cannot access the set firewall filtering rules or turn off the firewall.

RABBITMQ can be built as a cluster

Building Architecture:
A haproxy, reverse proxy RABBITMQ service node, RABBITMQ service only agent memory node, to ensure speed.
Web monitoring side Proxy disk node, all nodes are metadata are synchronized.
Basically you can guarantee that if not all the machines are down, the RABBITMQ service will not be down. Concrete construction See: Http://www.tuicool.com/articles/YbYvIj

Ubuntu Installation Rabbitmq-server

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.