RabbitMq windows 安裝

來源:互聯網
上載者:User

標籤:設定   down   binding   參考   ini   使用   刪除   並且   沒有   

參考官方網址:

http://www.rabbitmq.com/install-windows-manual.html

http://www.rabbitmq.com/install-windows.html

一、 安裝Erlang

Rabbit MQ 是建立在強大的Erlang OTP平台上,因此安裝Rabbit MQ的前提是安裝Erlang。

下載並安裝 Eralng OTP For Windows (otp_win64_20.0)

 

二、 設定環境變數

添加一下系統內容變數(正常安裝的也要檢查下):

 

 

有最好,沒有的話就手動添加。

三、 安裝RabbitMQ

下載並運行安裝 Rabbit MQ Server Windows Installer (v3.6.10)

預設安裝的Rabbit MQ 監聽連接埠是5672

 

四、 配置

1、啟用Rabbit MQ‘s Management Plugin(C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.2.3\sbin\rabbitmq-plugins.bat)

命令:rabbitmq-plugins enable rabbitmq_management

要重啟服務才會生效。

使用瀏覽器開啟http://localhost:15672 訪問Rabbit Mq的管理主控台(預設使用者為guest,密碼:guest)

 

2、使用rabbitmqctl控制台命令(位於C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.2.3\sbin>)

  • 查看使用者列表

rabbitmqctl.bat list_users

  • 增加使用者

rabbitmqctl.bat add_user [username] [password]

 

  • 刪除使用者

rabbitmqctl.bat delete_user [username]

 

  • 修改使用者密碼

rabbitmqctl.bat change_password [username] [newpassword]

 

  • 設定角色

rabbitmqctl.bat set_user_tags [username] [tag1],[tag2]…

 

目前有如下幾種tag,

1)     超級管理員(administrator)

可登陸管理主控台(啟用management plugin的情況下),可查看所有的資訊,並且可以對使用者,策略(policy)進行操作。

2)     監控者(monitoring)

可登陸管理主控台(啟用management plugin的情況下),同時可以查看rabbitmq節點的相關資訊(進程數,記憶體使用量情況,磁碟使用方式等)

3)     策略制定者(policymaker)

可登陸管理主控台(啟用management plugin的情況下), 同時可以對policy進行管理。但無法查看節點的相關資訊(紅框標識的部分)。

4)     普通管理者(management)

僅可登陸管理主控台(啟用management plugin的情況下),無法看到節點資訊,也無法對策略進行管理。

5)     其他的

無法登陸管理主控台。

如是官方網站上給出各個角色的解釋:

Tag

Capabilities

(None)

No access to the management plugin

management

Anything the user could do via AMQP plus:

  • List virtual hosts to which they can log in via AMQP
  • View all queues, exchanges and bindings in "their" virtual hosts
  • View and close their own channels and connections
  • View "global" statistics covering all their virtual hosts, including activity by other users within them

policymaker

Everything "management" can plus:

  • View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP

monitoring

Everything "management" can plus:

  • List all virtual hosts, including ones they could not log in to via AMQP
  • View other users‘s connections and channels
  • View node-level data such as memory use and clustering
  • View truly global statistics for all virtual hosts

administrator

Everything "policymaker" and "monitoring" can plus:

  • Create and delete virtual hosts
  • View, create and delete users
  • View, create and delete permissions
  • Close other users‘s connections

還有其他命令,請需要的時候查閱。

五、 安裝過程遇到問題

1、啟用Rabbit MQ‘s Management Plugin時出現如下錯誤:

Applying plugin configuration to [email protected] failed.
 * Could not contact node [email protected]
   Changes will take effect at broker restart.
 * Options: --online  - fail if broker cannot becontacted.
            --offline - do nottry to contact broker.

在網上找了下面資料,本機做了如下操作後成功,具體是哪個操作奏效也不太清楚:

  • 同步Erlang Cookies

具體操作:將 C:\WINDOWS\.erlang.cookie   同步到RabbitMq 啟動使用者 例如win10:C:\Users\%USERNAME%\.erlang.cookie

  •  卸載RabbitMQ service 重新安裝

rabbitmq-servicestop

rabbitmq-serviceremove

rabbitmq-serviceinstall

rabbitmq-servicestart

RabbitMq windows 安裝

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.