资源信息 | 版本号 | 备注 |
---|---|---|
Centos7 | 7.5 | IP: 192.168.51.4 |
RabbitMQ | 3.6.5 |
CSDN RabbitMQ下载: https://download.csdn.net/download/qq_15769939/16470226
官网 RabbitMQ下载:https://github.com/rabbitmq/rabbitmq-server/releases
将文件上传到服务器的 /opt/module/software/RabbitMQ
目录
[root@localhost software]# cd /opt/module/software/RabbitMQ
[root@localhost RabbitMQ]# ll
总用量 13560
-rw-r--r--. 1 root root 13881969 3月 28 20:33 RabbitMQ.zip
[root@localhost RabbitMQ]# unzip RabbitMQ.zip
[root@localhost RabbitMQ]# ll
总用量 23664
-rw-r--r--. 1 root root 18345424 3月 16 17:41 erlang-18.3-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 5520417 3月 16 17:41 rabbitmq-server-3.6.5-1.noarch.rpm
-rw-r--r--. 1 root root 361448 3月 16 17:41 socat-1.7.3.2-1.1.el7.x86_64.rpm
erlang-18.3-1.el7.centos.x86_64.rpm:
=> erlang语言依赖环境socat-1.7.3.2-1.1.el7.x86_64.rpm :
=> socatrabbitmq-server-3.6.5-1.noarch.rpm:
=> rabbitmq安装包[root@localhost RabbitMQ]# yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz -y
**rabbitMQ 必须依赖 elang环境 **
[root@localhost RabbitMQ]# rpm -ivh erlang-18.3-1.el7.centos.x86_64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:erlang-18.3-1.el7.centos ################################# [100%]
[root@localhost RabbitMQ]# rpm -ivh socat-1.7.3.2-1.1.el7.x86_64.rpm
警告:socat-1.7.3.2-1.1.el7.x86_64.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID 87e360b8: NOKEY
错误:依赖检测失败:
tcp_wrappers 被 socat-1.7.3.2-1.1.el7.x86_64 需要
[root@localhost RabbitMQ]# yum -y install tcp_wrappers
[root@localhost RabbitMQ]# rpm -ivh socat-1.7.3.2-1.1.el7.x86_64.rpm
警告:socat-1.7.3.2-1.1.el7.x86_64.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID 87e360b8: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:socat-1.7.3.2-1.1.el7 ################################# [100%]
如果出现依赖安装错误,碰到了问题,直接
yum
安装所需要的依赖
[root@localhost RabbitMQ]# rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm
警告:rabbitmq-server-3.6.5-1.noarch.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID 6026dfca: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:rabbitmq-server-3.6.5-1 ################################# [100%]
[root@localhost RabbitMQ]# vi /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/rabbit.app
修改内容
{loopback_users, [guest]},
[root@localhost RabbitMQ]# vi /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/rabbit.app
修改内容
{heartbeat, 10},
安装管理插件需要先启动服务,启动方式可以参考 3.1
[root@localhost RabbitMQ]# rabbitmq-plugins enable rabbitmq_management
查看启动是否成功
[root@localhost RabbitMQ]# lsof -i:15672
[root@localhost RabbitMQ]# /etc/init.d/rabbitmq-server start | restart
start 启动
restart 重启
[root@localhost RabbitMQ]# /etc/init.d/rabbitmq-server status
[root@localhost RabbitMQ]# lsof -i:5672
http://192.168.51.4:15672
[root@localhost RabbitMQ]# /etc/init.d/rabbitmq-server stop