CentOS7下安装RabbitMQ

CentOS7下安装RabbitMQ

Scroll Down

CentOS7下安装RabbitMQ

1、前置准备

下载安装:

erlang-rpm安装包23.0.2-2

RabbitMQ3.8.5-rpm安装包3.8.5

wget安装

#安装wget
yum install wget -y

#创建下载目录
mkdir /usr/downloads
cd /usr/downloads

#下载erlang
wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_64/esl-erlang_23.0.2-2~centos~7_amd64.rpm

#下载RabbitMQ
wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.8.5/rabbitmq-server-3.8.5-1.el7.noarch.rpm

2、安装

#安装依赖
yum -y install epel-release
#安装erlang
yum install esl-erlang_23.0.2-2~centos~7_amd64.rpm -y

#安装RabbitMQ
yum install rabbitmq-server-3.8.5-1.el7.noarch.rpm -y

3、启动

启动,关闭,重启RabbitMQ

#启动
service rabbitmq-server start

#关闭
service rabbitmq-server stop

#重启
service rabbitmq-server restart

#设置开机启动
chkconfig rabbitmq-server on

4、开启可视化WEB页面

开启WEB可视化管理插件

#开启网页可视化访问
rabbitmq-plugins enable rabbitmq_management

浏览器输入服务器ip:15672访问

#访问不了关闭防火墙
service firewalld stop

5、添加用户

在后台先添加⼀个⽤户/密码对

rabbitmqctl add_user admin 123456
rabbitmqctl set_user_tags admin administrator