linux CentOS 7 install rabbitMq

1. Install the erlang environment

Enter the official website of erlang,
select the corresponding version
Insert image description here
, click to enter the page, and execute the following two commands provided by the official

# 安装仓库
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
# 安装erlang
sudo yum install erlang-23.3.4.11-1.el7.x86_64

Insert image description here
Wait patiently for the end of the run.
Enter the command erl.
If the version number appears, it means installation growth.
Insert image description here
Note: Be sure to download the version corresponding to the system. el/7 means CentOS 7.

2. Install rabbitMq

Check the correspondence between erlang and rabbit versions, and determine the correspondence between the versions to be downloaded

Enter the rabbitmq-server official website
Insert image description here
and click to enter the details page.
Also execute the official command

# 安装仓库
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
# 安装rabbit
sudo yum install rabbitmq-server-3.10.0-1.el7.noarch

Insert image description here
Install rabbit plugin

rabbitmq-plugins enable rabbitmq_management

Start mq

systemctl start rabbitmq-server

View running status

	systemctl status rabbitmq-server

Run successfully
Insert image description here

3. Create an account

Add admin user and set password

rabbitmqctl add_user admin admin

Add the admin user to the administrator role

rabbitmqctl set_user_tags admin administrator

Set the permissions of the admin user, specify the vhosts allowed to access and write/read

rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"

Check which users are allowed access by vhost(/)

rabbitmqctl list_permissions -p /

View user list

rabbitmqctl list_users

After confirming that it is correct as shown in the figure below, you can directly access the ip: port to log in
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_44931584/article/details/128931579