在CentOS7下安装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

3 检验安装成功


[root@centos7 src]# erl
Erlang/OTP 19 [erts-8.0.3] [source] [64-bit] [async-threads:10]…………
 
Eshell V8.0.3  (abort with ^G)
1>

4 安装 Socat

yum install socat -y

5 下载RabbitMQ

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

6 安装RabbitMQ

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

7 启动RabbitMQ

systemctl  enable rabbitmq-server.service --now

8 启动Dashboard

rabbitmq-plugins enable rabbitmq_management

9 配置账户与权限

# 添加用户admin,密码admin
rabbitmqctl add_user admin admin
 
# 添加权限
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
 
# 修改用户角色
rabbitmqctl set_user_tags admin administrator
 
 
# 其它操作
# 删除一个用户
rabbitmqctl delete_user Username
 
# 修改用户密码
rabbitmqctl change_password Username Newpassword
 
# 查看当前用户列表
rabbitmqctl list_users