RabbitMQ environment preparation / environment construction

1. Install ERLANG OTP

RabbitMQ is developed in Erlang language. To run RabbitMQ, you must provide an environment that can run RabbitMQ. Erlang must be installed, just like if you want to raise fish, you must have water. 

first step:

Download ErlangOTP, there are many download paths at night, I provide the latest version of the download path, as shown in Figure 4. Note: Choose the number of system bits that matches your computer. The teacher here is a 64-bit operating system.

Download address: https://www.erlang-solutions.com/resources/download.html

 

 

The second step:

Install and download the executable file (exe file), it is best to install as an administrator. After installation, you need to record your installation address; you need to configure environment variables.

third step:

Configure environment variables, as shown in the following figure, increase the environment variable ERLANG_HOME variable value: ERLang installation path

 

 

Specify the system variable Path—Edit—New and enter% ERLANG_HOME% \ bin to confirm; as shown below.

 

 

the fourth step:

Test, and then CMD command: erl -version If the version number can be displayed normally, the installation has been completed

 

 

2. Install RabbitMQ server components

 

The first step: download the RabbitMQ server component. The Baidu cloud download link is provided here. The download on the official website will be slightly slower. Extract it in the following path:

Link: https://pan.baidu.com/s/1sku3Eal1aVRAzsKsnH7cwA Extraction code: jg7k

Step 2: After the download is complete, it is recommended to put the server-side components near the installation directory of the ERLang environment, as shown below:

 

The third step: RabbitMQ environment variables as shown below.

 

 Step 4: Prepare to start the service. Switch to the E: \ Soft \ erl_RabbitMQ \ rabbitmq_server-3.8.3 \ sbin directory

 

 

 

Run the commands separately:

rabbitmq-service install --- Run the rabbit node on the local computer

rabbitmq-service enable ---- Start RabbitMQ service

rabbitmq-service start ---- Start RabbitMQ service

 

Step 5: Enter the command to view the status of rabbitmq

rabbitmqctl status

 

 A diagnostic message appears that cannot be connected

DIAGNOSTICS
===========

attempted to contact: ['rabbit@WIN-CSTBNBVVGSQ']

rabbit@WIN-CSTBNBVVGSQ:
* connected to epmd (port 4369) on WIN-CSTBNBVVGSQ
* epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
* TCP connection succeeded but Erlang distribution failed

* Authentication failed (rejected by the remote node), please check the Erlang cookie


Current node details:
* node name: 'rabbitmqcli-8832-rabbit@WIN-CSTBNBVVGSQ'
* effective user's home directory: C:\Users\Administrator
* Erlang cookie hash: joVCp1tjZbhK/nWhgoYyjQ==

 

Step 6: Enter the command to view the status of the rabbitmq plugin

rabbitmq-plugins list

 

 

Step 7: Enter the command to enable rabbitmq's plugin web management plugin

RabbitMQ can be managed by a common web interface, enter the command in the cmd command window:

rabbitmq-plugins enable rabbitmq_management

 

Step 8: Enter the command to restart the rabbitmq service

Enter the command: rabbitmq-service stop

After stopping, enter the start command

Enter the command: rabbitmq-service start

Step 9: Enter the command to restart the rabbitmq service

Browser access address: http: // localhost: 15672 / As shown below,

 

 

 The default account guest password guest, after logging into the RabbitMQ management page:

 

 

This shows that the RabbitMQ environment and server components have all been built!

 

Guess you like

Origin www.cnblogs.com/1175429393wljblog/p/12696438.html