在Ubuntu上安装rabbitMq server
时间: 2024-02-05 19:10:24 浏览: 123
在Ubuntu上安装 RabbitMQ Server 的步骤如下:
1. 打开终端,使用以下命令进行更新:
```
sudo apt-get update
```
2. 安装 RabbitMQ Server:
```
sudo apt-get install rabbitmq-server
```
3. 确认 RabbitMQ Server 是否已经安装成功:
```
sudo systemctl status rabbitmq-server
```
如果 RabbitMQ Server 成功安装并正在运行,你应该能够看到类似下面的输出:
```
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-01-21 11:16:28 CST; 1min 25s ago
Main PID: 12947 (beam.smp)
Tasks: 160 (limit: 4915)
Memory: 165.1M
CGroup: /system.slice/rabbitmq-server.service
├─12947 /usr/lib/erlang/erts-10.3.5.9/bin/beam.smp -W w -A 64 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 -stbt db -zdbbl 32000 -K true -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.14/plugins -noshell -noinput -s rabbit start -sasl errlog_type error -kernel error_logger '{file,"/var/log/rabbitmq/rabbit@ubuntu.log"}' -sasl sasl_error_logger '{file,"/var/log/rabbitmq/rabbit@ubuntu-sasl.log"}' -rabbit metric_collectors '[{name,<<"rabbitmq_federation">>},{name,<<"rabbitmq_management">>},{name,<<"rabbitmq_management_agent">>},{name,<<"rabbitmq_prometheus">>},{name,<<"rabbitmq_web_dispatch">>}]
├─13025 /usr/lib/erlang/erts-10.3.5.9/bin/epmd -daemon
├─13171 erl_child_setup 65536
├─13208 inet_gethost 4
└─13209 inet_gethost 4
```
现在你已经成功安装了 RabbitMQ Server。你可以使用 `sudo rabbitmqctl` 命令来管理 RabbitMQ Server。
阅读全文