需先安装erlang:sudo apt install erlang
完成后在控制台输入命令检查:erl
安装RabbitMQ:sudo apt install rabbitmq-server
查看服务状态:service rabbitmq-server status
添加用户以便远程访问:
账号密码都是admin:sudo rabbitmqctl add_user admin admin
sudo rabbitmqctl set_user_tags admin administrator
sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
浏览器输入:http://服务器iP:15672 即可登录(账号密码 admin/admim)
启动:sudo rabbitmq-server start
关闭: sudo rabbitmq-server stop
重启: sudo rabbitmq-server restart
查看状态:sudo rabbitmqctl status
ERROR: node with name "rabbit" already running的解决方法
启动终端:
输入命令:sudo rabbitmqctl status
然后输入:sudo rabbitmqctl stop
在输入:rabbitmq-server就可以启动了