RabbitMQ在Windows机器上安装多个服务 [英] RabbitMQ installing multiple services on windows machine

查看:370
本文介绍了RabbitMQ在Windows机器上安装多个服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有关我的问题的很多资源,但仍然无法找出在单个Windows机器上安装RabbitMQ的2个服务的确切方法.

I know there are many resources regarding my question but still i am not able to figure out exact way to install 2 services of RabbitMQ on single windows machine.

我知道有两种方法可以运行rabbitmq.作为服务或应用程序.当我们安装RMQ时,默认情况下将安装一个名为"RabbitMQ"的服务,我们可以随时运行它.另外,您可以使用以下命令来运行另一个RMQ实例.

I know there are two way to run rabbitmq. Either as service or application. When we install RMQ it will by default install one sevice under name "RabbitMQ" which we can always run. And other way you can use below commands and run another instance of RMQ.

set RABBITMQ_NODE_PORT=5673
set RABBITMQ_NODENAME=test1
set RABBITMQ_SERVICE_NAME=test1
set RABBITMQ_SERVER_START_ARGS=-rabbitmq_management listener [{port,15673}]
call rabbitmq-server -detached

使用上述命令,我可以运行第二实例,但是一旦用户注销,RMQ将停止.因此,我尝试创建bat文件并将其注册为服务并启动它.但即使在此之后,随着用户注销,RMQ仍会停止.

Using above commands, i am able to run second instance but as soon as user log out, the RMQ will stop. So i tried creating bat file and register it as service and start it. But even after this, the RMQ is stopping as user is Logged out.

有人可以帮助我了解在Windows计算机上复制的确切步骤,以使RMQ持久运行第二个实例吗(可能是bat文件或任何其他指南)?

Can some one help me with exact steps to replicate on windows machine to run long lasting second instance of RMQ (may be bat file or any other guide)??

有什么方法可以修改rabbitmq-service.bat以适应上述变量更改?

Is there any way to modify rabbitmq-service.bat to accomodate above variable changes?

我几乎访问过有关安装多个RMQ实例的每个网站,但是没有人明确定义这样做的细粒度步骤.

I have visited almost every website regarding installing multiple instances of RMQ but no one clearly define fine grained steps to do so.

推荐答案

您应该仔细阅读以下文档:

You should carefully read this documentation: link

首先,使用服务器上的一个管理用户正常"将RMQ作为Windows服务安装,而无需进行任何自定义或环境配置.

First, install RMQ as a Windows Service "normally", without any customization or environment configuration, using one administrative user on your server.

然后,创建一个第二个管理帐户,然后执行以下操作:

Then, create a second administrative account, and do the following:

使用以下内容创建文件%AppData%\RabbitMQ\rabbitmq-env-conf.bat文件(请确保将HOSTNAME替换为您的实际主机名!):

Create the file %AppData%\RabbitMQ\rabbitmq-env-conf.bat file with these contents (be sure to replace HOSTNAME with your actual host name!):

set SERVICENAME=RabbitMQ Server (2)
set NODENAME=rabbit2@HOSTNAME
set NODE_PORT=5673

使用以下内容创建文件%AppData%\RabbitMQ\rabbitmq.conf:

Create the file %AppData%\RabbitMQ\rabbitmq.conf with these contents:

management.listener.port = 15673

打开"RabbitMQ命令提示符(sbin)"命令提示符,然后运行以下命令:

Open a "RabbitMQ command prompt (sbin)" command prompt, and run this command:

rabbitmq-service.bat install
rabbitmq-service.bat start

您应该在服务管理器中看到另一个服务正在运行.

You should see a second service running in the service manager.

请注意,我根本没有测试这些步骤.如果您遇到问题,我们很乐意在邮件列表中提供进一步的帮助.谢谢.

Note that I have not tested these steps at all. If you run into issues, I'm happy to help out further on the mailing list. Thanks.

注意::RabbitMQ团队监控 rabbitmq-users邮件列表,并且有时仅在StackOverflow上回答问题.

NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

这篇关于RabbitMQ在Windows机器上安装多个服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆