1焕蹄、安裝erlang
以root身份執(zhí)行下面命令
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缰盏、重啟rabbitmqservice 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