Rabbitmq 教程
Rabbitmq 官方文档:http://www.rabbitmq.com/documentation.html
Rabbitmq 下载安装:http://www.rabbitmq.com/download.html
Rabbitmq 使用教程:http://www.rabbitmq.com/getstarted.html
Rabbitmq 博客:http://www.rabbitmq.com/blog/
Rabbitmq 安装
基于epel源,安装Rabbitmq
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# 安装依赖环境erlang
yum install erlang -y
# 安装rabbitmq
yum install rabbitmq-server -y
Rabbitmq 使用
- 启动Rabbitmq
/etc/init.d/rabbitmq-server start && chkconfig rabbitmq-server on
- 查看帮助
rabbitmqctl --help | less
rabbitmqctl add_user devops password
- 查看用户
rabbitmqctl list_users
- 改变用户密码
rabbitmqctl change_password devops strongpassword
- 改变用户权限
rabbitmqctl set_user_tags devops administrator
rabbitmqctl delete_user devops
- 使用rabbitmq,添加虚拟主机
rabbitmqctl add_vhost /aniu_vhost
- 查看虚拟主机
rabbitmqctl list_vhosts
- 删除虚拟主机
rabbitmqctl delete_vhost /aniu_vhost
- 给虚拟主机的用户授权
# rabbitmqctl set_permissions [-p vhost] [user] [permission ⇒ (modify) (write) (read)]
rabbitmqctl set_permissions -p /aniu_vhost devops ".*" ".*" ".*"
- 查看虚拟主机权限
rabbitmqctl list_permissions -p /aniu_vhost
- 查看用户具体权限
rabbitmqctl list_user_permissions devops
- 删除权限
rabbitmqctl clear_permissions -p /aniu_vhost devops
RabbitMQ:管理和监测
参考链接:
http://www.jb51.cc/article/p-bynekepo-qq.html
http://www.rabbitmq.com/admin-guide.html