RabbitMQ安装及启用web管理界面

Arch Linux安装 RabbitMQ

pacman -S rabbitmq  

查看RabbitMQ启用插件列表命令

rabbitmq-plugins list  

启用RabbitMQ WEB管理界面

rabbitmq-plugins enable rabbitmq_management  

启用rabbitmq_management后需重启RabbitMQ服务。

systemctl restart rabbitmq  

或者

rabbitmq-server -detached  

进入RabbitMQ WEB管理界面

打开http://127.0.0.1:15672,用户名和密码皆是guest

错误解决

重启RabbitMQ有时候会遇到以下报错

{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,365}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,333}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}}}}},{kernel,start,[normal,[]]}}

解决方案:

chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie  

查看RabbitMQ服务状态

rabbitmqctl status