zookeeper3.4.14 installation

 

Installation zookeeper Reference: https: //www.cnblogs.com/shaozm/p/10141727.html

download: 

wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz

3.4.14 ZooKeeper-CD 
mkdir Data
CD the conf Music Videos zoo_sample.cfg zoo.cfg VI zoo.cfg

configured as follows:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/home/hadoop/zookeeper-3.4.14/data
dataLogDir=/home/hadoop/zookeeper-3.4.14/log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
server.1=192.168.91.112:2888:3888
server.2=192.168.91.113:2888:3888
server.3=192.168.91.114:2888:3888
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

 

Note: server.1 server.2 server.3 refers to three machines

Two directories created manually 
dataDir = / Home / Hadoop / ZooKeeper-3.4.14 / Data
dataLogDir = / Home / Hadoop / ZooKeeper-3.4.14 / log
Creating java.env conf directory 
vi
java.env
export JVMFLAGS="-Xms100m -Xmx300m $JVMFLAGS"
Each set of id zoomkeeper
echo "1" > /home/hadoop/zookeeper-3.4.14/data/myid

After doing the above configuration, the other two machines to copy the entire directory on the remote zookeeper's 
scp -r /home/hadoop/zookeeper-3.4.14 hadoop @ slave1: / Home / hadoop /
scp -r / Home / haddop / zookeeper- 3.4.14 hadoop @ slave2: / home / hadoop /
and content data / myid is from 2 (server 2) or 3 (seerver 3)

a start command

zookeeper-3.4.14 / bin / zkServer.sh start log will start generating a directory zookeeper.out

view the status of the command
zookeeper-3.4.14 / bin / zkServer.sh status











 

Guess you like

Origin www.cnblogs.com/bjxdd/p/12003886.html