Easy Tutorial
❮ Android Tutorial Exercise 2 Python Docstrings ❯

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.

WeChat Follow

❮ Android Tutorial Exercise 2 Python Docstrings ❯