配置rabbitmq
我的/etc/rabbitmq 目录没有rabbitmq.config,需要到 /usr/share/doc/rabbitmq-server-3.7.7/ 目录下复制一份模板到 /etc/rabbitmq 目录下进行修改
cd /usr/share/doc/rabbitmq-server-3.7.7/ cp rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
然后
cd /etc/rabbitmq/
vi rabbitmq.config
在rabbitmq.config里面把
{tcp_listeners, [5672]},
{loopback_users, ["admin"]}, 加到里面去
%% -*- mode: erlang -*- %% ---------------------------------------------------------------------------- %% RabbitMQ Sample Configuration File. %% %% See http://www.rabbitmq.com/configure.html for details. %% ---------------------------------------------------------------------------- [ {rabbit, [%% %% Network Connectivity %% ==================== %% %% By default, RabbitMQ will listen on all interfaces, using %% the standard (reserved) AMQP port. %% {tcp_listeners, [5672]}, {loopback_users, ["admin"]}, …… ]} ].
在浏览器了用guest guest登录进localhost:15672,进入admin
在add a user里面加一个就可以了,输入username,password,tags也要改成administrator
就可以在windows里的浏览器里用虚拟机的ip访问rabbitmq了