rabbitmq 安装 及采坑

1、下载erlang 

wget http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm
2、安装erlang 

rpm -ivh erlang-19.0.4-1.el7.centos.x86_64.rpm
测试erlang

[root@centos7 src]# erl
Erlang/OTP 19 [erts-8.0.3] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.0.3 (abort with ^G)
1>
3、下载rabbitmq

wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm

4、安装rabbitmq

rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch.rpm

#错误:依赖检测失败:socat 被 rabbitmq-server-3.6.6-1.el7.noarch 需要

yum install socat -y
5、启动

systemctl start rabbitmq-server #启动
systemctl status rabbitmq-server #状态
systemctl stop rabbitmq-server #关闭
6、配置网页插件(从网页登陆端口号:15672)

rabbitmq-plugins enable rabbitmq_management #启用插件
配置防火墙 

vi /etc/sysconfig/iptables  #添加端口
-A INPUT -p tcp -m state --state NEW -m tcp --dport 15672 -j ACCEPT
systemctl restart iptables #重启生效
配置访问账号密码和权限

rabbitmqctl add_user mq mq123   #添加用户mq,密码mq123
rabbitmqctl set_permissions -p / mq ".*" ".*" ".*"  #添加权限
rabbitmqctl set_user_tags mq administrator  #修改用户角色


#其它操作
rabbitmqctl delete_user Username #删除一个用户
rabbitmqctl change_password Username Newpassword #修改用户密码
rabbitmqctl list_users #查看当前用户列表
登陆

http://192.168.1.72:15672    地址:http://ip:15672

 

posted @ 2020-09-30 15:43  飞叶-枯寂  阅读(344)  评论(0编辑  收藏  举报