zk單機啟動

2021-10-10 20:06:08 字數 1924 閱讀 1617

1. 這裡用的是最新版本的zookeeper3.6.0 ->

1. 首先解壓

tar -zxf apache-zookeeper-3.6.0-bin.tar.gz

2. 修改conf目錄

cp zoo_sample.cfg zoo.cfg

vim 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.

# 儲存快照的目錄。不要使用/tmp儲存,/tmp這裡只是示例sakes。

datadir=/root/zk3.6/data

# 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.

# 在開啟autopurge之前,請務必閱讀管理員指南的維護部分。

## ## the number of snapshots to retain in datadir

# 要在datadir中保留的快照數

#autopurge.snapretaincount=3

# purge task interval in hours

# set to "0" to disable auto purge feature

# 清除任務間隔(以小時為單位)設定為「0」以禁用自動清除功能

#autopurge.purgeinterval=1

## metrics providers 度量提供者

## metrics exporter 度量匯出器

3. 切換到bin目錄啟動

Zk單機多例項部署

當前環境 centos7.3一台 軟體版本 zookeeper 3.5.2 部署目錄 usr local zookeeper 啟動埠 2181,2182,2183 配置檔案 usr local zookeeper conf zoo1 3.cfg yum依賴 yum install j a 1.8.0...

ETCD 單機啟動

etcd就兩個可執行檔案 截至到3.0.15前 注 etcd可以集群安裝,在這裡只想做乙個單機測試,所以只是啟動乙個節點就可以。1.解壓,並將檔案放入系統路徑中 tar zxvf etcd v3.0.15 linux amd64.tar.gz cp etcd usr bin cp etcdctl u...

zk集群啟動shell指令碼 複製使用

bin bash brokers init1 init2 init3 echo 開始啟動zk集群 for broker in brokers doecho start zk on broker ssh broker c source etc profile sh bin zkserver.sh st...