Ubuntu Installation Zookeeper

Source: Internet
Author: User
Tags create directory zookeeper zookeeper download

Download Zookeeper zookeeper download

To migrate files to the/home/hadoop/folder after download

[Email protected]:~/downloads$ sudo mv Zookeeper-3.4.9.tar.gz/home/hadoop

TAR-ZXVF Decompression

[Email protected]:/home/hadoop$ sudo tar-zxvf zookeeper-3.4.9.tar.gz

Change Folder zookeeper-3.4.9 to Zookeeper

[Email protected]:/home/hadoop$ sudo mv zookeeper-3.4.9 zookeeper

Unzip to create a copy of the zoo_sample.cfg in the Conf folder zoo.cfg

[Email protected]:/home/hadoop$ CD zookeeper[email protected]:/home/hadoop/zookeeper$ cd Conf[email Protected]:/home/hadoop/zookeeper/conf$ MP zoo_sample.cfg ZOO_CFGMP: Command not found [email protected]:/home/ hadoop/zookeeper/conf$ CP zoo_sample.cfg ZOO.CFGCP: Unable to create normal file ' zoo.cfg ': Insufficient permissions [email protected]:/Home /hadoop/zookeeper/conf$ sudo cp zoo_sample.cfg zoo.cfg[email protected]:/home/hadoop/zookeeper/conf$ sudo Gedit zoo.cfg

The original zoo.cfg:

# of milliseconds of each tickticktime=2000# The number of ticks that the initial # synchronization phase can takeinitlimit=10# The number of ticks that can pass between # Sending a request and getting an acknowledgementsynclimit=5# The directory where the snapshot is stored.# DoNot use/tmp forStorage,/tmp Here is just # example Sakes.datadir=/tmp/zookeeper# the port at which the clients would connectclientport=2181# The maximum number of client connections.# increase This ifYou need to handle more Clients#maxclientcnxns=60# # is sure to read the maintenance sections of the # Administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperadmin.html#sc_maintenance# # 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

Modified to:

# of milliseconds of each tickticktime=2000# The number of ticks that the initial # synchronization phase can takeinitlimit=10# The number of ticks that can pass between # Sending a request and getting an acknowledgementsynclimit=5# The directory where the snapshot is stored.# DoNot use/tmp forStorage,/tmp Here is just # example sakes. DataDir=/home/hadoop/zookeeper/Data # persisted path Datalogdir=/home/hadoop/zookeeper/log #日志保存路径server.1=192.168.1.203:2888:3888# The port at which the clients would connectclientport=2181# The maximum number of client connections.# increase This ifYou need to handle more Clients#maxclientcnxns=60# # is sure to read the maintenance sections of the # Administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperadmin.html#sc_maintenance# # 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

Description

Synclimit=5 # Leader with the maximum response time unit between follower, response over synclimit*Ticktime,leader think Follwer dead, remove Follwer from the server list. Initlimit=10 # votes to elect the initial time of the new leader. Ticktime=2000 # Zookeeper server heartbeat time, per millisecond clientport=2181 # Connection Port DataDir=/home/hadoop/zookeeper/ Data # persisted path Datalogdir=/home/hadoop/zookeeper/log# logs save path server. 1=10.10.100.10:2888:3888

Set Environment variables:

[Email protected]:/home/hadoop/zookeeper/conf$ export zookeeper_home=/home/hadoop/zookeeper[email protected]: /home/hadoop/zookeeper/conf$ export path= $PATH: $ZOOKEEPER _home/bin

Start Zookeeper:

[Email protected]:/home/hadoop/zookeeper/conf$ CD. [Email protected]:/home/hadoop/zookeeper/conf$ CD. /[email protected]:/home/hadoop/zookeeper$ CD Bin[email protected]:/home/hadoop/zookeeper/bin$ zkserver.sh startzookeeper JMX enabled bydefaultUsing config:/home/hadoop/zookeeper/bin/. /conf/Zoo.cfgmkdir: Unable to create directory"/home/hadoop/zookeeper/data # Data Persistence path": Insufficient permissions starting zookeeper .../home/hadoop/zookeeper/bin/zkserver.sh: Line 140:./zookeeper.out: Insufficient Authority/home/hadoop/zookeeper/bin/zkserver.sh: Line 149:/home/hadoop/zookeeper/data # Data Persistence path/zookeeper_server.pid: No file or directory failed to WRITE Pid[email protected]:/home/hadoop/zookeeper/bin$ sudo zkserver.sh start[sudo] hongdada password: sudo:zkServer.sh: Command not found [email protected]:/home/hadoop/zookeeper/bin$ sudo./zkserver.sh startzookeeper JMX enabled bydefaultUsing config:/home/hadoop/zookeeper/bin/. /conf/zoo.cfgstarting Zookeeper ... STARTED

Start is./zkserver.sh Start

Http://jingyan.baidu.com/article/456c463b60bd380a5931446f.html

http://blog.csdn.net/cruise_h/article/details/19046357

Ubuntu Installation Zookeeper

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.