一、下载(使用rpm安装)
链接:https://pan.baidu.com/s/1Ww5cK2UJ3bGbbUaAOXRI_g
提取码:ncqs
二、安装
1.在存放rpm目录中执行:
rpm -Uvh *.rpm
注:如报错如下:
error: Failed dependencies: erlang >= 21.3 is needed by rabbitmq-server-3.8.1-1.el7.noarch socat is needed by rabbitmq-server-3.8.1-1.el7.noarch
需要按顺序安装:
- rpm -Uvh erlang-21.3.8.6-1.el7.x86_64.rpm
- rpm -Uvh openssl-1.0.2k-19.el7.x86_64.rpm
- rpm -Uvh openssl-libs-1.0.2k-19.el7.x86_64.rpm
- rpm -Uvh socat-1.7.3.2-2.el7.x86_64.rpm
- rpm -Uvh rabbitmq-server-3.8.1-1.el7.noarch.rpm
2.显示所有插件:
rabbitmq-plugins list
3.开启rabbitmq管理界面:
rabbitmq-plugins enable rabbitmq_management
4.设置rabbitmq开机自启动:
chkconfig rabbitmq-server on
5.启动rabbitmq:
rabbitmq-server start
访问 http://
登录遇到问题:User can only log in via localhost。
原因:rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问
解决方法:
找到这个文件rabbit.app
vi /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.1/ebin/rabbit.app
将:{loopback_users, [<<”guest”>>]},
改为:{loopback_users, []},如图:
6.重启服务:
systemctl restart rabbitmq-server.service