AMQP RabbitMQ installation and configuration
I started to get started with RabbitMQ and tried to install it today. The procedure is as follows:
Rabbitmq version: 3.1.5
: Http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5.tar.gz
File Download Directory:/home/gao/server (hereinafter referred to as the current directory)
Preparations: Install the dependent Environment
yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc
Download to the current directory
wget -nd http://www.erlang.org/download/otp_src_R16B02.tar.gz
Decompress and install
tar -zxvf otp_src_R16B02.tar.gzcd otp_src_R16B02./configuremake && make install
If you enter erl, the installation is successful.
Set environment variables for use during next installation (this is only a temporary setting)
export PATH=$PATH:/usr/local/erlang/bin/
Or set permanently, edit the/etc/profile file, and add
Vim/etc/profile
Export PATH = $ PATH:/usr/local/erlang/bin/
Install other Dependencies
yum -y install xmltoyum -y install python-simplejsonyum -y install python
Install RabbitMQ below, first download to the current directory
wget -nd http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5.tar.gz
Decompress and start
tar -zxvf rabbitmq-server-3.1.5.tar.gzcd rabbitmq_server-3.1.5/sbin/rabbitmq-server start
The startup is successful.
Enable web View tool
sbin/rabbitmq-pluginsenable rabbitmq_management
Run this command and restart rabbitmq.
Run
sbin/rabbitmqctlstopsbin/rabbitmq-serverstart
Note: starting the web View tool will open port 15672.
After the restart, enter your rabbitmq server address in your browser and access port 15672. You will see the login interface,Both the account and password are guestEnter the following address locally.
Http: // 192.168.4.117: 15672/
========================================================== ========================================================== ========================================================== =
As shown in figure
Rabbitmq Configuration
Generally, the default configuration of RabbitMQ is sufficient. If you want special settings, there are two ways:
One is the configuration file rabbitmq-env.conf for environment variables;
One is the configuration file rabbitmq. config;
Note that these two files do not exist by default, and must be created by yourself if necessary.
Rabbitmq-env.conf
The file location is determined and cannot be changed. It is located in the/etc/rabbitmq directory (this directory needs to be created by yourself ).
The file contains some environment variables of RabbitMQ, which are commonly used as follows:
# 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 Path
RABBITMQ_PLUGINS_DIR =/rabbitmq/plugins // Plug-In Path
Specific list see: http://www.rabbitmq.com/configure.html#define-environment-variables
Rabbitmq. config
This is a standard erlang configuration file. It must comply with the erlang configuration file standards.
It has both the default directory and can be configured in the rabbitmq-env.conf file.
So far, RabbitMQ has been installed and configured.