Janet: Looking at the IT architecture in the Big Data Era (3) rabbitmq-installation, configuration and monitoring of Message Queuing

Source: Internet
Author: User

Janet previous chapter "Looking at the Big Data era of IT Architecture" (2) Message Queuing rabbitmq-Basic concept detailed introduction, roughly speaking, the current message queue of several common products of the pros and cons of the comparison, the next few chapters will be elaborated in detail, this chapter introduces RABBITMQ, okay, nonsense less say, Official start:

First, installation1. Installing Erlang1) System compilation Environment (Linux/unix environment is used here) ① Installation Environment

Virtual machines: VMware? Workstation 10.0.1 Build

Linux system: CentOS6.5

RABBITMQ official website Download:http://www.rabbitmq.com/download.html

Erlang's official website download: http://www.erlang.org/download.html

2) Installation of RABBITMQ (Erlang, Simplejson) required:       ① Installing Erlang

RABBITMQ is based on Erlang, so you must first configure the Erlang environment.

Download the latest Erlang installation package from Erlang's official website http://www.erlang.org/download.html , the version i downloaded is otp_src_R14B03.tar.gz.

And then:

  1. Then unzip the downloaded GZ package tar zxcf *.tar.gz
  2. CD into the extracted folder
  3. Execution ./configure--prefix=/opt/erlang will start compiling the installation will be compiled to/opt/erlang and executed
  4. Make and make install
  5. when the compilation is complete, enter /opt/erlang , enter Erl Test Erlang whether the installation was successful.
  6. Modify /etc/profile file, add the following environment variables:
  7. #set Erlang Environment
  8. Export path= $PATH:/opt/erlang/bin
  9. Source Profile make the file effective
  10. Ken will be able to find the case of the package can not be found, directly yum install it!

After installing Erlang, start loading rabbitmq-server, the main reference is Official document: http://www.rabbitmq.com/build-server.html ;
② Installing Simplejson (if you need to install a Python version )

A newer version of Python needs to be installed. Easy to install.

Need to install Simplejson. Download the latest version from here: http://pypi.python.org/pypi/simplejson#downloads . The version I downloaded is simplejson-2.2.1.tar.gz

2, Installation RABBITMQThen install RABBITMQ Server. Download the source code version of RABBITMQ from here:http://www.rabbitmq.com/server.html. The version I downloaded israbbitmq-server-generic-unix-2.7.1.tar.gz
  1. There are many versions of RABBITMQ installed, and we use the Generic Unix version.
  2. CD/
  3. wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.7.1/rabbitmq-server-generic-unix-2.7.1.tar.gz Download RABBITMQ
  4. Tar zxvf rabbitmq-server-generic-unix-2.7.1.tar.gz-c/opt unzip to the specified folder
  5. Cd/opt, establishing a soft link ln-s rabbitmq-server-generic-unix rabbitmq
  6. CD Rabbitmq/sbin,./rabbitmq-server-detached to enable background startup
  7. modifying /etc/profile, adding environment variables
  8. #set RABBITMQ Environment
  9. Export path= $PATH:/opt/rabbitmq/sbin
  10. Source profile makes the file effective
  11. Cd/opt/rabbitmq/sbin,./rabbitmqctl stop close rabbitmq
  12. This completes the installation

This will make the installation successful.

3. Trial run
    1. Enable Admin mode (manage MQ with Web page) cd/opt/rabbitmq/sbin/
    2. Execute./rabbitmq-plugin Enable Rabbitmq-management
    3. Then visit http://localhost:55672
Second, the configuration

Main references official documents:http://www.rabbitmq.com/configure.html

In general, the default configuration for RABBITMQ is sufficient. If you want a special setting, there are two ways:

    • One is the environment variable configuration file rabbitmq-env.conf;
    • A configuration file that is configuration information rabbitmq.config;
Note that these two files are not by default and must be created yourself if necessary.

Rabbitmq-env.conf
The location of this file is deterministic and immutable, located in:/etc/rabbitmq directory (this directory needs to be created by itself).
    • The contents of the file include some of the environment variables of RABBITMQ, commonly used are:
    • #RABBITMQ_NODE_PORT =//Port number
    • #HOSTNAME =
    • Rabbitmq_nodename=mq
    • rabbitmq_config_file=//path of the configuration file
    • Rabbitmq_mnesia_base=/rabbitmq/data//path of the MNESIA database to be used
    • Rabbitmq_log_base=/rabbitmq/log//log's Path
    • Rabbitmq_plugins_dir=/rabbitmq/plugins//plug-in Path

For a specific list, see:http://www.rabbitmq.com/configure.html#define-environment-variables

Rabbitmq.config
This is a standard Erlang configuration file. It must conform to the standards of the Erlang profile.
It has both a default directory and can be configured in the rabbitmq-env.conf file.

The contents of the file are described in:http://www.rabbitmq.com/configure.html#config-items

Third, monitoring

Main references official documents:http://www.rabbitmq.com/management.html

RABBITMQ provides a web-based monitoring page system that is invoked in a plugin manner.

First, configure the location of the plugins directory in rabbitmq-env.conf: Rabbitmq_config_file

Download the plugin required for the monitoring page to the plugins directory, which includes the following plugin:

    • Mochiweb
    • Webmachine
    • Rabbitmq_mochiweb
    • Amqp_client
    • Rabbitmq_management_agent
    • Rabbitmq_management
The download path is located at:http://www.rabbitmq.com/plugins.html#rabbitmq_management

Restart the RABBITMQ and enter the http://server-name:55672/mgmt/to access the monitoring page. The default user name and password are: Guest and guest.


























Janet: Looking at the IT architecture in the Big Data Era (3) rabbitmq-installation, configuration and monitoring of Message Queuing

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.