Windows上安装使用rabbitmq

2018-05-15 17:33:36 浏览数 (1)

Windows上安装使用rabbitmq

1.     安装erlang(rabbitmq运行的环境)

2.     安装rabbitmq

3.     使用rabbitmqctl.bat status查看是否正常启动

代码语言:javascript复制
D:Program FilesRabbitMQ Serverrabbitmq_server-3.6.5sbin>rabbitmqctl.bat status 
Status of node ‘rabbit@SKY-20170225WPL’ … 
[{pid,6856}, 
{running_applications,[{rabbit,”RabbitMQ”,”3.6.5”},

4.     启动服务命令

代码语言:javascript复制
D:Program FilesRabbitMQ Serverrabbitmq_server-3.6.5sbin>rabbitmqctl.bat start_app 
Starting node ‘rabbit@SKY-20170225WPL’ …

5.     安装rabbitmq_management管理插件

代码语言:javascript复制
D:Program FilesRabbitMQ Serverrabbitmq_server-3.6.5sbin>rabbitmq-plugins enable rabbitmq_management 
The following plugins have been enabled: 
mochiweb 
webmachine 
rabbitmq_web_dispatch 
amqp_client 
rabbitmq_management_agent 
rabbitmq_management 
Applying plugin configuration to rabbit@SKY-20170225WPL… started 6 plugins.

6.     访问web管理界面

代码语言:javascript复制
http://127.0.0.1:15672/ 地址来访问web管理界面了,默认的账户和密码均是 guest。

7.     获取默认账户列表信息

代码语言:javascript复制
D:Program FilesRabbitMQ Serverrabbitmq_server-3.6.5sbin>rabbitmqctl.bat list_users 
Listing users … 
guest [administrator]

8.     创建一个用户名为qiu,密码为123456的账户

代码语言:javascript复制
D:Program FilesRabbitMQ Serverrabbitmq_server-3.6.5sbin>rabbitmqctl.bat add_user qiu 123456 
Creating user “qiu” …

9.     授予管理员权限

代码语言:javascript复制
D:Program FilesRabbitMQ Serverrabbitmq_server-3.6.5sbin>rabbitmqctl.bat set_permissions -p / qiu “.” “.” “.*” 
Setting permissions for user “qiu” in vhost “/” …

10.  命令集

代码语言:javascript复制
Commands: 
stop [] 
stop_app 
start_app 
wait 
reset 
force_reset 
rotate_logs 
hipe_compile 
join_cluster [–ram] 
cluster_status 
change_cluster_node_type disc | ram 
forget_cluster_node [–offline] 
rename_cluster_node oldnode1 newnode1 [oldnode2] [newnode2 …] 
update_cluster_nodes clusternode 
force_boot 
sync_queue [-p ] queue 
cancel_sync_queue [-p ] queue 
purge_queue [-p ] queue 
set_cluster_name name 
add_user 
delete_user 
change_password 
clear_password 
authenticate_user 
set_user_tags … 
list_users 
add_vhost 
delete_vhost 
list_vhosts [ …] 
set_permissions [-p ] 
clear_permissions [-p ] 
list_permissions [-p ] 
list_user_permissions 
set_parameter [-p ] 
clear_parameter [-p ] 
list_parameters [-p ] 
set_policy [-p ] [–priority ] [–apply-to ]

0 人点赞