马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!1、实行情况
192.168.56.101r1.com
192.168.56.102r2.com
2、修正主机名
#cat/etc/hosts
127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4
::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6
192.168.56.101r1r1.com
192.168.56.102r2r2.com
3、装置前筹办
[size=1em][size=1em]#yum-yinstallgcc*makencurses-devellibxsltxsltprocunzipnc
4、装置erlang
[size=1em][size=1em]#tar-zxvfotp_src_17.4.tar.gz
[size=1em]#cdotp_src_17.4
[size=1em]#./configure
[size=1em]#make&&makeinstall
5、装置rabbitmq
[size=1em][size=1em]#tar-zxvfrabbitmq-server-3.4.2.tar.gz
[size=1em]#cdrabbitmq-server-3.4.2
[size=1em]#make&&makeinstall
6、修正PATH路径
[size=1em][size=1em]#vim~/.bash_profile
[size=1em]PATH=$PATH:$HOME/bin:/root/rabbitmq-server-3.4.2/scripts
[size=1em]#source~/.bash_profile
7、启动rabbitmq
[size=1em][size=1em]#rabbitmq-server-detached
8、启用web办理插件,重启rabbitmq失效
[size=1em][size=1em]#rabbitmq-serverenablerabbitmq_management
假如/etc/rabbitmq不存在会报以下毛病:
[size=1em][size=1em]Error:{cannot_write_enabled_plugins_file,”/etc/rabbitmq/enabled_plugins”,enoent}
[size=1em]mkdir/etc/rabbitmq
9、封闭rabbitmq
[size=1em][size=1em]#rabbitmqctlstop
10、修正两个节点的cookie值一样
[size=1em][size=1em]#cat/root/.erlang.cookie
[size=1em]WNZBLBYBFEMCSGOTZCFM
11、设置集群
<divstyle="padding:0px;margin:0px;color:rgb(44,44,44);font-family:宋体,ArialNarrow,arial,serif;font-size:14px;line-height:28px;"><divclass="syntaxhighlighterbash"id="highlighter_6281"style="width:720px;padding:0px!important;margin:0.3em0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow-y:visible!important;overflow-x:auto!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;box-sizing:content-box!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;"><divclass="container"style="padding:0px!important;margin:0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background:none!important;">[size=1em]以自力的启动rabbitmq
[size=1em]#rabbitmq-server-detached
[size=1em]中断使用步伐
[size=1em]#rabbitmqctlstop_app
[size=1em]之内存的体例到场rabbit@r2集群
[size=1em]#rabbitmqctljpin_cluster--ramrabbit@r2
[size=1em]启动使用步伐
<divclass="linenumber8index7alt1"style="white-space:nowrap;padding:0px1em!important;margin:0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:static!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;"> |