Centos下rabbitmq安装配置

安装依赖

yum install erlang

rabbitmq官网下载 http://www.rabbitmq.com/install-rpm.html

wget http://www.rabbitmq.com/releases/rabbitmq-server/版本号/rabbitmq-server-版本.noarch.rpm

yum install rabbitmq-server-版本.noarch.rpm

加入开机启动

chkconfig rabbitmq-server on

启动

service rabbitmq-server start

常用命令

启动服务

rabbitmq-server start &

停止服务

rabbitmq-server stop &

查看队列中的数据

rabbitmqctl list_queues

查看节点状态

rabbitmqctl status

查看分布式节点状态

rabbitmqctl cluster_status

停止应用

rabbitmqctl stop_app

启动应用

rabbitmqctl start_app

重设应用

rabbitmqctl reset

加入分布式节点

rabbitmqctl cluster 节点标识

具体参考

rabbitmqctl –help

查看未确认消息

rabbitmqctl list_queues -p / name

添加修改用户

rabbitmqctl delete_user  guest
rabbitmqctl add_user admin 123456
rabbitmqctl set_user_tags admin administrator

添加权限

rabbitmqctl set_permissions [-p vhost] {user} {conf} {write} {read}

修改密码

rabbitmqctl change_password guest 123456

你可能感兴趣的:(centos,rabbitmq)