[root@linuxmaster modules]# rabbitmq-plugins enable rabbitmq_management #开启rabbitmq的web管理插件 The following plugins have been enabled: mochiweb webmachine rabbitmq_web_dispatch rabbitmq_management_agent rabbitmq_management Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
[root@linuxmaster modules]# /etc/init.d/rabbitmq-server restart Restarting rabbitmq-server: SUCCESS rabbitmq-server.
[root@puppetserver rabbitmq]# tailf /var/log/rabbitmq/rabbit\@puppetserver.log #可以从日志看到stomp插件加载成功 =INFO REPORT==== 25-Nov-2013::15:49:54 === Server startup complete; 7 plugins started. * amqp_client * mochiweb * rabbitmq_management * rabbitmq_management_agent * rabbitmq_stomp * rabbitmq_web_dispatch * webmachine
[root@linuxmaster modules]# netstat -nlp | grep beam tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 4691/beam tcp 0 0 0.0.0.0:55672 0.0.0.0:* LISTEN 4691/beam tcp 0 0 0.0.0.0:57372 0.0.0.0:* LISTEN 4691/beam tcp 0 0 :::61613 :::* LISTEN 4691/beam tcp 0 0 :::5672 :::* LISTEN 4691/beam
备注:55672为web管理端口
[root@linuxmaster1poc modules]# rabbitmqctl add_user web_admin 123.com #添加web监听账户 Creating user "web_admin" ... ...done.
[root@linuxmaster modules]# rabbitmqctl set_user_tags web_admin monitoring #设置用户角色 Setting tags for user "web_admin" to [monitoring] ... ...done.
[root@puppetserver sbin]# rabbitmqctl list_users #查看监听用户 Listing users ... mcollective [] web_admin [monitoring] ...done.
添加用户:
rabbitmqctl add_user admin 123456
rabbitmqctl set_user_tags admin administrator
如需更改密码:
rabbitmqctl change_password admin adminpass
编辑vi /etc/rabbitmq/rabbitmq.config (如果没有此文件创建既可)
[{rabbit, [{loopback_users, []}]}].
重启服务:
sudo service rabbitmq-server restart
在IE浏览器输入http://IP:15672/ 进行访问