Server installation and start zookeeper service

download

Zookeeper official website address
Official website download address The compressed file
obtained after downloadingapache-zookeeper-3.8.0-bin.tar.gz
insert image description here

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
insert image description here

Modify the configuration file of zookeeper

Configuration file address path zookeeper/conf
Copy the zoo_sample.cfg file to zoo.cfg
insert image description here
, modify the directory address of dataDir to the full path of the previously created data
, and add the address path of logDir
insert image description here

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

Guess you like

Origin blog.csdn.net/languageStudent/article/details/124674930