# CentOS7安装RabbitMQ

# yum方式安装erlang

由于rabbitmq是基于erlang语言开发的,所以必须先安装erlang

# erlang官网

# erlang官网下载地址:
https://www.erlang.org/downloads

# erlang solutions 地址:
https://www.erlang-solutions.com/resources/download.html

# 安装依赖项

yum install -y epel-release

# 添加存储库条目

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

# 安装

yum install -y erlang

# 验证是否安装成功

erl -version

出现“Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.5”证明安装成功

# rpm方式安装erlang

# 安装依赖项

yum install -y epel-release

# 下载rpm包

wget http://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_64/esl-erlang_25.0.3-1~centos~7_amd64.rpm

# 安装

yum install esl-erlang_25.0.3-1~centos~7_amd64.rpm

# 验证是否安装成功

erl -version

出现“Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.5”证明安装成功

# 安装RabbitMQ

# 下载

wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.11.3/rabbitmq-server-3.11.3-1.el8.noarch.rpm

# 安装

yum install rabbitmq-server-3.11.3-1.el8.noarch.rpm -y

# 设置开机启动

systemctl enable rabbitmq-server.service

# 启动web插件

cd /usr/lib/rabbitmq/bin
rabbitmq-plugins enable  rabbitmq_management

# 重启rabbitmq

systemctl stop rabbitmq-server.service
systemctl start rabbitmq-server.service

# 创建用户并赋权限

rabbitmqctl add_user tiankafei tiankafei
rabbitmqctl set_user_tags tiankafei administrator

# 登录地址

http://192.168.0.111:15672/

# 安装插件

cp /opt/software/rabbitmq_delayed_message_exchange-3.11.1.ez /usr/lib/rabbitmq/lib/rabbitmq_server-3.11.3/plugins/

cd /usr/lib/rabbitmq/bin
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Last Updated: 11/29/2022, 1:30:14 AM