安装环境 CentOS7

1.下载安装

1.下载 Erlang solution
  1. # yum -y install wget
  2. # wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm

2.安装 Erlang solution
# rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
# yum install epel-release        
# yum install erlang

3.下载 Rabbit
# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm

4.安装 Rabbit
# yum install rabbitmq-server-3.6.6-1.el7.noarch.rpm

2.修改配置

1.开启 允许远程访问(非必须操作)
# vi /etc/rabbitmq/rabbitmq.config

添加下面内容
[{rabbit,[{loopback_users,[]}]}].

2.开启web端管理访问(非必须,如需开启,先执行上一操作)
# rabbitmq-plugins enable rabbitmq_management

3.安装消息延迟插件
# cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.6/plugins/
# wget https://dl.bintray.com/rabbitmq/community-plugins/rabbitmq_delayed_message_exchange-0.0.1.ez
# rabbitmq-plugins enable rabbitmq_delayed_message_exchange

4.放行端口(防火墙没开忽略)
firewall-cmd --add-port=15672/tcp --permanent
firewall-cmd --add-port=5672/tcp --permanent

3.开始使用

1.启动
# service rabbitmq-server start
# systemctl status rabbitmq-server.service

2.查看状态
# service rabbitmq-server status
# systemctl status rabbitmq-server.service