RabbitMQ概念及环境搭建(二)RabbitMQ Broker管理
来源:互联网 发布:java终止线程 编辑:程序博客网 时间:2024/05/20 13:15
rabbitmqctl [-n node] [-q] {command} [command options...]
1.停Server
rabbitmqctl stop
2.查看状态
rabbitmqctl status
其他常用项
sudo rabbitmqctl list_queues
sudo rabbitmqctl list_exchanges
sudo rabbitmqctl list_bindings
...
3.UI
rabbitmq-management plugin
基于HTTP的RabbitMQ server管理和监控工具
包含基于浏览器的用户界面和命令行工具rabbitmqadmin.
启用
sudo rabbitmq-plugins enable rabbitmq_management
http://server-name:15672/api #HTTP API
http://server-name:15672/cli #rabbitmqadmin
提示
默认guest账户只能从localhost登录,需先添加用户用赋予相应权限
可通过配置rabbitmq.config改变rabbitmq-management plugin默认行为
4.用户管理(增删改查)
新增用户
rabbitmqctl add_user Username Password
删除用户
rabbitmqctl delete_user Username
修改密码
rabbitmqctl change_password Username Newpassword
查看用户列表
rabbitmqctl list_users
5.用户角色
分为五类,其他、management、policymaker、monitoring、administrator、
各自的权限如下:
(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
设置用户角色
rabbitmqctl set_user_tags User Tag
Tag为角色名administrator,monitoring,policymaker,management或其他自定义名称
可给同一用户设置多个角色,如:
rabbitmqctl set_user_tags testmq monitoring policymaker administrator
参考:
http://www.rabbitmq.com/management.html
6.用户权限
指用户对exchange,queue的操作权限,包括配置权限,读写权限。
配置权限会影响到exchange,queue的声明和删除。
读写权限影响到从queue里取消息,向exchange发送消息以及queue和exchange的绑定(bind)操作。
例如:
将queue绑定到某exchange上,需要具有queue的可写权限,以及exchange的可读权限;
向exchange发送消息需要具有exchange的可写权限;
从queue里取数据需要具有queue的可读权限.
设置用户权限
rabbitmqctl set_permissions -p VHostPath User ConfP WriteP ReadP
查看(指定hostpath)所有用户的权限信息
rabbitmqctl list_permissions [-p VHostPath]
查看指定用户的权限信息
rabbitmqctl list_user_permissions User
清除用户的权限信息
rabbitmqctl clear_permissions [-p VHostPath] User
参考:
http://www.rabbitmq.com/access-control.html
1.停Server
rabbitmqctl stop
2.查看状态
rabbitmqctl status
其他常用项
sudo rabbitmqctl list_queues
sudo rabbitmqctl list_exchanges
sudo rabbitmqctl list_bindings
...
3.UI
rabbitmq-management plugin
基于HTTP的RabbitMQ server管理和监控工具
包含基于浏览器的用户界面和命令行工具rabbitmqadmin.
启用
sudo rabbitmq-plugins enable rabbitmq_management
访问
http://server-name:15672/http://server-name:15672/api #HTTP API
http://server-name:15672/cli #rabbitmqadmin
提示
默认guest账户只能从localhost登录,需先添加用户用赋予相应权限
可通过配置rabbitmq.config改变rabbitmq-management plugin默认行为
4.用户管理(增删改查)
新增用户
rabbitmqctl add_user Username Password
删除用户
rabbitmqctl delete_user Username
修改密码
rabbitmqctl change_password Username Newpassword
查看用户列表
rabbitmqctl list_users
5.用户角色
分为五类,其他、management、policymaker、monitoring、administrator、
各自的权限如下:
(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
设置用户角色
rabbitmqctl set_user_tags User Tag
Tag为角色名administrator,monitoring,policymaker,management或其他自定义名称
可给同一用户设置多个角色,如:
rabbitmqctl set_user_tags testmq monitoring policymaker administrator
参考:
http://www.rabbitmq.com/management.html
6.用户权限
指用户对exchange,queue的操作权限,包括配置权限,读写权限。
配置权限会影响到exchange,queue的声明和删除。
读写权限影响到从queue里取消息,向exchange发送消息以及queue和exchange的绑定(bind)操作。
例如:
将queue绑定到某exchange上,需要具有queue的可写权限,以及exchange的可读权限;
向exchange发送消息需要具有exchange的可写权限;
从queue里取数据需要具有queue的可读权限.
设置用户权限
rabbitmqctl set_permissions -p VHostPath User ConfP WriteP ReadP
查看(指定hostpath)所有用户的权限信息
rabbitmqctl list_permissions [-p VHostPath]
查看指定用户的权限信息
rabbitmqctl list_user_permissions User
清除用户的权限信息
rabbitmqctl clear_permissions [-p VHostPath] User
参考:
http://www.rabbitmq.com/access-control.html
1 0
- RabbitMQ概念及环境搭建(二)RabbitMQ Broker管理
- RabbitMQ概念及环境搭建 -- RabbitMQ cluster
- RabbitMQ概念及环境搭建(三)RabbitMQ cluster
- RabbitMQ概念及环境搭建(四)RabbitMQ High Availability
- RabbitMQ Broker管理
- RabbitMQ概念及环境搭建(一)单节点安装与配置
- RabbitMQ概念及环境搭建(五)与web的整合
- Spring Boot RabbitMQ 入门(二) 环境搭建
- RabbitMQ(二)RabbitMQ基础概念详细介绍
- RabbitMQ搭建和管理
- RabbitMQ环境搭建
- rabbitmq环境搭建--安装
- liunx rabbitmq环境搭建
- RabbitMQ概念及流程(个人理解)
- rabbitmq 管理 及 常用命令
- rabbitmq 管理 及 常用命令
- rabbitmq 管理 及 常用命令
- rabbitmq 管理 及 常用命令
- android控件开发之progress
- java对象的强引用,软引用,弱引用和虚引用
- Android 仿QQ侧边栏,自定义view的学习 <Garry进阶(三)>
- 编写 ATL ActiveX 控件
- Android学习笔记(三)——理解android中的Menu
- RabbitMQ概念及环境搭建(二)RabbitMQ Broker管理
- MySQL5.6.12促成CPU的使用率 2000%的原因
- Eclipse中ndk配置
- C++技术问题总结-第14篇 常用设计模式及其应用场景
- .htaccess和license文件编写
- 织梦dedecms不能给图片加水印的一个原因
- 为sharepoint 2013 开启 State Service
- 腾讯2014校园招聘笔试试题
- Android中实现可滑动的Tab的3种方式