centos7安装rabbitmq3.7.3

安装erlang

1
2
3
4
5
6
7
8
9
# vim /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
# yum install erlang

安装rabbitmq服务

1
2
# rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
# yum install rabbitmq-server-3.7.3-1.el7.noarch.rpm

开机启动

1
# systemctl enable rabbitmq-server.service

web插件

1
# rabbitmq-plugins enable rabbitmq_management

配置文件位置

1
2
3
4
node : rabbit@example
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/advanced.config
: /etc/rabbitmq/rabbitmq.conf

访问控制台

默认用户名和密码: guest/guest;
需要注意的是:guest用户仅仅提供localhost作为ip登录;
如果远程登录,如:http://192.168.241.101:15672/, 则会提示错误,登录不了:

1
2
3
# 如下是日志输出
=WARNING REPORT==== 21-Oct-2017::23:31:33 ===
HTTP access denied: user 'guest' - User can only log in via localhost

访问控制可参考:Access Control (Authentication, Authorisation) in RabbitMQ

1
2
# /etc/rabbitmq/rabbitmq.conf
loopback_users = none

到此搭建成功
这里写图片描述这里写图片描述

权限配置

创建用户

1
# rabbitmqctl add_user admin 123456

赋予角色

1
# rabbitmqctl set_user_tags admin administrator

查看用户

1
# rabbitmqctl list_users

参考文档

1
http://blog.csdn.net/zyz511919766/article/details/42292655

错误

  1. [error] Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces
1
# chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
阅读更多
上一篇zookeeper集群搭建
下一篇linux远程登录免密配置
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭