linux 怎么查看rabbitMQ服务启动
时间: 2023-09-28 16:11:16 浏览: 206
你可以通过以下命令来查看RabbitMQ服务是否已经启动:
```bash
sudo systemctl status rabbitmq-server
```
如果服务已经启动,你会看到类似下面的输出:
```
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-07-05 09:47:50 UTC; 3 weeks 1 days ago
Main PID: 1033 (beam.smp)
Tasks: 105
Memory: 287.5M
CPU: 3min 40.342s
CGroup: /system.slice/rabbitmq-server.service
├─1033 /usr/lib/erlang/erts-10.3.5.6/bin/beam.smp -W w -A 64 -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.7.17/sbin/../ebin /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.17/sbin/../deps -noshell -noinput -s rabbit boot -sname rabbit@rabbitmq -boot start_sasl -config /etc/rabbitmq/rabbitmq -kernel inet_default_connect_options [{nodelay,true}] -rabbit tcp_listeners [{"0.0.0.0", 5672}] -sasl errlog_type error
├─1655 /usr/lib/erlang/erts-10.3.5.6/bin/epmd -daemon
└─1852 erl_child_setup 1024
```
如果服务未启动,你会看到类似下面的输出:
```
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: inactive (dead)
```
如果服务未启动,你可以使用以下命令启动RabbitMQ服务:
```bash
sudo systemctl start rabbitmq-server
```
阅读全文