## 准备工作 * on 192.168.3.7 | 软件 | 版本 | 备注 | | --- | --- |--- | | centos| 7.5 | | | socat| | | | erlang| 19.0.4 | | | rabbitmq| 3.6.6 | | ``` yum -y install socat yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget gtk2-devel binutils-devel systemctl stop firewalld.service systemctl disable firewalld.service [root@nameser01 ~]# vi /etc/hostname rabbitmq01 [root@nameser01 ~]# vi /etc/hosts 192.168.3.7 rabbitmq01 192.168.3.8 rabbitmq02 192.168.3.9 rabbitmq03 ``` * 下载erlang和rabbitmq-server的rpm: http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm 注:如果遇到下载缓慢,可以尝试使用百度云盘的离线下载 然后,把下载的rpm文件都放到一个文件夹中,方便安装 * 安装erlang: ```    rpm -ivh erlang-19.0.4-1.el7.centos.x86_64.rpm ``` ![](https://img.kancloud.cn/7e/ab/7eabf28d2ee660fe18722ff7417a81da_813x48.png) * 测试是否安装成功: ``` erl ``` ![](https://img.kancloud.cn/34/f7/34f796972dd1fa22d70d46a311fce5e8_1033x82.png) * 安装rabbitmq: ``` rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch.rpm ``` ![](https://img.kancloud.cn/e2/50/e25056e64faca8c816acd093f8688dae_1033x84.png) * 修改配置 ``` cp /usr/share/doc/rabbitmq-server-3.6.6/rabbitmq.config.example /etc/rabbitmq/ cd /etc/rabbitmq/ ls mv rabbitmq.config.example rabbitmq.config cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.6/ebin vi rabbit.app ``` ![](https://img.kancloud.cn/5f/ef/5fefca63005c1451dae74f9d09070842_1147x691.png) * 启动和关闭 ``` service rabbitmq-server stop #关闭 service rabbitmq-server start #启动 service rabbitmq-server status #状态 ``` ![](https://img.kancloud.cn/b1/a4/b1a4d3cc0f2004561f83f7ee935e2d72_778x39.png) ![](https://img.kancloud.cn/60/84/608478e37d752c819ff90803d8c94b0e_1527x381.png) * 插件列表 rabbitmq-plugins list ![](https://img.kancloud.cn/f7/95/f79564ac89e675114551b290a8aa7eda_852x534.png) * 安装插件 rabbitmq-plugins enable rabbitmq_management