2. Install RabbitMQ

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https: //blog.csdn.net/u013517797/article/details/79371312
Previous introduces the basic information of RabbitMQ herein, this explains how to install RabbitMQ.

We are here to install RabbitMQ 3.7.3 version. RabbitMQ have Windows version and Linux version, where we first explain the Windows version, do the instance back time, and then install the Linux version.

First, download RabbitMQ
visit the download address in a browser: http: //www.rabbitmq.com/download.html, in the following pages:

 

 

Click "With installer (recommended)" to download:

 

 

Download RabbitMQ respectively Erlang language itself and its environment supports.
When click on the "Erlang for Windows" page will jump to the download page Erlang locale:

 

 

Added: Erlang locale alone download address is: http: //www.erlang.org/downloads
choose to download the version of Windows to choose to download software from the computer based on the number of bits (32-bit or 64-bit).
All file structure after the download is complete is:

 

 

The first is the Erlang language environment setup file, the second is the RabbitMQ installation files.

Second, the installation under Windows
(. 1) is mounted Erlang

 

 

 

 

 

 

 

 

 

 

 

 

 


(2) Installation RabbitMQ

 

 

 

 

 

 

 

 

 

 

 

 

 


Directory structure after installation as well:

 

 

Wherein "sbin" is placed under the common commands:

 

 

Common commands:
RabbitMQ open plug-plugins enable rabbitmq_management
rabbitmq-service remove remove services
rabbitmq-service install installation services
rabbitmq-service start or net start rabbitmq start the service
rabbitmq-service stop or net stop rabbitmq stop service
rabbitmqctl status view service status
rabbitmq- server restart to restart the service

Configuration environment variable:
ERLANG_HOME and RABBITMQ_BASE

 

 

 

 


While% ERLANG_HOME% \ bin added to the Path:

 

 


(3) enable management tool
with administrator cmd to open the console, enter the file directory of the installed RabbitMQ "sbin" folder :

 

 

Enter the following command to activate the widget manager (better visual way to view the status of Rabbit MQ server instance):
RabbitMQ-plugins.bat enable rabbitmq_management

 

 

Then enter net stop RabbitMQ && net start RabbitMQ restart the service:

 

 

Use rabbitmqctl status command to view the current node status:

 

 

If the node status is wrong, you need to open the node status rabbitmqctl start_app:

 

 

This will start a good management tools RabbitMQ, enter the address in the browser http://127.0.0.1:15672/ view, you can see RabbitMQ Web administration page:

 

 

The default login account as: guest / guest.

Questions added:
Use After a successful installation the following error occurred after the command rabbitmq-plugins eble rabbitmq_management Status and rabbitmqctl:
Status of the Node The Rabbit @ GuoGuo-PC ...

Error: unable to perform an operation on
node 'rabbit @ GuoGuo-PC' Please see diagnostics information and suggestions below.. Here to ensure consistency .erlang.cookie file, the problem lies here, I do not know what causes the C : \ users \ {UserName} \ erlang.cookie and default C:. \ WINDOWS \ System32 \ config \ systemprofile \ .erlang.cookie inconsistent, the copy of the user directory to the Windows directory on it.

See the following solutions:
https://www.cnblogs.com/haoliansheng/p/6008980.html

Third, create an account
default account is guest account "guest", which rabbitmq user roles can be divided into five categories: super administrator, who monitors, policy makers, managers and other common:
(1) the Super Administrator (administrator)
can Log management console (management plugin is enabled), you can view all the information, and can operate on a user policy (policy).

(2) monitors. (Monitoring)
can be found on the management console (enabled by the management plugin), and can view information rabbitmq nodes (number of processes, memory usage, disk usage, etc.) 

(3) policy makers (policymaker)
can be found on the management console (enabled management plugin's), and can manage the policy.

(4) general manager (Management)
(enabled management plugin's) only can be found on the management console, can not see the node information, the policy can not be managed.

(5) the other
could not land management console, often it is the producers and consumers.

Click here under "Admin" in the Web Administration Tool "Users" option to add a user:

 

 

 


Added after effects:

 

 


In addition to adding users to the Web Administration tool can also be used to add users from the console command:
view existing users and user roles:
rabbitmqctl.bat list_users

Add a user:
rabbitmqctl.bat add_user username password

Change user roles:
rabbitmqctl.bat set_user_tags username Administrator (with multiple roles can be followed by a space)

Change Password:
rabbitmqctl change_password userName newPassword

Delete User:
rabbitmqctl.bat DELETE_USER username

Fourth, create Virtual Hosts
to set permissions for different roles of virtual paths, which would allow different roles in different virtual path management, and have the appropriate permissions:

 

 

After successfully added:

 

 

 


Click Name "/ jack" set permissions:

 

 

Back to the "Users" option under, you can see the permissions jack:

 

 


These are the RabbitMQ installation and initialization.

Original link: https: //blog.csdn.net/acmman/article/details/79371312

Guess you like

Origin www.cnblogs.com/laosunlaiye/p/11671319.html