RabbitMQ安装配置手记

最近考察消息队列,选来选去选中了RabbitMQ,简单记一下安装、配置过程:

1.编译安装erlang环境,此处略

2.下载rabbitmq-server-generic-unix-2.3.1.tar.gz,解压后进入sbin,执行rabbitmq-server

3.通过rabbitmqctl命令创建用户、vhost并设置权限:

[shell]
./rabbitmqctl add_user user user123
./rabbitmqctl add_vhost /user/topic/
./rabbitmqctl set_permissions -p /user/topic/ user "." "." ".*"
[/shell]

如果需要修改默认的设置,如日志、持久化的路径,可以修改/etc/rabbitmq/rabbitmq.conf文件:

[code]
RABBITMQ_NODENAME=my_topic
RABBITMQ_MNESIA_BASE=/data/rabbitmq_server-2.3.1/data/db
RABBITMQ_LOG_BASE=/data/rabbitmq_server-2.3.1/data/logs
[/code]

加载评论框需要翻墙