如何重新配置 RabbitMQ 在 Windows 上不使用 %appdata%? [英] How to reconfigure RabbitMQ not to use %appdata% on Windows?
问题描述
如何重新配置 RabbitMQ 不使用 %appdata% 作为配置文件?
跟进问题
接下来,您似乎需要运行一些命令,我在安装过程中或之前无法定位到正确的目录.
所以,运行以下命令,基本上它会重新安装服务:
<块引用>C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat 删除
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat install
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat start
可选:重新安装管理插件:
<块引用>C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-plugins 启用 rabbitmq_management
如您所见,数据库文件放置在c:\rmq
目录中.
How to reconfigure RabbitMQ not to use %appdata% for config files?
Follow up for question RabbitMQ: change port on Windows Server
as described, a how to on how to re-config rabbit MQ to use an arbitrary directory. This will have some benefits regarding access of the database files etc. when running as a service without having to redefine the %appdata%
access rights, which are user bound.
In your windows environmental settings, you'll need to redefine RABBITMQ_BASE
, I have tested it with c:\rmq
(or one of the others as described in the documentation). Set it to the directory you want to target. See image:
Next, it seems you need to run some commands, I haven't been able to target the correct directory during or prior installation.
So, run the following commands, basically it reinstalls the service again:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat remove
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat install
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat start
Optional: reinstall management plugin:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-plugins enable rabbitmq_management
As you can see, the database files are placed in the c:\rmq
directory.
这篇关于如何重新配置 RabbitMQ 在 Windows 上不使用 %appdata%?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!