ZooKeeper服務命令

2021-08-07 17:42:34 字數 1581 閱讀 6308

解壓後,新建編輯zoo.cnf

# 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=/tmp/zookeeper

# the port at which the clients will connect

clientport=2181

# 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

datadir=/opt/zookeeper/zookeeper-3.4.9/data

datalogdir=/opt/zookeeper/zookeeper-3.4.9/logs

clientport=2181

啟動./zkserver.sh start

在準備好相應的配置之後,可以直接通過zkserver.sh 這個指令碼進行服務的相關操作

zookeeper命令列工具類似於linux的shell環境,不過功能肯定不及shell啦,但是使用它我們可以簡單的對zookeeper進行訪問,資料建立,資料修改等操作.  使用 zkcli.sh -server 127.0.0.1:2181 連線到 zookeeper 服務,連線成功後,系統會輸出 zookeeper 的相關環境以及配置資訊。

命令列工具的一些簡單操作如下:

zookeeper 支援某些特定的四字命令字母與其的互動。它們大多是查詢命令,用來獲取 zookeeper 服務的當前狀態及相關資訊。使用者在客戶端可以通過 telnet 或 nc 向 zookeeper 提交相應的命令

ZooKeeper服務命令

在準備好相應的配置之後,可以直接通過zkserver.sh 這個指令碼進行服務的相關操作 zookeeper命令列工具類似於linux的shell環境,不過功能肯定不及shell啦,但是使用它我們可以簡單的對zookeeper進行訪問,資料建立,資料修改等操作.使用 zkcli.sh server ...

zookeeper服務搭建

解壓到指定路徑 root localhost src tar zxvf zookeeper 3.4.14.tar.gz c data server root localhost conf mkdir data server zookeeper 3.4.14 data 切換並改名 複製檔案到192.1...

Zookeeper服務安裝

mv zoo sample.cfg zoo.cfgbin目錄下啟動zk sh zkserver.sh start檢視節點狀態 sh zkserver.sh status zookeeper jmx enabled by default using config data program apache...