RabbitMQ 的环境变量都是以"RABBITMQ_"开头的,可以在Shell 环境中设置,也可以在配置文件中定义。默认的配置文件如下:
- ##
- /etc/rabbitmq/rabbitmq-env.conf
/va/lib/rabbitmq/ 的目录不要删除,因为systemd 的工作目录还是: WorkingDirectory=/var/lib/rabbitmq/
- $sudo cat rabbitmq-env.conf
- NODENAME=rabbit@bigdata-02
- RABBITMQ_MNESIA_BASE=/opt/data/rabbitmq/data/
- RABBITMQ_LOG_BASE=/opt/data/rabbitmq/log/
-
-
-
- ##
- chown -R rabbitmq:rabbitmq /opt/data/rabbitmq/
- $sudo systemctl status rabbitmq-server.service
- ● rabbitmq-server.service - RabbitMQ broker
- Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
- Active: active (running) since 六 2023-09-09 17:03:00 CST; 33s ago
- Main PID: 4580 (beam.smp)
- Status: "Initialized"
- CGroup: /system.slice/rabbitmq-server.service
- ├─4580 /usr/lib64/erlang/erts-11.1.7/bin/beam.smp -W w -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 10485...
- ├─4595 erl_child_setup 32768
- ├─4621 /usr/lib64/erlang/erts-11.1.7/bin/epmd -daemon
- ├─4641 inet_gethost 4
- └─4642 inet_gethost 4
-
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: TLS Library: OpenSSL - OpenSSL 1.0.2k-fips 26 Jan 2017
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Doc guides: https://rabbitmq.com/documentation.html
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Support: https://rabbitmq.com/contact.html
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Tutorials: https://rabbitmq.com/getstarted.html
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Monitoring: https://rabbitmq.com/monitoring.html
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Logs: /opt/data/rabbitmq/log/rabbit@bigdata-02.log
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: /opt/data/rabbitmq/log/rabbit@bigdata-02_upgrade.log
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Config file(s): (none)
- 9月 09 17:03:00 bigdata-02 rabbitmq-server[4580]: Starting broker... completed with 3 plugins.
- 9月 09 17:03:00 bigdata-02 systemd[1]: Started RabbitMQ broker.
- [root@bigdata-02 data]#