Ubuntu系統上RabbitMQ的配置文件應該存儲在/etc/rabbitmq/rabbitmq.confnode
若是沒有,在RabbitMQ的啓動log裏面會有以下的信息:git
Starting RabbitMQ 3.7.7 on Erlang 21.0 Copyright (C) 2007-2018 Pivotal Software, Inc. Licensed under the MPL. See http://www.rabbitmq.com/ 2018-08-12 16:40:14.671 [info] <0.1409.0> node : rabbit@iZuf6cdovpqjj6q2xqxrjlZ home dir : /var/lib/rabbitmq config file(s) : (none) cookie hash : Q3TjDnUThEMjV/iOuMOw0w== log(s) : /var/log/rabbitmq/rabbit@iZuf6cdovpqjj6q2xqxrjlZ.log : /var/log/rabbitmq/rabbit@iZuf6cdovpqjj6q2xqxrjlZ_upgrade.log database dir : /var/lib/rabbitmq/mnesia/rabbit@iZuf6cdovpqjj6q2xqxrjlZ
這個時候能夠複製RabbitMQ的example文件: https://github.com/rabbitmq/rabbitmq-server/blob/master/docs/rabbitmq.conf.examplegithub
若是系統不能識別, 試試在/etc/rabbitmq下面增長rabbitmq-env.conf, 內容以下:vim
root@iZuf6cdovpqjj6q2xqxrjlZ:/etc/rabbitmq# vim /etc/rabbitmq/rabbitmq-env.conf CONFIG_FILE=/etc/rabbitmq/rabbitmq
注意: 沒有.conf後綴!bash
配置文件改動以後, 須要殺掉rabbitmq-server的進程從新啓動。cookie