CentOS安装RabbitMQ

基于CentOS Linux release 7.3.1611

1、下载安装Erlang
rpm -Uvh http://mirror.centos.org/centos/7/extras/x86_64/Packages/epel-release-7-9.noarch.rpm
yum install erlang

2、下载安装rabbitMQ
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el6.noarch.rpm
yum install rabbitmq-server-3.6.10-1.el6.noarch.rpm

完成后启动服务:
service rabbitmq-server start

可以查看服务状态:
service rabbitmq-server status

开放guest用户给其他机器使用:
vi /etc/rabbitmq/rabbitmq.config
添加:
[{rabbit, [{loopback_users, []}]}].

重启
service rabbitmq-server stop
service rabbitmq-server start

开放5672端口给其他机器访问:
firewall-cmd –zone=public –add-port=5672/tcp –permanent
firewall-cmd –reload

开启后台管理web界面(15672端口):
rabbitmq-plugins enable rabbitmq_management
firewall-cmd –zone=public –add-port=15672/tcp –permanent
firewall-cmd –reload