安装如下步骤:
首先安装erlang
1
|
yum install erlang
|
安装rabbitmq rpm包
1
2
|
wget http:
//www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-3.5.0-1.noarch.rpm
rpm -ivh rabbitmq-server-3.5.0-1.noarch.rpm
|
启动rabbitmq
1
|
service rabbitmq-server start
|
注:如果启动失败,报错如下:
则修改hosts,添加hostname:
1
|
vi /etc/hosts
|
添加hostname:
再次重启即可:
打开5672端口
1
2
3
|
/sbin/iptables -I INPUT -p tcp --dport 5672 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
|
启用插件
1
|
rabbitmq-plugins enable rabbitmq_management
|
重启rabbitmq
1
|
service rabbitmq-server restart
|
web访问
无法登录请使用如下:
1
|
vim /etc/rabbitmq/rabbitmq.config
|
写入如下信息并保存:
1
|
[{rabbit, [{loopback_users, []}]}].
|
再重启:
再次访问即可: