zookeeper在linux上的集群搭建

2021-09-25 23:31:52 字數 1297 閱讀 6250

1.用stfp等檔案傳輸軟體將linux版本的zookeeper傳輸到linux中

2.在檔案中進行解壓命令為:tar -zxvf 檔名(路徑+檔名) -c 解壓路徑

3. 可以將解壓後的一些無用檔案刪除:doc src

1.進入conf這個檔案中,複製zoo_sample.cfg並改名為zoo.cfg

2.配置zoo.cfg

2.1將datadir後面的路徑進行更改,這個資料夾中要放入myid檔案

2.2在最後新增上:

server.1=hdp-01:2888:3888

server.2=hdp-02:2888:3888

server.3=hdp-03:2888:3888

這段話表示的是總共有三颱zookeeper,分別是那幾台

2.3儲存推出

整體的配置

# the number of milliseconds of each tick

ticktime=2000

# the number of ticks that the initial

# synchronization phase can take

initlimit=10

# the number of ticks that can pass between

# sending a request and getting an acknowledgement

synclimit=5

# the directory where the snapshot is stored.

# do not use /tmp for storage, /tmp here is just

# example sakes.

datadir=/root/zkdata

# the port at which the clients will connect

clientport=2181

# set to "0" to disable auto purge feature

#autopurge.purgeinterval=1

server.1=hdp-01:2888:3888

server.2=hdp-02:2888:3888

server.3=hdp-03:2888:3888

3 按照配置檔案中大的位置建立乙個資料夾,然後再建立乙個檔名為myid值為1,並且依次配置剩餘的機器

4.最後依次啟動便可

:在啟動前先將防火牆進行關閉,不然不會出現領導和下屬的關係

在linux中安裝zookeeper

1 安裝jdk 2 拷貝zookeeper安裝包到 usr local server目錄下 3 解壓到當前目錄 tar zxvf zookeeper 3.4.14.tar.gz 4 配置修改 將 usr local server zookeeper 3.4.14 conf路徑下的zoo sample...

Zookeeper 在Linux系統的安裝

下面呢,就總結一下如何在linux下面安裝zookeeper。第一步 在linux系統上安裝乙個jdk 第二步 把zookeeper的壓縮包上傳到linux系統上去,至於上傳的方法有很多,我是用securecrt 進行上傳的。第三步 解壓縮 zookeeper的壓縮包 tar zxvf zookee...

zookeeper在Linux上面的安裝

2解壓 tar zxvf zookeeper 3.4.12 alpha.tar.gz解壓完畢之後修改一下解壓之後所得的資料夾名 mv zookeeper 3.4.12 zookeeper刪除 zookeeper 安裝包 rm rf zookeeper 3.4.12.tar.gzmkdir data進...