Centos 6 通过 yum 安装 Rabbitmq

注意,Erlang版本要与Rabbitmq版本适配,不然各种报错!

1. 安装 Erlang

Rabbitmq 的运行需要 Erlang 环境,首先安装 Erlang。

mkdir -p ~/download

cd ~/download

wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm

rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

 

yum -y install erlang;

2. 安装 Rabbitmq

wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-3.6.9-1.el6.noarch.rpm

rpm  -Uvh rabbitmq-server-3.6.9-1.el6.noarch.rpm

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

yum -y install rabbitmq-server-3.6.9-1.noarch.rpm

启动 Rabbitmq:

/ect/init.d/rabbitmq-server start

chkconfig rabbitmq-server on

开启图形界面支持:

rabbitmq-plugins enable rabbitmq_management

添加用户:

rabbitmqctl add_user admin admin

rabbitmqctl set_user_tags admin administrator

rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

浏览器打开 “http://localhost:15672″, 用帐号“admin”, 密码“admin” 就可以登录了,

!!注意localhost 换成实际地址或ip, rabbitmq 默认提供了 “guest” 帐号,但是只能在localhost 域名下登录,

开启 stomp 支持:

rabbitmq-plugins enable rabbitmq_stomp

你可能感兴趣的:(系统运维)