Skip to main content

Alibaba Cloud centos download and installation rabbitmq

Alibaba Cloud centos download and installation rabbitmq

Table of contents

1. Download rabbitmq official website address

2.Installation

2.1 Before installing Erlang, you need to install socat first

2.2 Install Erlang

2.3 Install RabbitMQ

3. Start rabbitmq

3.1 Set up auto-start at boot

3.2 Start the service

3.3 Check service startup status

3.4 Stop service

3.5 Turn on the web management plug-in

3.6 Turn off the firewall

3.7 Configure security group

4.Login


1. Download rabbitmq official website address

Switch to /usr/local/software/, if software does not create a folder by itself

Alibaba Cloud centos download and installation rabbitmq

Click on Package Cloud

Alibaba Cloud centos download and installation rabbitmq

Downloading rabbitmq
el7 generally means that it is compatible with the Centos7 version, and el8 is compatible with the Centos8 version. Don't accidentally choose the wrong one! ! !

Alibaba Cloud centos download and installation rabbitmq

Download erlang.
The erlang version should correspond to rabbitmq. For example, the downloaded rabbitmq version is not 3.8.19, and the erlang version should be 23.2~24.2.

Alibaba Cloud centos download and installation rabbitmq

In the same way, wget downloads the content to the server and executes it.

Alibaba Cloud centos download and installation rabbitmq

File after download:

Alibaba Cloud centos download and installation rabbitmq

2.Installation

2.1 Before installing Erlang , you need to install socat first

    yum install socat -y

2.2 Install Erlang

    rpm -ivh erlang-23.3.4.11-1.el7.x86_64.rpm

2.3 Install RabbitMQ

    rpm -ivh rabbitmq-server-3.8.30-1.el7.noarch.rpm 

The installation is now complete!

3. Start rabbitmq

3.1 Set up auto-start at boot

    chkconfig rabbitmq-server on

3.2 Start the service

    service rabbitmq-server start

3.3 Check service startup status

    service rabbitmq-server status

When the picture appears, the startup is successful.

Alibaba Cloud centos download and installation rabbitmq

3.4 Stop service

    service rabbitmq-server stop

3.5 Turn on the web management plug-in

    rabbitmq-plugins enable rabbitmq_management

3.6 Turn off the firewall

    systemctl stop firewalld

3.7 Configure the security group, you need to configure two ports 15672 and 5672

Alibaba Cloud centos download and installation rabbitmq

Alibaba Cloud centos download and installation rabbitmq

After saving, restart the server

Alibaba Cloud centos download and installation rabbitmq

After restarting, check whether rabbitmq is started. Refer to 3.3. If it is not started, perform 3.2
to visit and see if it is successful: http://public IP:15672/

Alibaba Cloud centos download and installation rabbitmq

Alibaba Cloud centos download and installation rabbitmq

If this interface appears, it means success. If you cannot access it, check whether the firewall is turned off and the security group is configured correctly.

4.Login

Username: guest
Password: guest
If a prompt appears, it means that the guest can only log in in the localhost environment.

Alibaba Cloud centos download and installation rabbitmq

Add a new user

    rabbitmqctl add_user admin 123

Set user role

    rabbitmqctl set_user_tags admin administrator

Set user permissions

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

Log in again using the admin user

Alibaba Cloud centos download and installation rabbitmq

Reference documents: https://blog.csdn.net/weixin_39515823/article/details/121390553
https://blog.csdn.net/m0_46093203/article/details/118642090