CentOS7下安装RabbitMQ

  CentOS7下安装RabbitMQ
第一步下载erlang环境并安装:

  rpm -Uvh https://mirrors.aliyun.com/centos/7.6.1810/extras/x86_64/Packages/epel-release-7-11.noarch.rpm

  yum install erlang

  第二步下载RabbitMQ的rpm包并安装:

  wget http://www.rabbitmq.com/releases/rabbitmq-server/current/rabbitmq-server-3.6.15-1.el7.noarch.rpm

  yum install rabbitmq-server-3.6.15-1.el7.noarch.rpm

  第四步打开RabbitMQ管理Web:rabbitmq-plugins enable rabbitmq_management

  默认3.3.0开始不允许guest账户非本地登录,需要修改以下设置

  /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.15/ebin/rabbit.app

  将:{loopback_users, [<<”guest”>>]},
改为:{loopback_users, []} 然后重启服务 systemctl restart rabbitmq-server

  打开RabbitMQ的端口:

  firewall-cmd –zone=public –add-port=5672/tcp –permanent

  firewall-cmd –zone=public –add-port=15672/tcp –permanent

  firewall-cmd –reload