Zookeeper stand-alone installation configuration
1. Preparation before installation
-
- Linux System (this article environment is Centos6.5)
- Zookeeper installation package, official website https://zookeeper.apache.org/, demo version zookeeper-3.4.7.tar.gz
2, Decompression: TAR-ZXVF zookeeper-3.4.7.tar.gz
3. Modify the configuration file
-
- CD zookeeper-3.4.7/conf
- CP zoo_sample.cfg zoo.cfg Copy template configuration file is Zoo.cfg
- Vim zoo.cfg Modify configuration file, common configuration reference
- Ticktime: Heartbeat time, to ensure that the connection exists, in milliseconds, the minimum time-out is two heartbeat time
- Initlimit: How many heartbeat times, allow the other server to connect and initialize the data, if the zookeeper management of large data, you should increase this value accordingly
- Synclimit: How many ticktime within, allow follower synchronization, if follower is too much behind, it will be discarded
- DataDir: The folder used to hold the memory database snapshot, and the myID file for the cluster also exists in this folder
- ClientPort: Monitoring port for the service
- Maxclientcnxns: Maximum number of concurrent clients, to prevent DOS, the default value is 10, set to 0 or not set to No limit
4. Service Start-up
-
- CD Zookeeper-3.4.7/bin
- ./zkserver.sh start appears stating startup success
5. Service Check
-
- lsof-i:2181 See if Port 2181 has been started, and can also be viewed when the configuration file is set up to prevent port occupancy
-
- Ps-ef | grep Zookeeper View service health
Next section: 1.2 Zookeeper pseudo-cluster installation
1.1 Zookeeper stand-alone installation