1. 3臺Centos 7的機器,hostname分別為A、B、C
創(chuàng)新互聯(lián)建站專注于牙克石網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供牙克石營銷型網(wǎng)站建設,牙克石網(wǎng)站制作、牙克石網(wǎng)頁設計、牙克石網(wǎng)站官網(wǎng)定制、小程序開發(fā)服務,打造牙克石網(wǎng)絡公司原創(chuàng)品牌,更為您提供牙克石網(wǎng)站排名全網(wǎng)營銷落地服務。
2. IP地址分別為:A - 172.20.0.2 ??B - 172.20.0.3 ?C - 172.20.0.4
3. 修改hosts?件如下:
vim?/etc/ho?RabbitMq集群安裝?sts
172.20.0.2?A?172.20.0.3?B?172.20.0.4?C
4. 保證所有節(jié)點互通
1.?????安裝依賴項
yum?install?-y?epel-release
2.?????下載esl-erlang rpm包
wget?https://packages.erlangsolutions.com/erlang/rpm/centos/7/x86_64/esl-erlang_22.1.71~centos~7_amd64.rpm
3.?????安裝esl-erlang
yum?install?esl-erlang_22.1.7-1_centos_7_amd64.rpm
4.?????驗證esl-erlang
erl?-version 出現(xiàn)“Erlang?(SMP,ASYNC_THREADS,HIPE)?(BEAM)?emulator?version?10.5.5”?證明安裝成功
5.?????下載rabbitmq rpm包
wget?https://github.com/rabbitmq/rabbitmqserver/releases/download/v3.8.1/rabbitmq-server-3.8.11.el7.noarch.rpm
6.?????安裝socat依賴
yum?install?socat
7.?????安裝rabbitmq
rpm?-ivh?rabbitmq-server-3.8.1-1.el7.noarch.rpm
1.?????激活插件
rabbitmq-plugins?enable rabbitmq_management rabbitmq-plugins?list
1.?????開機啟動:
chkconfig?rabbitmq-server?on
2.?????查看啟動狀態(tài):
rabbitmqctl?status
3.?????啟動,關閉,重啟:
systemctl?enable?rabbitmq-server.service systemctl?start?rabbitmq-server.service? systemctl?stop?rabbitmq-server.service? systemctl?restart?rabbitmq-server.service
4.?????rabbitmq啟動
rabbitmqctl?start_app
1. 修改.erlang.cookie
chmod?600?/var/lib/rabbitmq/.erlang.cookie vim?/var/lib/rabbitmq/.erlang.cookie `保持所有節(jié)點cookie?致`
2. B節(jié)點執(zhí)?
rabbitmqctl?stop_app rabbitmqctl?join_cluster?--ram?rabbit@A rabbitmqctl?start_app
3. C節(jié)點執(zhí)?
rabbitmqctl?stop_app? rabbitmqctl?join_cluster?--ram?rabbit@A? rabbitmqctl?start_app
4. 查看集群狀態(tài)(A節(jié)點)
# 查看集群狀態(tài)
rabbitmqctl?cluster_status
5. 增加鏡像策略(A節(jié)點)
rabbitmqctl?set_policy?ha-all?"^"?'{"ha-mode":"all"}'
1. 添加rabbitmq?戶
rabbitmqctl?add_user?admin?123456 rabbitmqctl?set_user_tags?admin?administrator rabbitmqctl?set_permissions?-p?/?admin?".*"?".*"?".*"
?
?
?
當前標題:RabbitMq集群安裝
網(wǎng)頁網(wǎng)址:http://www.rwnh.cn/article10/pcosgo.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、靜態(tài)網(wǎng)站、網(wǎng)站改版、App開發(fā)、網(wǎng)站設計公司、網(wǎng)站收錄
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)