官网下载:根据对应的系统版本下载相应的rpm包 http://www.rabbitmq.com
采用yum源安装方式进行安装
首先安装Erlang依赖语言环境
Erlang 20.x 版本要和下载rabbitmq版本相对应
Note that OTP 20 is supported by RabbitMQ starting with version 3.6.11.
To use Erlang 20.x on CentOS 7:
# In /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
yum clean all && yum makecache
yum install erlang
Install RabbitMQ Server
With rpm and Downloaded RPM
After downloading the server package, issue the following command as'root':
rpm --import https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
# this example assumes the CentOS 7 version of the package
yum install rabbitmq-server-3.7.6-1.el7.noarch.rpm
systemctl enable rabbitmq
systemctl start rabbitmq
rabbitmq-plugins enable rabbitmq_management 开启 lsof -i:15672
浏览器 localhost:15672 用户guest 密码guest
Port Access
- 4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
- 5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
- 25672: used for inter-node and CLI tools communication (Erlang distribution server port)and is allocated from a dynamic range (limited to a single port by default,computed as AMQP port + 20000). Unless external connections on these ports are really necessary (e.g.the cluster uses federation or CLI tools are used on machines outside the subnet),these ports should not be publicly exposed. See networking guide for details.
- 35672-35682: used by CLI tools (Erlang distribution client ports) for communication with nodesand is allocated from a dynamic range (computed as server distribution port + 10000 throughserver distribution port + 10010). See networking guide for details.
- 15672: HTTP API clients, management UI and rabbitmqadmin (only if the management plugin is enabled)
- 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
- 1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
- 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
- 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)