Reprinted from: http://haili.me/archives/tag/rabbitmqctl
Install rabbitmq-server first. I won't write it here. There are related steps in a previous article: RabbitMQ installation and configuration
If /etc/rabbitmq does not exist, the following error will be reported:
Error: {cannot_write_enabled_plugins_file,”/etc/rabbitmq/enabled_plugins”, enoent}
1
2 |
mkdir
/
etc
/
rabbitmq
cd / usr / local / rabbitmq / sbin / |
enable this plugin
1
|
.
/
rabbitmq-plugins
enable
rabbitmq_management
|
If you want to disable this command
1
|
.
/
rabbitmq-plugins disable rabbitmq_management
|
View installed plugins
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
.
/
rabbitmq-plugins list
[ e ] amqp_client 0.0.0 [ ] eldap 0.0.0-git [ ] erlando 0.0.0 [ e ] mochiweb 1.3 -rmq0.0.0-git [ ] rabbitmq_auth_backend_ldap 0.0.0 [ ] rabbitmq_auth_mechanism_ssl 0.0.0 [ ] rabbitmq_consistent_hash_exchange 0.0.0 [ ] rabbitmq_federation 0.0.0 [ ] rabbitmq_jsonrpc 0.0.0 [ ] rabbitmq_jsonrpc_channel 0.0.0 [ ] rabbitmq_jsonrpc_channel_examples 0.0.0 [ E ] rabbitmq_management 0.0.0 [ e ] rabbitmq_management_agent 0.0.0 [ ] rabbitmq_management_visualiser 0.0.0 [ e ] rabbitmq_mochiweb 0.0.0 [ ] rabbitmq_shovel 0.0.0 [ ] rabbitmq_shovel_management 0.0.0 [ ] rabbitmq_stomp 0.0.0 [ ] rabbitmq_tracing 0.0.0 [ ] rfc4627_jsonrpc 0.0.0-git [ e ] webmachine 1.7.0-rmq0.0.0-hg |
Stop RabbitMQ
1
|
.
/
rabbitmqctl stop
|
Start RabbitMQ
1
|
.
/
rabbitmq-server
-detached
|
Visit: http://127.0.0.1:55672/ The default login name and password are both guest
If the newly added user does not go in because the permission is not given, just execute the following permission
1
|
.
/
rabbitmqctl set_user_tags newuser administrator
|
The command to manage the command line tool rabbitmqctl can be found here: Use of the rabbitmqctl command