# 下載包
wget https://releases.hashicorp.com/consul/1.11.1/consul_1.11.1_linux_amd64.zip
# 安裝解壓庫 unzip
yum install -y unzip
# 解壓包到指定路徑: /usr/local
unzip consul_1.11.1_linux_amd64.zip -d /usr/local
# 添加軟連接
ln -s /usr/local/consul /usr/local/bin/consul
# 創(chuàng)建文件夾存放 log
mkdir /var/log/consul/
#啟動主節(jié)點(diǎn)帶ui (x.x.x.1為主節(jié)點(diǎn)機(jī)器, 另外兩個為從節(jié)點(diǎn)機(jī)器)
nohup consul agent -server -ui -bootstrap-expect=3 -data-dir=/hadoop/consul -node=server-1 -client=0.0.0.0 -bind=x.x.x.1 -datacenter=cn_dc1 >> /var/log/consul/consul.log &
#啟動從節(jié)點(diǎn) 注意 node bind datacenter 相關(guān)參數(shù)變更
nohup consul agent -server -ui -bootstrap-expect=3 -data-dir=/hadoop/consul -node=server-2 -client=0.0.0.0 -bind=x.x.x.2 -datacenter=cn_dc1 -join x.x.x.1 >> /var/log/consul/consul.log &
nohup consul agent -server -ui -bootstrap-expect=3 -data-dir=/hadoop/consul -node=server-3 -client=0.0.0.0 -bind=x.x.x.3 -datacenter=cn_dc1 -join x.x.x.1 >> /var/log/consul/consul.log &
# 查看輸出日志
tailf /var/log/consul/consul.log
centos7 部署 consul 集群服務(wù)
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- Zookeeper完全分布式集群服務(wù) 準(zhǔn)備好3臺服務(wù)器: [x]A-> centos-helios:192.168...
- Cloudera提供了一個可擴(kuò)展的,靈活的集成平臺,可以輕松管理企業(yè)中快速增長的數(shù)據(jù)量和各種數(shù)據(jù)。 Clouder...
- 一、系統(tǒng)配置 環(huán)境虛擬機(jī):VMware Pro 14創(chuàng)建三臺虛擬機(jī),系統(tǒng)為Centos7(CentOS-7-x86...
- 一 資源、版本信息 cpu:Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz //...
- 本文章僅作為個人筆記 CDH官網(wǎng)地址:https://www.cloudera.com/ CDH鏡像地址: c...