转:http://blog.csdn.net/ffggnfgf/article/details/50554327
1、安装erlang
以root身份执行下面命令
yum install erlang
yum install erlang xmlto
2、安装epel源
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
3、安装rabbitmq rpm包
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5-1.noarch.rpm
rpm -ivh rabbitmq-server-3.1.5-1.noarch.rpm
4、启动rabbitmq,并验证启动情况
rabbitmq-server --detached &ps aux |grep rabbitmq
5、以服务的方式启动
service rabbitmq-server start
6、检查端口5672是否打开
/sbin/iptables -I INPUT -p tcp --dport 5672 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
/etc/init.d/iptables status
7、启用维护插件
rabbitmq-plugins enable rabbitmq_management
8、重启rabbitmq
service rabbitmq-server restart
9、登录
http://192.168.110.60:15672/ 用户名密码 guest
无法登陆解决办法
vim /etc/rabbitmq/rabbitmq.config
写入信息,并保存
[{rabbit, [{loopback_users, []}]}].
----------------------------------------------------------------------------分割线----------------------------------------------------------------------------
1、服务器启动与关闭
启动:service rabbitmq-server start
关闭:service rabbitmq-server stop
重启:service rabbitmq-server restart
2、用户管理
新增 rabbitmqctl add_user admin admin
删除 rabbitmqctl delete_user admin
修改 rabbitmqctl change_password admin admin123
用户列表 rabbitmqctl list_users
设置角色 rabbitmqctl set_user_tags admin administrator monitoring policymaker management
设置用户权限 rabbitmqctl set_permissions -p VHostPath admin ConfP WriteP ReadP
查询所有权限 rabbitmqctl list_permissions [-p VHostPath]
指定用户权限 rabbitmqctl list_user_permissions admin
清除用户权限 rabbitmqctl clear_permissions [-p VHostPath] admin
网友评论