Zookeeper Pseudo-distributed installation

Source: Internet
Author: User
Tags zookeeper

One: Environment

Centos

jdk1.6

zookeeper-3.4.3 Download

Two: Configuration

Three copies of the extracted zookeeper are copied, called Zookeeper-1,zookeeper-2 and zookeeper-3, respectively.

1. Zookeeper-1 Configuration :

Create the Data directory:/home/java2000_wl/hadoop/zookeeper-1/data
Create log directory:/home/java2000_wl/hadoop/zookeeper-1/logs
Create myID file:/home/java2000_wl/hadoop/zookeeper-1/data/myid
Content:
1

Create a/home/java2000_wl/hadoop/zookeeper-1/conf/zoo.cfg file

Content:
ticktime=2000
initlimit=10
Synclimit=5
Datadir=/home/java2000_wl/hadoop/zookeeper-1/data
clientport=2181
Datalogdir=/home/java2000_wl/hadoop/zookeeper-1/logs

server.1=127.0.0.1:4000:5000
server.2=127.0.0.1:4001:5001

server.3=127.0.0.1:4002:5002



2.zookeeper-2 Configuration:

Create the Data directory:/home/java2000_wl/hadoop/zookeeper-2/data
Create log directory:/home/java2000_wl/hadoop/zookeeper-2/logs
Create myID file:/home/java2000_wl/hadoop/zookeeper-2/data/myid
Content:
2

Create a/home/java2000_wl/hadoop/zookeeper-2/conf/zoo.cfg file
Content:
ticktime=2000
initlimit=10
Synclimit=5
Datadir=/home/java2000_wl/hadoop/zookeeper-2/data
clientport=2182
Datalogdir=/home/java2000_wl/hadoop/zookeeper-2/logs

server.1=127.0.0.1:4000:5000
server.2=127.0.0.1:4001:5001
server.3=127.0.0.1:4002:5002


3.zookeeper-3 Configuration:

Create the Data directory:/home/java2000_wl/hadoop/zookeeper-3/data
Create log directory:/home/java2000_wl/hadoop/zookeeper-3/logs
Create myID file:/home/java2000_wl/hadoop/zookeeper-3/data/myid
Content:
3

Create a/home/java2000_wl/hadoop/zookeeper-3/conf/zoo.cfg file
Content:
ticktime=2000
initlimit=10
Synclimit=5
Datadir=/home/java2000_wl/hadoop/zookeeper-3/data
clientport=2183
Datalogdir=/home/java2000_wl/hadoop/zookeeper-3/logs

server.1=127.0.0.1:4000:5000
server.2=127.0.0.1:4001:5001
server.3=127.0.0.1:4002:5002


Three: Start the service

Start the service into the bin directory of three services, respectively

bin/zkserver.sh start



Four: Client connection

After successfully starting the Zookeeper service, enter the following command to connect to the Zookeeper service

./zkcli.sh-server 127.0.0.1:2181

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.