-
下载
erlang-23.2.7-2.el7.x86_64.rpm下载地址
RabbitMQ 3.8.30 下载地址 选择
Assets
下rabbitmq-server-3.8.30-1.el7.noarch.rpm
-
下载完成后,将下载的包上传至服务器
yum localinstall erlang-23.2.7-2.el7.x86_64.rpm #本地安装erlang erl -v # 退出 Eshell 方法 按 Ctrl + g 然后 输入 q 按 Enter yum localinstall rabbitmq-server-3.8.30-1.el7.noarch.rpm #本地安装rabbitmq
# 启动rabbitmq systemctl start rabbitmq-server # 查看rabbitmq状态 systemctl status rabbitmq-server # 设置rabbitmq服务开机自启动 systemctl enable rabbitmq-server # 关闭rabbitmq服务 systemctl stop rabbitmq-server # 重启rabbitmq服务 systemctl restart rabbitmq-server
systemctl start rabbitmq-server
然后systemctl status rabbitmq-server
看到Active: active (running)
即代表启动成功 -
如果出现执行
systemctl start rabbitmq-server
卡住或报如下错误Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
[root@junjian rabbitmq]# hostname # 查看主机名 junjian.com [root@junjian rabbitmq]# hostnamectl set-hostname junjian # 设置主机名 [root@junjian rabbitmq]# hostname junjian [root@junjian rabbitmq]# ifconfig # 查看ip ... ens33: ... inet 192.168.159.11 ... ... ... [root@junjian rabbitmq]# vim /etc/hosts # 末尾添加 # 192.168.159.11 junjian [root@junjian rabbitmq]# systemctl start rabbitmq-server [root@junjian rabbitmq]# systemctl status rabbitmq-server ... Active: active (running) ... ...