zookeeper偽分布式

2021-08-28 15:18:47 字數 1751 閱讀 1589

wget
解壓

tar -zxvf zookeeper-3.4.5-cdh5.9.3.tar.gz -c /opt/
進入/opt/目錄修改檔名

mv zookeeper-3.4.5-cdh5.9.3 zookeeper01
進入/opt/zookeeper01/conf目錄設定配置檔案

cp zoo_sample.cfg zoo.cfg
配置檔案內容,注釋已被刪除

ticktime=2000

initlimit=10

synclimit=5

datadir=/opt/zookeeper01/datadir

datalogdir=/opt/zookeeper01/datalogdir

clientport=2181

server.1=192.168.126.136:2888:3888

server.2=192.168.126.136:2889:3889

server.3=192.168.126.136:2890:3890

在/opt/zookeeper01/目錄下新建datadir、datalogdir目錄

mkdir datadir

mkdir datalogdir

進入/opt/zookeeper01/datadir目錄

vim myid
輸入1並儲存

複製資料夾

cp zookeeper01 zookeeper02 -r

cp zookeeper01 zookeeper03 -r

修改配置檔案

zookeeper02

ticktime=2000

initlimit=10

synclimit=5

datadir=/opt/zookeeper02/datadir

datalogdir=/opt/zookeeper02/datalogdir

clientport=2182

server.1=192.168.126.136:2888:3888

server.2=192.168.126.136:2889:3889

server.3=192.168.126.136:2890:3890

進入/opt/zookeeper02/datadir目錄

vim myid
輸入2並儲存

zookeeper03

ticktime=2000

initlimit=10

synclimit=5

datadir=/opt/zookeeper03/datadir

datalogdir=/opt/zookeeper03/datalogdir

clientport=2183

server.1=192.168.126.136:2888:3888

server.2=192.168.126.136:2889:3889

server.3=192.168.126.136:2890:3890

進入/opt/zookeeper03/datadir目錄

vim myid
輸入3並儲存

zookeeper 偽分布式安裝

2 解壓縮 將zookeeper 3.4.6.tar.gz複製到 usr local資料夾下 執行命令 tar zxvf zookeeper 3.4.6.tar.gz 解壓後的資料夾為 zookeeper 3.4.6 為了方便,將資料夾改為zookeeper。mv zookeeper 3.4.6 z...

ZooKeeper偽分布式集群安裝

摘要 講述單台linux伺服器中搭建zookeeper集群的步驟,以及配置檔案中引數的說明。偽分布式集群 在一台server中,啟動多個zookeeper的例項。cd usr rz by tar xf zookeeper 3.4.6.tar.gz cd zookeeper 3.4.6 conf cp...

單機搭建zookeeper偽分布式集群

最近在研究hbase的時候,說要依賴zookeeper集群,於是又花時間來研究了下zookeeper集群的搭建,希望能幫到一些童鞋.首先將zookeeper解壓之後,建立了個zookeepercluser的資料夾將解壓的zookeeper複製三份到zookeepercluser下 現在以zookee...