windows 如何在windows上安装rabbitmq服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2581722/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to install rabbitmq server on windows
提问by Hacker_PK
How do I install RabbitMQ on Windows?
如何在 Windows 上安装 RabbitMQ?
回答by Sameek Mishra
Installation from a complete bundle
从完整包安装
The bundle zip file contains all the files listed in the next section, including an Erlang system installer and the RabbitMQ broker binary distribution, the .Net client, as well as an archive of the Java librabbitmq client library.[http://www.rabbitmq.com/download.html]
捆绑 zip 文件包含下一节中列出的所有文件,包括 Erlang 系统安装程序和 RabbitMQ 代理二进制分发版、.Net 客户端以及 Java librabbitmq 客户端库的存档。[ http://www. rabbitmq.com/download.html]
- install for windows erlang5.7.4 [otp_win32_R13B03].
- Download rabbitmq-server-windows-2.0.0.zip from the download page.
- 安装 windows erlang5.7.4 [otp_win32_R13B03]。
- 从下载页面下载 rabbitmq-server-windows-2.0.0.zip。
3.Contained in the zip file is a directory named rabbitmq_server-2.0.0. You should extract this folder to somewhere appropriate for application files, for example C:\Program Files\RabbitMQ.
3.zip文件中包含一个名为rabbitmq_server-2.0.0的目录。您应该将此文件夹解压缩到适合应用程序文件的位置,例如 C:\Program Files\RabbitMQ。
4.Once the files are successfully extracted, you should end up with a structure similar to C:\Program Files\RabbitMQ\rabbitmq_server-2.0.0.
4.一旦文件被成功解压,你应该得到一个类似于 C:\Program Files\RabbitMQ\rabbitmq_server-2.0.0 的结构。
- set the environment variable ERLANG_HOME to point to your Erlang directory (e.g. C:\Program Files\erl5.7.4)
- 将环境变量 ERLANG_HOME 设置为指向您的 Erlang 目录(例如 C:\Program Files\erl5.7.4)
6.by default RABBITMQ_BASE path for windows C:\Documents and Settings\User\Application Data\RabbitMQ. your all requird details information such as log file etc are stored in this dir.
6.windows 默认 RABBITMQ_BASE 路径为 C:\Documents and Settings\User\Application Data\RabbitMQ。您所有需要的详细信息(例如日志文件等)都存储在此目录中。
Running the Server as an Application
将服务器作为应用程序运行
1.rabbitmq_server-2.0.0\sbin and double-click the rabbitmq-server.bat file.
1.rabbitmq_server-2.0.0\sbin,双击rabbitmq-server.bat文件。
Running the Server as a Service
将服务器作为服务运行
1.Log in as an administrator and open a command shell (cmd.exe) in the sbin directory where the broker was installed. Install the service by executing
1.以管理员身份登录并在安装代理的sbin目录中打开命令外壳程序(cmd.exe)。通过执行安装服务
rabbitmq-service.bat install
rabbitmq-service.bat 安装
2.Ensure that a service with the name RABBITMQ_SERVICENAME now appears in the services control panel (services.msc).
2.确保名为 RABBITMQ_SERVICENAME 的服务现在出现在服务控制面板 (services.msc) 中。
for more details just visit http://www.rabbitmq.com/install.html
有关更多详细信息,请访问http://www.rabbitmq.com/install.html
回答by scvalex
RabbitMQ is designed to be built on a Unix machine (we regularly use various Linux distros and OSX). The community also tests on FreeBSD.
RabbitMQ 旨在构建在 Unix 机器上(我们经常使用各种 Linux 发行版和 OSX)。社区也在 FreeBSD 上进行测试。
That said, it's certainly possible to build on Windows, but you need a POSIX-like environment. The simplest way is by far with cygwin:
也就是说,当然可以在 Windows 上构建,但是您需要一个类似于 POSIX 的环境。到目前为止,最简单的方法是使用 cygwin:
- Install the latest Erlang from here,
- Get the Cygwin installer from here,
- Run it to install the base system; make sure you also have
make
,libxslt
/xlstproc
andmercurial
selected; if you forget anything, you can safely re-run the installer to get the missing programs; - Update your PATH to include python and erl (so, add something like
C:\Program Files\erl5.8.3\bin
andC:\Python27\bin
; of course, your paths will probably be different); check that everything works by runningpython
anderl
, - get the RabbitMQ source(you'll also need the codegen) via Mercurial;
- from a cygwin shell, run
make
in therabbitmq-server
directory.
- 从这里安装最新的 Erlang ,
- 从这里获取 Cygwin 安装程序,
- 运行它来安装基础系统;确保你也有
make
,libxslt
/xlstproc
并被mercurial
选中;如果您忘记任何事情,您可以安全地重新运行安装程序以获取丢失的程序; - 更新您的 PATH 以包含 python 和 erl(因此,添加类似
C:\Program Files\erl5.8.3\bin
和的内容C:\Python27\bin
;当然,您的路径可能会有所不同);通过运行python
和检查一切是否正常erl
, - 通过 Mercurial获取 RabbitMQ源代码(您还需要codegen);
- 从 cygwin shell,
make
在rabbitmq-server
目录中运行。
The last two steps are the normal Unix installation procedure. See the official instructionsfor more details.
最后两步是正常的Unix安装过程。有关更多详细信息,请参阅官方说明。
Also, note that you may have to run the broker (scripts/rabbitmq-server.bat
) from a normal command prompt and nota cygwin shell. This is due to a discrepancy between what Erlang and Cygwin think the root directory is /
.
另请注意,您可能必须scripts/rabbitmq-server.bat
从普通命令提示符而不是cygwin shell运行代理 ( ) 。这是由于 Erlang 和 Cygwin 认为根目录是/
.
If you have any problems, send a message to the rabbitmq-discussmailing list. The developers make a point of answering all queries posted there.
如果您有任何问题,请向rabbitmq-discuss邮件列表发送消息。开发人员强调回答发布在那里的所有查询。
回答by Michael Dillon
There is not really much point in doing this unless you intend to develop Erlang code, and in that case you should spend a day or two learning the basics of Erlang. After that it will be less of a struggle because RabbitMQ is written in Erlang.
除非您打算开发 Erlang 代码,否则这样做并没有多大意义,在这种情况下,您应该花一两天时间学习 Erlang 的基础知识。之后就不会那么麻烦了,因为 RabbitMQ 是用 Erlang 编写的。
I have built Erlang on Linux, but on Windows I just installed the binary package because it is just a test/dev environment for me. On Linux I had problems figuring out how to install the binaries and on Windows it took a while to figure out where to put the config file so that I could load plugins.
我在 Linux 上构建了 Erlang,但在 Windows 上我只安装了二进制包,因为它对我来说只是一个测试/开发环境。在 Linux 上,我在弄清楚如何安装二进制文件时遇到了问题,而在 Windows 上,我花了一段时间才弄清楚将配置文件放在哪里,以便我可以加载插件。
In any case, you don't run RabbitMQ on Windows or on Linux because it doesn't work that way. Like many Erlang applications, RabbitMQ runs on the cloud (your private cloud) and really expects to be part of a cluster of several servers all running a shared MQ broker service.
在任何情况下,您都不会在 Windows 或 Linux 上运行 RabbitMQ,因为它不能那样工作。与许多 Erlang 应用程序一样,RabbitMQ 运行在云(您的私有云)上,并且确实希望成为多个服务器集群的一部分,所有服务器都运行共享的 MQ 代理服务。
Go to this slide presentation from Google Tech Talksand look at the diagram on slide 17. That is how you would have 4 servers running RabbitMQ in a cluster to serve local clients where local might be one data center out of several in the same geographic region. Local traffic would not cross the cluster but applications don't need to do anything special in order to send/receive messages across the cluster.
转到Google Tech Talks 中的这个幻灯片演示,并查看幻灯片 17 上的图表。这就是在集群中运行 RabbitMQ 的 4 个服务器为本地客户端提供服务的方式,其中本地可能是同一地理区域中多个数据中心中的一个. 本地流量不会跨集群,但应用程序不需要做任何特殊的事情来跨集群发送/接收消息。
Slide 22 sums it up "Making Erlang disappear". You get all the benefits of Erlang without having to learn anything about it. Just use AMQP messaging and many processes. Say goodbye to threads.
Slide 22 总结了“让 Erlang 消失”。您无需学习任何有关 Erlang 的知识即可获得 Erlang 的所有好处。只需使用 AMQP 消息传递和许多进程。告别线程。
回答by Holger Hoffst?tte
Don't bother. Apparently it is "somehow" possible with Cygwin but I gave up too and consequently lost interest. This is a common problem rooted in Erlang culture, which doesn't really seem to understand cross-platform development.
不要打扰。显然,Cygwin 可以“以某种方式”实现,但我也放弃了,因此失去了兴趣。这是一个根植于 Erlang 文化中的常见问题,它似乎并不真正了解跨平台开发。