Article directory
download
Zookeeper official website address
Official website download address The compressed file
obtained after downloadingapache-zookeeper-3.8.0-bin.tar.gz
Use the command to unzip
tar -zxvf apache-zookeeper-3.8.0-bin.tar.gz
Obtain the zookeeper main directory after decompression
Preparations before starting
After entering the directory of zookeeper, create data and log folders respectively, which are used to store the directory for saving data and logs when zookeeper starts
mkdir data
mkdir log
as shown in the picture
Modify the configuration file of zookeeper
Configuration file address path zookeeper/conf
Copy the zoo_sample.cfg file to zoo.cfg
, modify the directory address of dataDir to the full path of the previously created data
, and add the address path of logDir
Start zookeeper and use the provided client to connect to zookeeper
Start the zookeeper service
cd zookeeper/bin
./zkServer.sh start
Start the zookeeper client connection service
./zkCli.sh