赞
踩
环境:linux-centos7.x-64位 JDK1.8
rabbitmq版本:rabbitmq-server-3.8.5-1.el7.noarch
附加:linux宝塔面板
参考:
1.https://www.cnblogs.com/hnusthuyanhua/p/13528217.html
2.https://www.cnblogs.com/shihaiming/p/11016718.html
注意:erlang与rabbitma版本比对
版本比对链接
1.erlang条件配置:
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
2.erlang安装(默认最新):
yum install -y erlang
3.查看erlang的版本:
erl
1.导入两个key
rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
rpm --import https://packagecloud.io/gpg.key
2.rabbitmq前置条件配置
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
3.下载rabbitmq安装包
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.5/rabbitmq-server-3.8.5-1.el7.noarch.rpm
4.命名安装(注意移除或更换之前安装包)
rpm -Uvh rabbitmq-server-3.8.5-1.el7.noarch.rpm
rpm -ivh rabbitmq-server-3.8.5-1.el7.noarch.rpm
5.若报错
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum -y install epel-release
yum -y install socat
6.再次安装
rpm -ivh rabbitmq-server-3.8.5-1.el7.noarch.rpm
7.启用管理平台插件
rabbitmq-plugins enable rabbitmq_management
8.查看rabbitmq版本(若正常查看到,说明安装成功)
rpm -qa|grep rabbitmq
sudo rabbitmqctl status | grep rabbit
1.在云平台开放两个端口:(若有宝塔一并开放)
2.进入hosts文件增加(宝塔可直接找到文件编辑)【本机ip 此主机名】比如增加一行 187.36.2.1 主机名
vim /etc/hosts
3.相关指令
service rabbitmq-server start #启动
service rabbitmq-server stop #停止
service rabbitmq-server restart #重启
service rabbitmq-server status #查看状态
service rabbitmq-server etc #查看有哪些命令可以使用
#同时将rabbitmq-server加入到开机自启动服务中,运行以下命令:
[root@rabbitmqserver bin]# chkconfig rabbitmq-server on
4.启动
systemctl start rabbitmq-server
4.访问
187.36.2.1:15672
5.创建帐户 => 创建用户名admin,密码lanzhijingyun的用户
rabbitmqctl add_user admin lanzhijingyun
6.设置admin为超级管理员
rabbitmqctl set_user_tags admin administrator
7.授权远程访问(也可以登录后,可视化配置)
rabbitmqctl set_permissions -p / admin "." "." ".*"
8.创建完成后,重启RabbitMQ
systemctl restart rabbitmq-server
9.登录用户admin
授权
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。