一般为版本不合适会导致启动错误
以下安装版本启动正常:
erlang: Erlang/OTP 22 [erts-10.4.3]
rabbitmq:rabbitmq-server_3.7.15-1_all.deb
ps -ef | grep rabbitmq
ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9
service rabbitmq-server start -detached
rabbitmqctl status
可以通过以下命令操作rabbitmq。
启动rabbitmq:service rabbitmq-server start
停止rabbitmq:service rabbitmq-server stop
重启rabbitmq:service rabbitmq-server restart
# sync package metadata
sudo apt-get update
# install dependencies manually
sudo apt-get -y install socat logrotate init-system-helpers adduser
# download the package
sudo apt-get -y install wget
# install the package with dpkg
sudo dpkg -i rabbitmq-server_3.7.15-1_all.deb
rm rabbitmq-server_3.7.15-1_all.deb
版本对应:https://www.rabbitmq.com/which-erlang.html
erlang 版本opt 22
rabbitmqctl list_users
sudo rabbitmqctl add_user admin admin123456
sudo rabbitmqctl set_user_tags admin administrator
以下为安装流程:
前言
目前公司用阿里云 + redis 的方式实现的消息队列。
了解了目前几种主流的消息组件(主要包括rabbitmq、kafka、)的优缺点后,这里为了深入学习rabbitmq,我在自己的腾讯云服务器上也搭建了一套环境。
准备工作
一台服务器:Ubuntu Server 16.04.1 LTS 64位
安装RabbitMq
可以参照RabbitMq官网的安装教程(Installing on Debian and Ubuntu),来进行安装。
这里我们使用apt-get来安装,就简单的几条命令:
1.由于rabbitMq需要erlang语言的支持,在安装rabbitMq之前需要安装erlang,执行命令:
apt-get install erlang-nox # 安装erlang
erl # 查看relang语言版本,成功执行则说明relang安装成功
2.添加公钥
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc| sudo apt-key add -
3.更新软件包
apt-get update
4.安装 RabbitMQ
apt-get install rabbitmq-server #安装成功自动启动
5.查看 RabbitMq状态
systemctl status rabbitmq-server #Active: active (running) 说明处于运行状态
# service rabbitmq-server status 用service指令也可以查看,同systemctl指令
6.启动、停止、重启
service rabbitmq-server start # 启动
service rabbitmq-server stop # 停止
service rabbitmq-server restart # 重启
执行了上面的步骤,rabbitMq已经安装成功。
7.启用 web端可视化操作界面,我们还需要配置Management Plugin插件
rabbitmq-plugins enable rabbitmq_management # 启用插件
service rabbitmq-server restart # 重启
此时,应该可以通过 http://localhost:15672查看,使用默认账户guest/guest 登录。
注意:RabbitMQ 3.3 及后续版本,guest 只能在服务本机登录。
瞄了一眼官方文档,说的是默认会创建guest用户,但是只能服务器本机登录,建议创建其他新用户,授权,用来做其他操作。
8.查看用户
rabbitmqctl list_users
9.添加管理用户
rabbitmqctl add_user admin yourpassword # 增加普通用户
rabbitmqctl set_user_tags admin administrator # 给普通用户分配管理员角色
ok,你可以在你的浏览器上输入:http://服务器Ip:15672/ 来访问你的rabbitmq监控页面。使用刚刚添加的新用户登录。
---------------------
作者:我跟吴彦祖四六开
来源:CSDN
原文:https://blog.csdn.net/qq_22638399/article/details/81704372
版权声明:本文为博主原创文章,转载请附上博文链接!
来源自https://www.rabbitmq.com/which-erlang.html
erlang安装包下载地址
https://packages.erlang-solutions.com/erlang/
erlang有多个类型
erlang 包括所有OTP组件及OTP Suite,没有erlang-doc erlang-manpages erlang-mode
esl-erlang 里面包含所有的OTP组件,比erlang package体积大一些
erlang-base 里面只包含了必要OTP组件,只有大约13M
Unsupported RabbitMQ SeriesMinimum required Erlang/OTPMaximum supported Erlang/OTPNotes
3.6.16
3.6.15
19.320.3.xRabbitMQ 3.6 was released on 2015-12-22, and reached end of life on 2018-05-31, we strongly discourage its use
On Windows, Erlang/OTP 20.2 changed default cookie file location
Versions prior to 19.3.6.4 have known bugs (e.g. ERL-430, ERL-448) that can prevent RabbitMQ nodes from accepting connections (including from CLI tools) and stopping
Versions prior to 19.3.6.4 are vulnerable to the ROBOT attack (CVE-2017-1000385)
3.6.14
3.6.13
3.6.12
3.6.11
R16B0320.1.xRabbitMQ 3.6 was released on 2015-12-22, and reached end of life on 2018-05-31, we strongly discourage its use
3.6.10
3.6.9
3.6.8
3.6.7
3.6.6
3.6.5
3.6.4
R16B0319.3.xRabbitMQ 3.6 was released on 2015-12-22, and reached end of life on 2018-05-31, we strongly discourage its use
3.6.3
3.6.2
3.6.1
3.6.0
R16B0318.3.xRabbitMQ 3.6 was released on 2015-12-22, and reached end of life on 2018-05-31, we strongly discourage its use
3.5.xR14B0417.5.xRabbitMQ 3.5 was released on 2015-03-11, and reached end of life on 2017-09-11, we strongly discourage its use
3.4.xR13B0316B03RabbitMQ 3.4 was released 2014-10-21, and reached end of life 2017-05-31, we strongly discourage its use
RabbitMQ versionMinimum required Erlang/OTPMaximum supported Erlang/OTPNotes
3.7.13
3.7.12
3.7.11
3.7.10
3.7.9
3.7.8
3.7.7
20.3.x21.3.xErlang/OTP 19.3.x support was discontinued as of Jan 1st, 2019
For the best TLS support, the latest version of Erlang/OTP 21.x is recommended
On Windows, Erlang/OTP 20.2 changed default cookie file location
3.7.6
3.7.5
3.7.4
3.7.3
3.7.2
3.7.1
3.7.0
19.320.3.xFor the best TLS support, the latest version of Erlang/OTP 20.3.x is recommended
Erlang versions prior to 19.3.6.4 have known bugs (e.g. ERL-430, ERL-448) that can prevent RabbitMQ nodes from accepting connections (including from CLI tools) and stopping
Versions prior to 19.3.6.4 are vulnerable to the ROBOT attack (CVE-2017-1000385)
On Windows, Erlang/OTP 20.2 changed default cookie file location
分类: 资料库,java后端-消息队列