windows安装rabbitmq 需要windows 重启服务脚本么

一点对rabbitmq的使用心得 - flashing - ITeye技术网站
博客分类:
1.如果远程客户端网络状况不是太好,比如adsl什么的,那么一定在客户端打开requstedHeartbeat
2.如果在同一台机器上,千万不要打开requstedHeartbeat,即requstedHeartbeat=0
3.各个系统下配置文件的位置:
Windows - %APPDATA%\RabbitMQ\rabbitmq.config
Debian - /etc/rabbitmq/rabbitmq.config
RPM - /etc/rabbitmq/rabbitmq.config
MacOS (Macports) - /opt/local/etc/rabbitmq/rabbitmq.config
Generic UNIX - /etc/rabbitmq/rabbitmq.config
但是千万注意,不管你是设置了配置文件还是修改了环境变量RABBITMQ_*,至少windows下都必须从新安装服务才能生效,仅重启服务是没用的!话说这个问题非常奇怪啊,它是采取的服务参数的形式处理的而不是读取配置文件。
比如你在rabbitmq.config里面写了:
[{kernel,[{inet_dist_use_interface,{127,0,0,1}}]}].
那么重启服务没用,重装服务你才会发现这玩意监听在localhost了。
为了远程管理兔子MQ,可以打开management:
rabbitmq-plugins enable rabbitmq_management
但是由于用户权限配置问题,需要一点点的设置:
/questions//how-to-reset-user-for-rabbitmq-management
rabbitmqctl set_user_tags usrname administrator
这样才能登录!
官方demo里面RPC模式基本就是骗人的,这个模式带来的问题远比解决的问题多一百倍!
我的建议是不到万不得已,绝对不要阻塞请求来等待回复,这个模型太麻烦了,还是完全open的队列模式客户端自己取更合适。
调试程序的的时候,如果是异步队列,千万注意了,如果你收不到消息,很可能不是错误而是让别人的跑的应用收去了!所以这个地方一定控制一下只一个人取。
你好,requstedHeartbeat在哪配置呢,没找到连接参数吧,不是配置的,是代码里面的。
浏览: 187665 次
来自: 大连
你好,这个问题解决了吗??我也遇到了。。当一个生产者,一个消费 ...
&div class=&quote_title ...
&div class=&quote_title ...
目前已经有了多个证书的情况下需要考虑兼容性,所以不知楼主有没有 ...
&div class=&quote_title ...本帖子已过去太久远了,不再提供回复功能。genuinecx 的BLOG
用户名:genuinecx
文章数:239
评论数:301
访问量:345184
注册日期:
阅读量:5863
阅读量:12276
阅读量:380344
阅读量:1072694
51CTO推荐博文
& & (1)下载RabbitMQ服务器& & 从最新的稳定版。目前最新版本为3.5.1.& & (2)移除RabbitMQ老版本。& & 如果之前安装了老版本的话,或者想要将Erlang VM从32位升级到64位,需要手动卸载RabbitMQ服务器。因为安装过程中并不会停止或移除旧的服务。& & (3)安装RabbitMQ服务器& & 从Windows安装文件,并安装。RabbitMQ需要这个东西。& & 运行rabbitmq-server-3.5.1.exe,安装RabbitMQ并使用默认配置启动RabbitMQ服务。& & (4)启动RabbitMQ服务& & &RabbitMQ在默认情况下运行良好。如果想自定义配置RabbitMQ环境变量的话,还是看吧。& & RabbitMQ服务会自动启动,也可以从开始菜单中启动、重装或停止RabbitMQ服务。& & (5)安装管理工具& & 开始菜单中,选择“RabbitMQ Command Prompt (sbin dir)”,执行如下命令安装。D:\Program&Files&(x86)\RabbitMQ&Server\rabbitmq_server-3.5.5\sbin&rabbitmq-plugi
ns.bat&enable&rabbitmq_management
The&following&plugins&have&been&enabled:
&&mochiweb
&&webmachine
&&rabbitmq_web_dispatch
&&amqp_client
&&rabbitmq_management_agent
&&rabbitmq_management
Applying&plugin&configuration&to&rabbit@FAVPC...&started&6&plugins.& & 通过访问,输入guest/guest登陆成功,至此RabbitMQ安装成功。本文出自 “” 博客,请务必保留此出处
了这篇文章
类别:┆阅读(0)┆评论(0)本帖子已过去太久远了,不再提供回复功能。博客访问: 888274
博文数量: 274
博客积分: 5810
博客等级: 大校
技术积分: 3518
注册时间:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: 系统运维
Server安装篇
需要有Erlang语言支持的平台。支持的平台包括:
·Linux《支持redhat系列》
·Windows NT/2000/XP/Vista/Windows 7
·Windows Server
·Windows 95, 98
RabbitMQ is officially supported on a limited number of platforms:
·Ubuntu and Debian-based Linux
distributions
·Fedora and RPM-based Linux
distributions
·openSUSE and derived
distributions (including SLES and SLERT)
·Mac OS X
·Windows XP and later&
WINDOW安装篇
Install Server Components
or convenience, the&&already contains the Erlang system
installer and the RabbitMQ broker server binary distribution files needed for
the next section. It also includes .Net and Java client libraries for RabbitMQ.
Just extract the files from
the bundle and then follow the instructions to install each server component. 《将各个服务组件安装起来》
Install Erlang
Install a recent version of Erlang/OTP.&&and
higher should work on Windows. Extract it from the Windows bundle or choose a
version from&
Run the .exe file. Using default
installation options, Erlang will appear in the Start Menu, and&\erl5.7.4\bin\erl.exe&will be inC:\Program Files&or&C:\Program Files (x86).
我的安装目录:C:\Program Files\erl5.8.3\bin&
ERLANG_HOME
Set&ERLANG_HOME&to where you actually put your Erlang
installation, e.g.&C:\Program Files\erl5.7.4&(full path). The RabbitMQ batch files expect to execute&%ERLANG_HOME%\bin\erl.exe.
Start&>&Settings&>&Control&Panel&>&System&>&Advanced&>&Environment&Variables.
Create the system environment variableERLANG_HOME&and set it to the full path of the directory which contains&bin\erl.exe.《配置这项环境变量》
创建一个环境变量:ERLANG_HOME 其值为 C:\Program Files\erl5.8.3
至此安装完成!
Install RabbitMQ Server
Download&rabbitmq-server-windows-2.5.1.zip&from the&&or
extract it from the Windows bundle.
From the zip file, extract the folder
named&rabbitmq_server-2.5.1&into&C:\Program Files\RabbitMQ&(or somewhere suitable for
application files).
PS:直接将这个文件rabbitmq_server-2.5.1 复制到C:\Program
Files\RabbitMQ !
相关的命令行
Commands for RabbitMQ Server
Within the&rabbitmq_server-2.5.1\sbin&directory are some scripts which run commands to control the RabbitMQ
这里面就会有一些相关命令可以使用了!
The RabbitMQ server can be run as either
an application or
service (not both).
&starts the broker as an
application.《我们用它吧!》
&manages the service and
starts the broker.
&manages a running broker.《共三个》&
Set up the
system path so you can find the server and&sbin&directory easily.
·& Create a system environment variable (e.g. RABBITMQ_SERVER) for&"C:\Program
Files\RabbitMQ\rabbitmq_server-2.5.1". Adjust this if you put&rabbitmq_server-2.5.1&elsewhere, or if
you upgrade versions.
·& Append the literal string ";%RABBITMQ_SERVER%\sbin" to your system path (aka %PATH%).
配置环境变量!
#创建一个环境变量RABBITMQ_SERVER 设置其值
#设置环境变量
;%RABBITMQ_SERVER%\sbin
将其配置到系统的环境变量里面去!&
Finding Application Data
By default, the RabbitMQ logs and Mnesia
database are stored in the current user's Application Data directory e.g.C:\Documents and
Settings\User\Application Data&or&C:\Documents and
Settings\User\AppData\Roaming&(Windows Vista).
Execute&echo %APPDATA%&at a
Command Prompt to find this directory. Alternatively,
Start&>&Run&%APPDATA%&will open this folder.
C:\Users\yaofang.zjl>echo %APPDATA%
C:\Users\yaofang.zjl\AppData\Roaming&&
可以看到应用数据存储的位置与目录
Start the Broker as an Application
Run the command
rabbitmq-server -detached
Alternatively,
you can double-click the&rabbitmq-server.bat&file in Windows Explorer.&
Stop or Manage the Broker《掮客》
rabbitmq-server&only starts the broker. To&&use&rabbitmqctl&commands.
还可以将其运行做为一个服务。而不是server
service runs using the&rabbitmq-service.bat&script in&sbin. 启一个服务。
Customise RabbitMQ Service Environment
Note:&After setting environment variables, you may need to install the service
The&rabbitmq-service.bat&script recognises many of the same&&as&rabbitmq-server.bat, as well as a few additional service environment variables.
Install the Service
Install the service by running
rabbitmq-service install
A service with the name defined by&RABBITMQ_SERVICENAME&should now appear in the Windows
Services control panel (Start&>&Run&services.msc).
Managing the Service
To manage the service (install, remove,
start, stop, enable, disable), use&rabbitmq-service.bat&commands. Refer to the&for more information and
troubleshooting guidance. You can also use the Windows Services panel (services.msc) to perform
some of the same functions as the service script.
Start the Broker as a Service
To start the broker, execute
rabbitmq-service start
If the output from this command is
"Service&RABBITMQ_SERVICENAME&started", then the service was started correctly.
Confirm the service named&RABBITMQ_SERVICENAME&reports a "Started"
status in Services:&
Start&>&Run&services.msc.
Manage the Broker
To&&use&rabbitmqctl&commands.&
stop the broker or check its status, use&rabbitmqctl.bat&in&sbin&(as an administrator).&
红帽上面的安装方法
Install from a package
The RabbitMQ server is included in
Fedora, so for Fedora and RHEL users we recommend to install the&rabbitmq-server&package via the distribution's package manager.
Alternatively, install&rabbitmq-server-2.5.1-architecture.rpm&(which you can download from the&). We recommend using your
distribution's packaged version of Erlang to run the server. See&&for more information.
&&&&&& Customise RabbitMQ Environment Variables
The server should start using defaults.
You can&. Also
see how to&.
Start the Server
The server is not started as a daemon by
default when the RabbitMQ server package is installed. To start the daemon by
default when the system boots, as an administrator run&chkconfig
rabbitmq-server on.
As an administrator, start and stop the
server as usual using&/sbin/service rabbitmq-server&stop/start/etc.
Note:&The server is set up to run as system user&rabbitmq. If you change the location of the Mnesia database or the logs, you must
ensure the files are owned by this user (and also update the environment
variables).
Manage the Server
See the&&section for info on&&commands and&.
现在来开始启动SERVER吧!
Install the Service
Install the service by running
rabbitmq-service install
A service with the name defined by&RABBITMQ_SERVICENAME&should now appear in the Windows
Services control panel
从控制面板的服务里面可以看到这个东西启动了。可以将它当成一个服务进行管理!&
测试是否正常运行状态:rabbitmqctl status
This example indicates that no broker is running:
& Status of node 'rabbit@xxx' ...& Error: unable to connect to node 'rabbit@xxx': nodedown& diagnostics:& - nodes and their ports on xxx: [{rabbitmqctl,...}]& - current node: 'rabbitmqctlxxx@xxx'& - current node home dir: [...]& - current node cookie hash: [...]
表示这个服务并未正常开启!&
正常的启动方法:
1、到C:\Program Files\RabbitMQ\rabbitmq_server-2.5.1\sbin 右键点到rabbitmq-server 以管理员的身份进行启动这个服务。
2、到另外一个console下面运行:
C:\Users\yaofang.zjl>rabbitmqctl
Status of node 'rabbit@TB-YAOFANG' ...
[{pid,6188},
&{running_applications,[{rabbit,"RabbitMQ","2.5.1"},
&&&&&&&&&&&&&&&&&&&&&&& {os_mon,"CPO& CXC 138 46","2.2.5"},
&&&&&&&&&&&&&&&&&&&&&&& {sasl,"SASL& CXC 138 11","2.1.9.3"},
&&&&&&&&&&&&&&&&&&&&&&&
{mnesia,"MNESIA& CXC 138
12","4.4.17"},
&&&&&&&&&&&&&&&&&&&&&&& {stdlib,"ERTS& CXC 138 10","1.17.3"},
&&&&&&&&&&&&&&&&&&&&&&& {kernel,"ERTS& CXC 138 10","2.14.3"}]},
&{os,{win32,nt}},
&{erlang_version,"Erlang R14B02
(erts-5.8.3) [smp:4:4] [rq:4] [async-threads:30]
&{memory,[{total,},
{processes,4905408},
{processes_used,4896944},
{system,8374520},
{atom,734421},
{atom_used,721972},
{binary,129080},
{code,5820103},
{ets,373892}]}]
表示这个服务正常启动运行!
服务启来了开始学习JAVA-API的应用了
阅读(8491) | 评论(0) | 转发(1) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。

我要回帖

更多关于 windows 重启服务 的文章

 

随机推荐