推荐安装 erlang
sudo apt-get install erlang-nox
注册key
wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add -
导入rabbitMQ
sudo apt-get update
sudo apt-get install rabbitmq-server
常用命令
sudo service rabbitmq-server start # 启动
sudo service rabbitmq-server stop # 停止
sudo service rabbitmq-server restart # 重启
sudo systemctl status rabbitmq-server # 状态
#插件
sudo rabbitmq-plugins enable rabbitmq_management
#访问地址
http://localhost:15672/
#查看用户
sudo rabbitmqctl list_users
sudo rabbitmqctl add_user username 123456 # 增加普通用户
sudo rabbitmqctl set_user_tags username administrator # 给普通用户分配管理员角色
sudo rabbitmqctl set_permissions -p "/" username '.*' '.*' '.*' #配置权限
sudo rabbitmqctl list_queues #列出所有队列
sudo rabbitmqctl list_exchanges #列出所有交换机