主机名要能解析到本机的ip
要大于1GB内存
rabbitmqctl cluster_status Cluster status of node 'rabbit@jpuyy-rmq-3' ... [ {nodes,[{disc,['rabbit@jpuyy-rmq-1','rabbit@jpuyy-rmq-3']}, {ram,['rabbit@jpuyy-rmq-2','rabbit@jpuyy-set-rmq-1']}]}, {running_nodes,['rabbit@jpuyy-set-rmq-1','rabbit@jpuyy-rmq-1','rabbit@jpuyy-rmq-2','rabbit@jpuyy-rmq-3']}, {cluster_name,<<"rabbit@jpuyy-rmq-1">>}, {partitions,[]} ]
查看队列
rabbitmqctl list_queues -p vhostname
查看 vhosts
rabbitmqctl list_vhosts
查看用户
rabbitmqctl list_users
查看 vhost 的用户权限
rabbitmqctl list_permissions -p myhost
查看某用户的权限
rabbitmqctl list_user_permissions jpuyy
rabbitmqctl add_vhost myvhost rabbitmqctl add_user jpuyy jpuyypass rabbitmqctl set_permissions -p myvhostrabbitmqctl set_permissions -p myvhost jpuyy ".*" ".*" ".*"
使用完整主机名
/etc/rabbitmq/rabbitmq-env.conf 里配置
RABBITMQ_USE_LONGNAME=true
使用固定主机名
/etc/rabbitmq/rabbitmq-env.conf 里配置
NODENAME=rabbit@dl-ftc-prod-01
Leave a Reply