Rabbitmq安装攻略
关于Rabbitmq的安装方法,直白说就是先装erlang,再装rabbitmq,但是很多人依然费心费力。
本文以redhat7环境为例,提供一种方法解决大家的痛苦(其实就是搬运自官网https://www.rabbitmq.com/download.html,其中redhat linux见https://www.rabbitmq.com/install-rpm.html,只是官网一方面是英文,需要从中挑选步骤,另一方面大家转载的有各种错误)。
验证日期:2021年1月5日
注意事项:
SELinux会阻止RabbitMQ绑定到端口。需要关闭SELinux,否则节点将无法启动。
firewall也需要关闭,否则会阻止节点和CLI工具相互通信。
设置命令:
[root@localhost roo]# vi /etc/sysconfig/selinux
[root@localhost roo]# systemctl stop firewalld
[root@localhost roo]# systemctl disable firewalld
检查命令:
[roo@localhost ~]$ getenforce
Disabled
[roo@localhost ~]$ systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
一、安装Erlang
Install Erlang
Before installing RabbitMQ, you must install a supported version of Erlang/OTP. There are three commonly used sources for Erlang packages on RPM-based distributions.
- Team RabbitMQ produces a package stripped down to only provide those components needed to run RabbitMQ. It might