一、安裝erlang
以root身份執行下面命令
yum install erlang
yum install erlang xmlto
二、安裝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
三、安裝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
四、啓動rabbitmq,並驗證啓動狀況
rabbitmq-server --detached &ps aux |grep rabbitmq
五、以服務的方式啓動
service rabbitmq-server start
六、檢查端口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
七、啓用維護插件
rabbitmq-plugins enable rabbitmq_management
八、重啓rabbitmq
service rabbitmq-server restart
九、登陸
http://192.168.110.60:15672/ 用戶名密碼 guest
沒法登錄解決辦法
vim /etc/rabbitmq/rabbitmq.config
寫入信息,並保存
[{rabbit, [{loopback_users, []}]}].vim
----------------------------------------------------------------------------分割線----------------------------------------------------------------------------服務器
一、服務器啓動與關閉
啓動:service rabbitmq-server start
關閉:service rabbitmq-server stop
重啓:service rabbitmq-server restart
二、用戶管理
新增 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] admintcp