【Linux】Centos7安装RabbitMQ
下载
从 rabbitmq 的 GitHub 仓库下载
https://github.com/rabbitmq/rabbitmq-server/releases
rabbitmq 是 erlang 语言编写的,需要先安装 erlang
https://github.com/rabbitmq/erlang-rpm/releases
安装
使用rz命令上传 erlang 和 rabbitmq 的 rpm
[root@localhost /]# yum -y install socat
[root@localhost /]# rpm -ivh erlang-26.2.5-1.el7.x86_64.rpm
[root@localhost /]# rpm -ivh rabbitmq-server-3.13.2-1.el8.noarch.rpm
启动
[root@localhost /]# systemctl start rabbitmq-server
[root@localhost /]# systemctl status rabbitmq-server
开启 wbe 插件,以及分配用户权限
[root@localhost /]# rabbitmq-plugins enable rabbitmq_management
[root@localhost /]# rabbitmqctl add_user admin admin
[root@localhost /]# rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
[root@localhost /]# rabbitmqctl set_user_tags admin administrator
校验
主机浏览器打开 http://192.168.181.136:15672/,输入账号 admin 密码 admin