安裝jdk 看我上個文章
建立資料夾 mkdir zookeeper
用xftp上傳資料夾到zookeeper
在zookeeper-3.4.14資料夾建立data,logs資料夾
在data資料夾新增myid檔案,裡面維護你機器的編號
把conf資料夾裡面的zoo_sample.cfg修改zoo.cfg並配置成
# 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.
#server2、server3資料夾下的這個檔案 要修改這個位置
datadir=/root/ff/zookeeper/zookeeper-3.4.14/data/1
#日誌輸出位置,根據個人喜好 將三個server的日誌分開或者放在乙個目錄
datalogdir=/root/ff/zookeeper/zookeeper-3.4.14/logs
# the port at which the clients will connect
clientport=2182
server.1=192.168.229.128:2888:3888
server.2=192.168.229.129:2888:3888
server.3=192.168.229.130:2888:3888
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxclientcnxns=60
## be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
## ## the number of snapshots to retain in datadir
#autopurge.snapretaincount=3
# purge task interval in hours
# set to "0" to disable auto purge feature
#autopurge.purgeinterval=1
執行/root/ff/zookeeper/zookeeper-3.4.14/bin/zkserver.sh start啟動zk
執行/root/ff/zookeeper/zookeeper-3.4.14/bin/zkserver.sh status 檢視啟動狀態
如圖,啟動成功
Linux中kafka和zookeeper安裝
kafak的安裝需要安裝zookeeper。一 zookeeper安裝 2 解壓 sudo tar zxvf apache zookeeper 3.5.5 bin.tar.gz c usr local 3 進入加壓目錄重新命名zookeeper cd usr local sudo mv apache...
zookeeper學習之zookeeper集群
匯入zookeeper原始碼包,解壓安裝到你放置的資料夾 命令 tar zxvf 原始碼包名 進入解壓後的資料夾 conf目錄,複製zoo zample.cfg檔案並重命名 命令 cp zoo zample.cfg zoo.cfg 使用vim編輯器修改zoo.cfg檔案 命令 vim zoo.cfg...
安裝rz centos安裝zookeeper
wget zookeeper 3.4.9.tar.gz 2 進入 opt目錄,對安裝進行解壓 tar xzvf zookeeper 3.4.9.tar.gz 3 重新命名 可省略 mv zookeeper 3.4.9 zookeeper 4 進入目錄,建立配置檔案 cd zookeeper conf...