In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Installation
Download the installation package http://www.apache.org/dyn/closer.cgi/zookeeper/ and choose a stable version
Extract the installation package
two。 Create a zoo.cfg in the conf directory (specified by the zkEnv file in the bin directory). Refer to the zoo_sample.cfg file
2.1 stand-alone mode
TickTime=2000dataDir=../datadir/zookeeperdataLogDir=../datalogdir/zookeeperclientPort=2181
2.2 Cluster mode
TickTime=2000dataDir=../datadir/zookeeperdataLogDir=../datalogdir/zookeeperclientPort=2181initLimit=10syncLimit=5server.1=127.0.0.1:8880:3887server.2=127.0.0.1:8881:3888server.3=127.0.0.1:8882:3889
3. Description of common parameters
TickTime is the basic unit of time used by zookeeper in milliseconds
DataDir data directory
DataLogDir log directory
Connection port of the clentPort client
When initLimt is initialized, the heartbeat of the longest connection between follower and leader, such as: 10x tickTime
The longest communication time between syncLimit follower and leader is 5 times tickTime.
Server.id=host:port1:port2
Id is the serial number of each server in the cluster. You need to create a myid file in the dataDir directory and write the serial number.
IP address of each server of host
Communication port between server of port1
Port2 selects the port of leader
4. Log configuration
4.1The zookeeper.root.logger in conf/log4j.properties needs to be modified. The default is console.
4.2 need to modify ZOO_LOG_DIR and ZOO_LOG_PROP specified log directory and appender under bin/zkEnv.sh
4.3 need to modify conf/zoo.cfg to add dataLogDir parameter (I don't know how to use it at the moment)
5. Start
Bin/zkServer.sh or bin/zkServer.cmd
Note: if it is in cluster mode, there will be an error: because other services are not started.
Reference address: https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_configuration
Reference address: http://blog.csdn.net/lengzijian/article/details/9226867
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.