標籤:設定 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.
在網上找了下面資料,本機做了如下操作後成功,具體是哪個操作奏效也不太清楚:
具體操作:將 C:\WINDOWS\.erlang.cookie 同步到RabbitMq 啟動使用者 例如win10:C:\Users\%USERNAME%\.erlang.cookie
rabbitmq-servicestop
rabbitmq-serviceremove
rabbitmq-serviceinstall
rabbitmq-servicestart
RabbitMq windows 安裝