RabbitMQ study notes: installation and configuration

1. Prepare the premise and download the corresponding installation software;

Rabbit MQ is built on the powerful Erlang OTP platform, so you must install Erlang before installing RabbitMQ.

The download is completed as shown below:

Note: The following steps are all installed and implemented in the Windows 10 environment;

2.1 erlang installation configuration:

  • Download erlang: download the corresponding installation file according to your current computer operating system environment;

  •  Open [otp_win64_22.3.exe] as an administrator, and click the [Next] button;

  • Select the software installation location: here I chose [D:\Program Files\erl10.7] locally, and continue to click the [Next] button;

  • Click the [Install] button;

Wait for the installation, click the [Close] button after completion; 

 

2.2 erlang configuration environment variable, environment variable name: ERLANG_HOME

  • This computer-->right mouse button "Properties"-->Advanced System Settings-->Environment Variables-->"New" System Environment Variable

  •  Click the [OK] button, the display is as follows:

  •  Double-click the system variable Path, click "New" in the pop-up layer [Edit Environment Variables], add %ERLANG_HOME%\bin to the path, and click OK;

  • Finally, the Windows key + R key, enter cmd, and then enter erl. Seeing the version number indicates that erlang has been installed successfully.

 

The above premise is prepared for the installation of RabbitMQ, and then we continue to install RabbitMQ;

3. RabbitMQ installation configuration:

  • 2.1 Open [rabbitmq-server-3.8.3.exe] as an administrator, and click the [Next] button;

  • Select the installation location and click the [Install] button;

  • Continue to click the [Next] button and wait for the installation;

  • Click [Finish] to complete the installation;

2.2 RabbitMQ environment variable configuration, environment variable name [RABBITMQ_SERVER]

Double-click the system variable Path, create a new [%RABBITMQ_SERVER%\sbin]

 

  • Activate [rabbitmq_management]

After RabbitMQ is installed, install RabbitMQ-Plugins. Open the command line cd and enter the RabbitMQ sbin directory; my directory is = "D:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.3\sbin, and then enter the command [rabbitmq-plugins.bat enable rabbitmq_management] to install ;

Open the command line, enter the RabbitMQ installation directory: sbin, enter the command [rabbitmqctl status], if the following figure appears, the installation is successful, and that RabbitMQ Server has been started and is running normally.

Open the sbin directory and double click [rabbitmq-server.bat]

After you see this interface for a few seconds, visit [http://localhost:15672] or local [http://ip:15672]

Then you can see the following interface:

The default user name and password are both guest, just log in.

Detailed tutorial on installing RabbitMQ in Linux environment = "[ https://www.jb51.net/article/112105.htm ]

 

3. RabbitMQ commonly used commands:

We can use the [rabbitmqctl] console command (located at rabbitmq_server-3.8.3\sbin>) to create users, passwords, binding permissions, etc.

  • Create an administrative user: [rabbitmqctl.bat add_user chait abc123]
  • Set administrator: [rabbitmqctl.bat set_user_tags chait administrator]
  • Set permissions: [rabbitmqctl.bat set_permissions -p / chait ".*" ".*" ".*"]
  • Query users: [rabbitmqctl.bat list_users]
  • 查询vhosts:【rabbitmqctl.bat list_vhosts】
  • Start RabbitMQ service: [net start RabbitMQ]
  • Stop RabbitMQ service: [net stop RabbitMQ]

The above operations can also use the [RabbitMQ] management plug-in [rabbitmq_management] to view the status of the [RabbitMQ] server instance in a better visual way;

 

Guess you like

Origin blog.csdn.net/ChaITSimpleLove/article/details/106035561