rabbitmq安装

 

Step1:安装erlang

选择在Centos7 上安装:

vi /etc/yum.repos.d/rabbitmq-erlang.repo

添加

# In /etc/yum.repos.d/rabbitmq-erlang.repo

[rabbitmq-erlang]

name=rabbitmq-erlang

baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/21/el/7

gpgcheck=1

gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc

repo_gpgcheck=0

enabled=1

然后执行:

sudo yum install erlang

Step2: 安装rabbitmq

下载网址:http://www.rabbitmq.com/install-rpm.html

安装rpm

cd /usr/local

mkdir rabbitmq

cd rabbitmq

rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc

sudo yum install rabbitmq-server-3.7.8-1.el7.noarch.rpm

Step3: 开启服务

service rabbitmq-server stop/start

Step4 Rabbit管理(非必须)

查看防火墙端口

firewall-cmd --list-ports

开启端口

firewall-cmd --permanent --add-port=5672/tcp

firewall-cmd --permanent --add-port=15672/tcp

sudo firewall-cmd --reload

启用web管理插件

rabbitmq-plugins enable rabbitmq_management

创建用户(服务需要启动)

rabbitmqctl add_user rabbit rabbit

设置权限

rabbitmqctl set_user_tags rabbit administrator

操作授权

rabbitmqctl set_permissions -p / rabbit “.“.“.*

posted on 2018-11-07 23:08  我&菜鸟  阅读(184)  评论(0编辑  收藏  举报