一、资源地址
RabbitMQ官网安装教程:
https://www.rabbitmq.com/install-rpm.html
RabbitMQ与Erlang版本匹配对照表:
https://www.rabbitmq.com/which-erlang.html
Erlang rpm安装包官网下载地址:
https://www.erlang-solutions.com/resources/download.html
本次安装所使用的所有资源百度网盘地址(RabbitMQ版本为3.8.5、esl-erlang版本为23.0、socat版本为1.7.3):
https://pan.baidu.com/s/1SyERr6mdHKAaRkYjiK-kqg
提取码:2huz
二、安装步骤
1. 安装依赖
yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz tcp_wrappers
2. 安装erlang
rpm -ivh esl-erlang_23.0.3-1_centos_7_amd64.rpm
3. 安装socat
rpm -ivh socat-1.7.3.2-1.1.el7.x86_64.rpm
4. 安装rabbitmq
rpm -ivh rabbitmq-server-3.8.5-1.el8.noarch.rpm
5. rabbitmq服务启停
#查看RabbitMQ服务状态
systemctl status rabbitmq-server.service
#启动RabbitMQ服务
systemctl start rabbitmq-server.service
#重启RabbitMQ服务
systemctl restart rabbitmq-server.service
#停止RabbitMQ服务
systemctl stop rabbitmq-server.service
6. rabbitmq管控台插件
#启用插件
rabbitmq-plugins enable rabbitmq_management
#添加用户:r
rabbitmqctl add_user 用户名 密码
#赋予其administrator角色
rabbitmqctl set_user_tags 用户名 administrator
#赋予其权限,设置vhost为 /
rabbitmqctl set_permissions -p "/" 用户名".*" ".*" ".*"