1.环境:Ubuntu12.04 Erlang版本:V5.85
2.下载RabbitMQ Server :wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.7.1/rabbitmq-server-generic-unix-2.7.1.tar.gz
3.解压后可以直接使用,所有可执行文件在sbin文件夹下,为方便使用将sbin路径添加到/etc/profile中,注意:如果没有设置rabbitmq帐号的话,会提醒只有root和rabbitmq用户才能启动服务。也可以直接sudo启动。
4.启动web管理插件:./rabbitmq-plugins enable rabbitmq-management
成功出现:
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_mochiweb
amqp_client
rabbitmq_management_agent
rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect
可能出现问题:Error: “The following plugins could not be found:\n rabbitmq-management\n\n”
解决:在sbin下执行 ./rabbitmq-plugins list
[ ] amqp_client 2.7.1
[ ] eldap 2.7.1-git
[ ] erlando 2.7.1
[ ] mochiweb 1.3-rmq2.7.1-git
[ ] rabbitmq_auth_backend_ldap 2.7.1
[ ] rabbitmq_auth_mechanism_ssl 2.7.1
[ ] rabbitmq_consistent_hash_exchange 2.7.1
[ ] rabbitmq_federation 2.7.1
[ ] rabbitmq_jsonrpc 2.7.1
[ ] rabbitmq_jsonrpc_channel 2.7.1
[ ] rabbitmq_jsonrpc_channel_examples 2.7.1
[ ] rabbitmq_management 2.7.1
[ ] rabbitmq_management_agent 2.7.1
[ ] rabbitmq_management_visualiser 2.7.1
[ ] rabbitmq_mochiweb 2.7.1
[ ] rabbitmq_shovel 2.7.1
[ ] rabbitmq_shovel_management 2.7.1
[ ] rabbitmq_stomp 2.7.1
[ ] rabbitmq_tracing 2.7.1
[ ] rfc4627_jsonrpc 2.7.1-git
[ ] webmachine 1.7.0-rmq2.7.1-hg
可以看出rabbitmq_management已经有了。
可能出现的错误: ./rabbitmq-plugins enable rabbitmq_management
Error: {cannot_write_enabled_plugins_file,”/etc/rabbitmq/enabled_plugins”,
enoent}
解决:手动在建立,sudo mkdir /etc/rabbitmq 然后重新enable就可以了
注意:rabbitmq server从3.0后登陆网页控制台的端口变为55672,初始帐号和密码都为:guest