CentOS 6.7 安装 RabbitMQ

1、下载安装包
http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el6.x86_64.rpm
http://www.rabbitmq.com/releases/erlang/esl-erlang-compat-18.1-1.noarch.rpm
2、安装 Erlang
yum localinstall -y  erlang-19.0.4-1.el6.x86_64.rpm   
yum localinstall -y esl-erlang-compat-18.1-1.noarch.rpm
3、安装socat
yum install scout
 
4、安装rabbitmq
wget  http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-3.6.15-1.el6.noarch.rpm
rpm -ivh rabbitmq-server-3.6.15-1.el6.noarch.rpm     
 
5、启动
配置host:
先看下自己的主机名:hostname,我的主机名是:shortmv
先修改一下 host 文件:vim /etc/hosts,添加一行:127.0.0.1 shortmv
启动命令:
service rabbitmq-server start
 
重启 RabbitMQ 服务:
service rabbitmq-server restart
 
5、rabbitmq配置
从3.3.1版本以后,不能通过guest/guest访问了。
a、创建用户
rabbitmqctl add_user admin admin123
b、设置tags
rabbitmqctl set_user_tags admin administrator
c、设置权限
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*”
 
eg:
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
 
6、配置RabbitMQ web管理插件
    rabbitmq-plugins enable rabbitmq_management
 
7、测试
http://ip:15672
 
测试环境: http://127.0.01:15672
 
参考地址:
a.  http://www.rabbitmq.com/releases/erlang/
b.  http://www.rabbitmq.com/releases/

你可能感兴趣的:(rabbitmq)