rabbitmq

最後更新: 2024-03-08

 


Installation

 

Erlang

Before installing RabbitMQ, you must install a supported version of Erlang.

CentOS-derivative repositories provide Erlang versions that are typically out of date and
 cannot be used to run latest RabbitMQ releases.

Team RabbitMQ produces a package stripped down to only provide those components needed to run RabbitMQ.
(Zero-dependency Erlang from RabbitMQ)

Zero-dependency Erlang from RabbitMQ

https://github.com/rabbitmq/erlang-rpm

mkdir /usr/src/rabbitmq
cd /usr/src/rabbitmq

LINK='https://github.com/rabbitmq/erlang-rpm/releases/download/v21.3.8.21/erlang-21.3.8.21-1.el7.x86_64.rpm'

wget $LINK

rpm -i erlang-26.2.2-1.el7.x86_64.rpm

To switch to Erlang shell, you can type the following command.

erl

rabbitmq-server 要的 package

yum install socat logrotate -y

rabbitmq-server

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

Version

3.7        # 最後支援 RHEL 6, 7 的 Version (V3.7 要 Erlang 21.3)

rpm -Uvh rabbitmq-server-3.7.28-1.el7.noarch.rpm

systemctl enable rabbitmq-server --now

systemctl status rabbitmq-server

Checking

rabbitmq-diagnostics ping

rabbitmq-diagnostics status

rabbitmq-diagnostics cluster_status

rabbitmq-diagnostics environment

 


Port

 

beam.smp

By default, RabbitMQ will listen on port 5672 on all available interfaces.

/etc/rabbitmq/rabbitmq.conf

listeners.tcp.1 = 127.0.0.1:5672

systemctl restart rabbitmq-server

epmd

4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools

 


Access Web Console

 

rabbitmq-plugins enable rabbitmq_management

chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/

rabbitmqctl add_user admin StrongPassword

rabbitmqctl set_user_tags admin administrator

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

http://Your_Server_IP:15672/
 


 

Creative Commons license icon Creative Commons license icon