3、RabbitMQ使用

RabbitMQ使用

1. 服務啓動: rabbitmq-server start &
2. 服務中止: rabbitmqctl stop_app
3. 管理插件: rabbitmq-plugins enable rabbitmq_management
4. 控制訪問地址: http://127.0.0.1:15672node

1、啓動服務

rabbitmq-server start &
root@root server]# rabbitmq-server start &
[1] 11420
[root@root server]#
  ##  ##
  ##  ##      RabbitMQ 3.7.14. Copyright (C) 2007-2019 Pivotal Software, Inc.
  ##########  Licensed under the MPL.  See https://www.rabbitmq.com/
  ######  ##
  ##########  Logs: /var/log/rabbitmq/rabbit@tangchao.log
                    /var/log/rabbitmq/rabbit@tangchao_upgrade.log

              Starting broker...
 completed with 0 plugins.

2、啓動管控臺插件

rabbitmq-plugins enable rabbitmq_management
[root@tangchao server]# rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@tangchao:
rabbitmq_management
The following plugins have been configured:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@tangchao...
The following plugins have been enabled:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch

started 3 plugins.

啓動成功以後輸入118.xxx.xx.xxx:15672
默認帳號密碼guest/guest

User can only log in via localhost,默認狀況下guest只能經過localhost登陸
須要修改rabbitmq.app配置文件web

vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.14/ebin/rabbit.app

{loopback_users, [<<」guest」>>]}
改成:{loopback_users, []}
重啓rabbitMQvim

service rabbitmq-server restart

從新登陸進入管控臺頁面 以下:
app

相關文章
相關標籤/搜索