Zookeeper is a distributed, open source distributed application Coordination Service that is an open source implementation of Google's chubby and an important component of Hadoop and HBase. It is a software that provides consistent services for distributed applications, including configuration maintenance, name services, distributed synchronization, group services, and so on. The goal of zookeeper is to encapsulate complex and error-prone services that provide users with easy-to-use interfaces and performance-efficient, robust systems. The zookeeper contains a simple set of primitives. The Zookeeper code version provides a distributed, exclusive lock, election, queue interface, and the code is zookeeper-3.4.3\src\recipes. Where the distribution locks and queues have Java and C two versions, the election is only Java version. (Baidu Encyclopedia)
Official documentation Reference:
http://zookeeper.apache.org/doc/r3.4.6/zookeeperStarted.html#ch_GettingStarted
Download Zookeeper 3.4.6:
http://mirrors.hust.edu.cn/apache/zookeeper/
Unzip the file:
[email protected] bin]# sudo tar-zxvf zookeeper-3.4.6.tar.gz
Rename Conf/zoo_sample.cfg to Zoo.cfg
Partial configuration of the zookeeper:
Ticktime: This time is the time interval between the Zookeeper server or between the client and the server to maintain the heartbeat, that is, each ticktime time sends a heartbeat.
DataDir: As the name implies is Zookeeper to save the data directory, by default, Zookeeper will write the data log file is also stored in this directory.
ClientPort: This port is the port that the client connects to the Zookeeper server, Zookeeper listens to the port and accepts the client's access request.
When these configuration items are configured, you can start Zookeeper now, after starting to check whether Zookeeper is already in service, you can check with the Netstat–ano command to see if there is a ClientPort port number you configured in the Listening service.
Start the service:
./zkserver.sh Start
To see if the startup was successful:
[Email protected] bin]# Netstat-an|grep 2181
TCP 0 0 0.0.0.0:2181 0.0.0.0:* LISTEN
Also attached are some study materials:
Zookeeper principle (RPM)
Overview (Overview)
Http://zookeeper.apache.org/doc/r3.4.6/zookeeperOver.html
Getting Started (Getting started)
Http://zookeeper.apache.org/doc/r3.4.6/zookeeperStarted.html
Tutorial (Tutorial)
Http://zookeeper.apache.org/doc/r3.4.6/zookeeperTutorial.html
Java Example (Java sample)
Http://zookeeper.apache.org/doc/r3.4.6/javaExample.html
Programmer ' s Guide (developer Guides)
Http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html
Recipes and Solutions (Tips and solutions)
Http://zookeeper.apache.org/doc/r3.4.6/recipes.html
3.4.6 API Online (online API quick Check)
Http://zookeeper.apache.org/doc/r3.4.6/api/index.html
Another recommended zookeeper series of friends Sunddenly
Http://www.cnblogs.com/sunddenly/category/620563.html
Configuration of the Zookeeper installation
[Big Data] Zookeeper installation and configuration