2.0 Zookeeper Installation and Configuration
Category Zookeeper Tutorial
Linux Installation
The download address for Zookeeper is: https://zookeeper.apache.org/releases.html.
Choose a stable version; this tutorial uses release version 3.4.14, download and install it.
Open the URL https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz, and you will see the following interface:
Zookeeper Download and Installation
$ wget https://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz
$ tar -zxvf zookeeper-3.4.14.tar.gz
$ cd zookeeper-3.4.14
$ cd conf/
$ cp zoo_sample.cfg zoo.cfg
$ cd ..
$ cd bin/
$ sh zkServer.sh start
After execution, the server starts successfully:
Check the server status (starting a standalone node):
Start the client:
$ sh zkCli.sh
Help command:
ZooKeeper -server host:port cmd args
stat path [watch]
set path data [version]
ls path [watch]
delquota [-n|-b] path
ls2 path [watch]
setAcl path acl
setquota -n|-b val path
history
redo cmdno
printwatches on|off
delete path [version]
sync path
listquota path
rmr path
get path [watch]
create [-s] [-e] path data acl
addauth scheme auth
quit
getAcl path
close
connect host:port
Windows Installation
The download address for Zookeeper is: https://zookeeper.apache.org/releases.html.
Click on a version to download:
After downloading, extract the file:
Copy the zoo_sample.cfg file from the conf directory and rename it to zoo.cfg:
Create an empty data folder and log folder under the installation directory:
Modify the zoo.cfg configuration file, change dataDir=/tmp/zookeeper to the data folder in the Zookeeper installation directory, and add a configuration for data logging (modify according to your installation path).
Double-click zkServer.cmd to start the program:
The console displays bind to port 0.0.0.0/0.0.0.0:2181, indicating that the server has started successfully!
Seeing Welcome to Zookeeper! indicates that we have successfully started the client.
- 1.0 Zookeeper Tutorial
- 2.0 Zookeeper Installation and Configuration
- 3.0 Zookeeper Linux Server Cluster Setup Steps
- 4.0 Zookeeper Java Client Setup
- 5.0 ZooKeeper Data Model znode Structure Detailed
- 6.0 Zookeeper Session Basic Principles
- 7.0 Zookeeper Client Basic Command Usage
- 8.0 Zookeeper Four-Letter Commands
- 9.0 Zookeeper Node Features
- 10.0 Zookeeper Access Control ACL
- 11.0 Zookeeper Watcher Event Mechanism Analysis
- 12.0 Zookeeper Data Synchronization Process
- 13.0 Zookeeper Leader Election Principles
- 14.0 Zookeeper Distributed Lock Implementation Principles