Ubuntu 20.04 安装rabbitmq
参照RabbitMq官网的安装教程(Installing on Debian and Ubuntu),来进行安装。
sudo apt install erlang-nox
安装完成后执行
erl
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]
Eshell V10.6.4 (abort with ^G)
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
sudo apt update
sudo apt install rabbitmq-server
安装完成后,查看服务状态
systemctl status rabbitmq-server
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-09-07 09:53:48 CST; 2 days ago
Main PID: 1581436 (beam.smp)
Status: "Initialized"
Tasks: 235 (limit: 18732)
Memory: 95.7M
CGroup: /system.slice/rabbitmq-server.service
├─1581432 /bin/sh /usr/sbin/rabbitmq-server
├─1581436 /usr/lib/erlang/erts-10.6.4/bin/beam.smp -W w -A 192 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 -stbt db>
├─1581884 erl_child_setup 65536
├─1581943 inet_gethost 4
└─1581944 inet_gethost 4
启动、停止、重启rabbitmq
sudo service rabbitmq-server start # 启动
sudo service rabbitmq-server stop # 停止
sudo service rabbitmq-server restart # 重启
执行了上面的步骤,rabbitMq已经安装成功。
启用 web端可视化操作界面,我们还需要配置Management Plugin插件
sudo rabbitmq-plugins enable rabbitmq_management # 启用插件
sudo service rabbitmq-server restart # 重启
此时,应该可以通过 http://localhost:15672/ 查看,使用默认账户guest/guest 登录。
本文链接地址:https://const.net.cn/406.html