一、Zookeeper下載
[root@localhost 下載]# wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
已發出 HTTP 請求,正在等待迴應... 200 OK
長度:11833706 (11M) [application/octet-stream]
正在保存至: “zookeeper-3.4.10.tar.gz”
100%[======================================================================================================================================================================================>] 11,833,706 171KB/s 用時 68s
- 已保存 “zookeeper-3.4.10.tar.gz” [11833706/11833706])
二、解壓
[root@localhost deploy]# tar -zxvf zookeeper-3.4.10.tar.gz
三、進入到conf目錄修改zoo_samle.cfg爲zoo.cfg
[root@localhost conf]# mv zoo_sample.cfg zoo.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.
dataDir=../data
dataLogDir=../log
# the port at which the clients will connect
clientPort=2181
server.1=192.168.147.128:3888
五、啓動
進入bin目錄,執行:./zkServer.sh start